A live app that was built previously for iOS 6 is now crashing for my customers who have installed iOS 7 and try to use a feature of my app that lets them use a photo from their library or taken as a snapshot from the camera. I verified the crash by testing on an iPhone 5 device upgraded to iOS 7. Here is the error that is logged in the console at the moment of crash:
Sep 30 19:22:12 SBL-iPhone5 BGJournal[159] <Warning>: Snapshotting a view that has not been rendered results in an empty snapshot. Ensure your view has been rendered at least once before snapshotting or snapshot after screen updates.
Sep 30 19:22:12 SBL-iPhone5 BGJournal[159] <Error>: *** Terminating app due to uncaught exception ‘UIApplicationInvalidInterfaceOrientation’, reason: ‘Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES’
My app is landscape only. At the time I made the app there were issues with landscape only apps and using the photo library and I had to add these special Corona iOS 6 crash workarounds to the plist of build.settings
CoronaUseIOS6LandscapeOnlyWorkaround = true, --part of new Corona workaround for iOS 6 crash CoronaUseIOS6IPadPhotoPickerLandscapeOnlyWorkaround = true, --part of new Corona workaround for iOS 6 crash
Given their naming I’m guessing these were probably ugly hacks that no longer work in iOS 7, and in fact are crashing apps built using them that are now running on iOS 7.
Since the app is live I need to be speedy with the delivery of a fix to my customers, so I’d appreciate some quick guidance from any Corona Labs folks who might know if these could be causing my crash, and if so what I need to do to make my app work on iOS 7.
-Stephen
EDIT:
FYI, here’s a link to Walter’s blog post from last year regarding the iOS 6 workarounds
http://www.coronalabs.com/blog/2012/10/09/ios-6-game-center-and-landscape-orientation/