Regression Bug: media.show CRASHES landscape only apps on iOS 7 devices.

No response from Corona Labs to my previous report of this issue, so I’ll try again and include a simple, reproducible test case.

For landscape only oriented apps, attempting to open the native Photo Library or Camera will crash on iOS 7 devices (not iPad).  

For example, using this in build.settings to force landscape-only orientation

    orientation = {

        default = “landscapeRight”,

        supported = {“landscapeRight”,“landscapeLeft”,},

    },

    

Will cause this one line app to crash on iPhones and iPods running iOS 7 (built using latest daily build 2013.1225):

media.show( media.PhotoLibrary, sessionComplete)  

On the simulator and iPads running iOS 7 this won’t crash and will open the Photo Library picker.  On iOS 6 devices the crash can be prevented by using these Corona Labs provided workarounds in the plist of build.settings:

CoronaUseIOS6LandscapeOnlyWorkaround = true,

CoronaUseIOS6IPadPhotoPickerLandscapeOnlyWorkaround = true,

Unfortunately, these workarounds don’t function on devices running iOS 7.  This is especially bad because formerly working, live apps built with Corona will now crash after users upgrade to iOS 7.  I have already received customer complaints about it and expect to get more as more people upgrade to the latest iOS.  

I have filed a bug report, case 26694.  

-Stephen

Hi Stephen,

Thanks for your patience on this. I have emphasized its importance and engineering is addressing it now. The fix should be available in a daily build soon, so please check the release notes and watch for an update along these lines.

Best regards,

Brent

Thanks for the acknowledgment of the issue, Brent.  I do appreciate knowing it is at least on your guys’ radar.

-Stephen

I saw the notes for build 2013.1228 that said

 

  • iOS: Fixes issue with media.show for camera and photolibrary crashing on iOS 7 in landscape mode (iPhone/iPod)

I tested this build with both my app and the one line test app above and unfortunately I still get a crash when trying to open the photolibrary or camera.  The xcode console has the same error message as before:

 <Error>: *** Terminating app due to uncaught exception ‘UIApplicationInvalidInterfaceOrientation’, reason: ‘Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES’

Thanks for looking into this.

-Stephen

Are you using CoronaUseIOS 7 LandscapeOnlyWorkaround?

Notice that its 7 instead of 6,

Thanks, dchan, that was it.  I had it as 6 instead of 7. (that change wasn’t documented in the daily notes)

FYI, I searched the docs and couldn’t find anything on the landscape only workarounds, so this might be another undocumented feature.  

Thanks for the quick fix.

-Stephen

Thanks Stephen for the info.

I was already using daily build  2013.1228 and the bug was still happening because was not using that flag.

Corona, please add the info of the need of CoronaUseIOS 7 LandscapeOnlyWorkaround in the daily build note.

Renato

Wow, that was fast. Thanks Corona.

Hi Stephen,

Thanks for your patience on this. I have emphasized its importance and engineering is addressing it now. The fix should be available in a daily build soon, so please check the release notes and watch for an update along these lines.

Best regards,

Brent

Thanks for the acknowledgment of the issue, Brent.  I do appreciate knowing it is at least on your guys’ radar.

-Stephen

I saw the notes for build 2013.1228 that said

 

  • iOS: Fixes issue with media.show for camera and photolibrary crashing on iOS 7 in landscape mode (iPhone/iPod)

I tested this build with both my app and the one line test app above and unfortunately I still get a crash when trying to open the photolibrary or camera.  The xcode console has the same error message as before:

 <Error>: *** Terminating app due to uncaught exception ‘UIApplicationInvalidInterfaceOrientation’, reason: ‘Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES’

Thanks for looking into this.

-Stephen

Are you using CoronaUseIOS 7 LandscapeOnlyWorkaround?

Notice that its 7 instead of 6,

Thanks, dchan, that was it.  I had it as 6 instead of 7. (that change wasn’t documented in the daily notes)

FYI, I searched the docs and couldn’t find anything on the landscape only workarounds, so this might be another undocumented feature.  

Thanks for the quick fix.

-Stephen

Thanks Stephen for the info.

I was already using daily build  2013.1228 and the bug was still happening because was not using that flag.

Corona, please add the info of the need of CoronaUseIOS 7 LandscapeOnlyWorkaround in the daily build note.

Renato

Wow, that was fast. Thanks Corona.

In iOS 7.1 this is again not working, also not with:

CoronaUseIOS7IPadPhotoPickerLandscapeOnlyWorkaround = true,

CoronaUseIOS6IPadPhotoPickerLandscapeOnlyWorkaround = true,

CoronaUseIOS7LandscapeOnlyWorkaround = true,

CoronaUseIOS6LandscapeOnlyWorkaround = true,

Open the camera = immediate crash

It only works with portrait enabled, which makes my app useless!

I don’t expect any reponse anyhow from Corona staff, there is no support whatsoever and this annoying bug will remain forever, like always with Corona. 

Hi @RLRL,

Others are seemingly not having any issues with this, so we’d need an official bug report which shows it clearly happening, and on which device(s).

Brent

The latest daily build and compile for 7.1 beta fixes the issue. However it does break my current app for users that have been updated to iOS 7.1 on iPhone 4S.

Ugh.  Same issue here, previously working apps on existing users’ devices are now crashing when opening the camera and/or photo library on iPhones upgraded to iOS 7.1.

This “workaround” seems pretty kludgy if you ask me.  Weird syntax, stops working and breaks published apps whenever there’s a major (or now point) upgrade to iOS.  Corona Labs has to create a new workaround each time it breaks (why does it keep falling through CL’s regression testing cracks?), and now I have to drop everything and push out an update on an existing app. Surely there must be a better way to fix this?

It seems others *do* have issues with this.