Starting in iOS13 in beta 5 or 6, we started to see this exception when using our store view controller: "SKStoreProductViewController May not be subclassed.", and the store fails to load. This is a problem because without being able to subclass SKStoreProductViewController, then we run into a crash on apps that are configured for landscape only.
Steps:
- Configure app to support device orientations of landscape left and landscape right
- Try to display SKStoreProductViewController on devices such as iPhone XS Max, iPhone XR, iPhone 8, etc
- You will receive a crash because the store view prefers to be displayed in portrait, but portrait is not a supported orientation of the app:
"Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES'"
The only way around this crash previously was to subclass SKStoreProductViewController to set shouldAutorotate to NO. Is it expected that we are no longer able to subclass SKStoreProductViewController? This restriction didn't exist in earlier betas and only happened more recently. If this is an expected change, then what is the workaround for the orientation crash?