I have an app almost ready to submit for distribution. It is a game with a fixed background view and a token that moves around on the fixed background. The token is moved by tilting the iPhone/iPad which is translated to movement based on CMMotionManager as roll and pitch readings. This simulates a flat level playing field with gravity pulling the token when the device is tipped.
The app works well only when the user has set the device to have Autorotate locked. The following code lets me sample the status of Autorate:
guard let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene else { return }
print("Orientation locked: ", windowScene.effectiveGeometry.isInterfaceOrientationLocked)
The problem is that I always get a reading of false regardless of whether Autorotate is locked or not. Can anyone help me understand.
Is this the wrong approach for getting this information?
If so, how is this achieved?
Thanks for your attention to this,
Mike Ricker