GCVirtualController does not show "Menu" button

Number:rdar://FB9204526 Date Originated:June 23, 2021
Status:Open Resolved:
Product:Game Controller Framework Product Version:iOS 15
Classification:Incorrect/Unexpected Behavior Reproducible:Yes
GCVirtualController does not display a “Menu” button, even it is initialized with a configuration that includes the element name GCInputButtonMenu. This is a problem for games that use all MFi buttons and also use the controller’s Menu button to pause the game, such as my own app.

Steps to Reproduce:
1) Initialize GCVirtualControllerConfiguration
2) Add “GCInputButtonMenu” to the GCVirtualControllerConfiguration’s elements.
3) Initialize GCVirtualController with the configuration
4) Call GCVirtualController.connect()

Expected Results:
A virtual controller appears with a Menu button.

Actual Results:
The virtual controller does not display a Menu button.

Hacky Workaround:
Because GCVirtualController adds a view which blocks user input to the rest of the app, it’s impossible to work around this without manually adding a custom button as a subview of the private GCControllerView. Allowing user input to pass through the controller view would make this workaround somewhat better.


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!