Deallocating GCVirtualController breaks interface autorotation (iOS 15 beta 3)

Originator:rileytestut
Number:rdar://FB9370882 Date Originated:7/20/21
Status:Open Resolved:
Product:Game Controller Framework Product Version:iOS 5 beta 3
Classification:ncorrect/Unexpected Behavior Reproducible:Yes
 
As of iOS 15 beta 3, deallocating a GCVirtualController instance causes the app to stop responding to interface rotations. This is a problem because my app requires different GCVirtualController.Configurations for different games, but there’s no way to change a GCVirtualController’s configuration without deallocating + creating a new GCVirtualController.

Steps to Reproduce:
1) Initialize GCVirtualController with configuration
2) Call GCVirtualController.connect()
3) Call GCVirtualController.disconnect()
4) Deallocate GCVirtualController by removing all strong references
5) Attempt to rotate interface orientation

Expected Results:
The app continues to rotate as expected in response to interface orientation.

Actual Results:
The app no longer rotates in response to interface orientation.

I’ve attached a sample project to demonstrate this issue. Compile + run the project, then show + dismiss the virtual controller to see interface autorotation stop working. To “fix” this, change the “shouldDeallocateVirtualController” variable on line 12 of ContentView to “false”, which re-uses the virtual controller rather than deallocating it each time.

Comments


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!