iPhone with iOS 14 beta 2 doesn't autorotate when connected to XCode debugger

I have iPhone 11 Pro running iOS 14 beta 2. In one of my projects (and only that project perhaps), the view controller doesn't autorotate when connected to XCode (11 or 12) debugger. When not connected to debugger, there is no issue in autorotation. This happens for only one particular project and it's not clear what could be blocking autorotation. None of the autorotation methods are called. I wonder what could be blocking autorotation. And if I connect any iOS 13 device, autorotation works with the debugger. Is this a known issue with iOS 14/XCode?
The problem happens on iOS 14 beta 3 as well. When using XCode 12 beta 3 and connecting the device to debugger, view controller doesn't autorotate. Using XCode11 solves the problem though, but I need XCode 12! Apple Engineers, are you aware of this issue?
Is this still an issue? I'm came across similar behavior with iOS 14.2 beta and Xcode 12.2 beta/beta2, and I've isolated it to the inclusion of a SceneKit SCNView with UIViewRepresentable.
Same problem here. Using iPhone 12 Pro and Xcode 12.2. Same code works fine on iPad Pro.
Incredibly, this is still an issue with iOS 14.3 released version and the latest version of Xcode. Submitting bug reports has just gotten the response to add sysdiagnose over and over, even thought it literally happens 100% of the time with absolutely any project if you're trying to rotate a phone running iOS 14 attached to the Xcode debugger.

I haven't tried the iOS 14.4 beta, does anyone know if it's still broken there?
Same problem here, XCode 12.3, iOS 14.3 on iPhone Xs max

I was starting to think I was crazy until I found this thread.
I have the same issue... debugged half the day to find out:
  • rotation is NOT working on iPhone OS, although methods like shouldAutorotate or supportedInterfaceOrientations are called when running with the debugger (but e.g. viewWillTransitionToSize never gets called afterwards)

  • rotation for the same project IS working when running in the simulator

  • rotation IS working on iPad when running with the debugger

  • rotation IS working on physical device when starting the app without Xcode

  • rotation IS working for a newly created simple iOS App with just a "Hello"-Screen while running in the debugger

  • Our project uses a GLKViewController subclass as main entry point

I have the same problem. Running Xcode 12.3 on OSX 10.15.7, while debugging a project on an iPhone X with iOS 14.3.
I'm currently trying to understand what is causing the issue because I have no problem with other projects. I'll update the answer if I find a solution.
I solved the rotation problem by locking and unlocking the device rotation from the control center of the iOS device while debugging the app.
So the steps are:
1) run your app with XCode
2) open control center in your device and lock the screen rotation, then unlock it again
3) close the control center and now the rotation should work
Unfortunately you have to repeat this every time...

Anyway this is just a workaround, I was hoping to find what was causing it in my code but I found no clues. I hope this trick is going to work for you too.
Same issue, iPhone 11 Pro - iOS 14.0.1 - Xcode 12.3

And the little "toggle screen lock" trick above doesn't work for me.

WTF
Same issue, iPhone 7 even...iOS 14.4 - Xcode 12.4.

The control center trick doesn't work either.

Thanks for this thread! I have lost 2 hours before finding it...
Found the solution.
  • Go to Product>Schemes>Manage Schemes

  • Select your scheme and click edit

  • Select the options tab for the run section

  • For 'GPU Frame Capture', select 'Metal' or 'disable'


Your solution worked like a charm seb10101010, thank you very much!
I guess your answer can be accepted as the right solution for this question.
iPhone with iOS 14 beta 2 doesn't autorotate when connected to XCode debugger
 
 
Q