UIMenuBuilder does not show key commands on app launch

Number:rdar://FB11615066 Date Originated:2022-09-29
Status:Closed Resolved:
Product:UIKit Product Version:16.0
Classification:Incorrect/Unexpected Behaviour Reproducible:Yes
On iPadOS 15.5 and above, building with the iOS 16 SDK, the app does not immediately show the key commands setup by the app from `func buildMenu(with builder: UIMenuBuilder)` from its `AppDelegate`. 

After interacting with any view in the app that can become a first responder, the app immediately begins to display key commands setup by it. 

The app instead presents key commands from Springboard (Homescreen). 

Apps built with prior versions of the SDK (15.5) exhibit the correct behaviour. 

Sample code and screenshot attached (https://github.com/dezinezync/FB11615066)

Xcode Version: 14.0.1 (14A400)


Apple Feedback

After reviewing your feedback, we have some additional information for you, or some additional information, or action is necessary for this issue:

We can't reproduce this issue internally. Using an iOS 16 SDK Xcode, we built and run the app on an iOS 15.5 device, and the HUD comes up for the app (showing two key commands) rather than for the system.

If this issue does occur, it’s probably a SpringBoard issue where it doesn’t give the app keyboard focus correctly. However, that would be a bug on iOS 15.5, not on iOS 16, and it's highly unlikely we'll put in keyboard focus bug fixes for iOS 15. Thanks!

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!