Live app built for iOS 6 now crashing on iOS 7

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

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CoronaUseIOS6LandscapeOnlyWorkaround = true, --part of new Corona workaround for iOS 6 crash &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CoronaUseIOS6IPadPhotoPickerLandscapeOnlyWorkaround = true, --part of new Corona workaround for iOS 6 crash &nbsp;

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/

Just tested on an iPad 2 upgraded to iOS 7 and my app does not crash.  So the crash appears to only affect iPhones (and I assume iPod touches) upgraded to iOS 7.

I tried rebuilding the app using Corona iOS 7.0 beta with daily build 1210 and got the same crash when trying to open the camera or image library on an iPhone.  It’s a landscape only app and here is a partial look at the build.settings I’m using:

settings =&nbsp; { &nbsp; &nbsp; plugins =&nbsp; &nbsp; &nbsp; { &nbsp; &nbsp; &nbsp; &nbsp; ["CoronaProvider.analytics.flurry"] = { publisherId = "com.coronalabs", },&nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; orientation = --part of new Corona workaround for iOS 6 crash &nbsp; &nbsp; { &nbsp; &nbsp; &nbsp; &nbsp; default = "landscapeRight", &nbsp; &nbsp; &nbsp; &nbsp; supported = {"landscapeRight","landscapeLeft",}, &nbsp; &nbsp; }, &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; iphone =&nbsp; &nbsp; &nbsp; { &nbsp;&nbsp;&nbsp;&nbsp;plist =&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; { &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CoronaUseIOS6LandscapeOnlyWorkaround = true, --part of new Corona workaround for iOS 6 crash. &nbsp;DOESN'T WORK ON iOS 7! &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CoronaUseIOS6IPadPhotoPickerLandscapeOnlyWorkaround = true, --part of new Corona workaround for iOS 6 crash. DOESN'T WORK ON iOS 7! &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UIPrerenderedIcon = true, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UIStatusBarHidden = true, . . . &nbsp;

I tried with and without the workarounds in the plist and still got the crash on my iOS 7 phone.

Looking back at Walter’s post on these workarounds it seems that these were implemented in anticipation that Apple would fix whatever bugs were causing the crash in a dot release of iOS 6, so the workarounds were designed to only work with iOS 6. But it looks like Apple didn’t fix the problem even into iOS 7, and the workarounds Corona Labs devised, while backwards compatible to iOS 5, are not forward compatible to iOS versions beyond 6.

Any guidance from CoronaLabs would be appreciated.

Any news regarding that topic?

Yes, this issue has been fixed as of daily build 2013.1228 by adding these lines to the plist in build.settings:

            CoronaUseIOS7LandscapeOnlyWorkaround = true,

            CoronaUseIOS7IPadPhotoPickerLandscapeOnlyWorkaround = true,

Note that the old version of these workarounds were “CoronaUseIOS6…”, so if you’re already using them just change ‘6’ to ‘7’.

I ssume we should add this on top of iOS6 workaround and not replace, since it should still support people with OS6.

@rune7, I think you only need the iOS7 workaround.  I tested it on an iOS6 device and it still worked.

I hope corona staff can be clearer on such issue, as I have a few apps using this and would like to avoid edge cases. I only have one iOS device to test on, so I’m a bit in the dark when OS dependant fixes are made. for my current submission, I’ve left both, in the hope that it will not make it worse for one of the OS versions.

Just tested on an iPad 2 upgraded to iOS 7 and my app does not crash.  So the crash appears to only affect iPhones (and I assume iPod touches) upgraded to iOS 7.

I tried rebuilding the app using Corona iOS 7.0 beta with daily build 1210 and got the same crash when trying to open the camera or image library on an iPhone.  It’s a landscape only app and here is a partial look at the build.settings I’m using:

settings =&nbsp; { &nbsp; &nbsp; plugins =&nbsp; &nbsp; &nbsp; { &nbsp; &nbsp; &nbsp; &nbsp; ["CoronaProvider.analytics.flurry"] = { publisherId = "com.coronalabs", },&nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; orientation = --part of new Corona workaround for iOS 6 crash &nbsp; &nbsp; { &nbsp; &nbsp; &nbsp; &nbsp; default = "landscapeRight", &nbsp; &nbsp; &nbsp; &nbsp; supported = {"landscapeRight","landscapeLeft",}, &nbsp; &nbsp; }, &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; iphone =&nbsp; &nbsp; &nbsp; { &nbsp;&nbsp;&nbsp;&nbsp;plist =&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; { &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CoronaUseIOS6LandscapeOnlyWorkaround = true, --part of new Corona workaround for iOS 6 crash. &nbsp;DOESN'T WORK ON iOS 7! &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CoronaUseIOS6IPadPhotoPickerLandscapeOnlyWorkaround = true, --part of new Corona workaround for iOS 6 crash. DOESN'T WORK ON iOS 7! &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UIPrerenderedIcon = true, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UIStatusBarHidden = true, . . . &nbsp;

I tried with and without the workarounds in the plist and still got the crash on my iOS 7 phone.

Looking back at Walter’s post on these workarounds it seems that these were implemented in anticipation that Apple would fix whatever bugs were causing the crash in a dot release of iOS 6, so the workarounds were designed to only work with iOS 6. But it looks like Apple didn’t fix the problem even into iOS 7, and the workarounds Corona Labs devised, while backwards compatible to iOS 5, are not forward compatible to iOS versions beyond 6.

Any guidance from CoronaLabs would be appreciated.

Any news regarding that topic?

Yes, this issue has been fixed as of daily build 2013.1228 by adding these lines to the plist in build.settings:

            CoronaUseIOS7LandscapeOnlyWorkaround = true,

            CoronaUseIOS7IPadPhotoPickerLandscapeOnlyWorkaround = true,

Note that the old version of these workarounds were “CoronaUseIOS6…”, so if you’re already using them just change ‘6’ to ‘7’.

I ssume we should add this on top of iOS6 workaround and not replace, since it should still support people with OS6.

@rune7, I think you only need the iOS7 workaround.  I tested it on an iOS6 device and it still worked.

I hope corona staff can be clearer on such issue, as I have a few apps using this and would like to avoid edge cases. I only have one iOS device to test on, so I’m a bit in the dark when OS dependant fixes are made. for my current submission, I’ve left both, in the hope that it will not make it worse for one of the OS versions.