iOS 6 Orientation Crash

That workaround does not work. If I have

orientation = {  
 default = "landscapeRight",  
 content = "landscapeRight",  
 supported = { "landscapeRight", "portrait" },  
},  

then all my content displays in landscapeRight and portrait. I am using no native display objects, just Corona, and those non-native display objects rotate too. This is using build 2012.926. [import]uid: 105445 topic_id: 31056 reply_id: 126312[/import]

If that’s all you have in your build.settings, it won’t work. This is what I have in my build.setting file and it works fine for me.

[code]
settings = {
orientation =
{
default = “landscapeRight”,
content = “landscapeRight”,
supported = { “landscapeRight”, “portrait” },
},
iphone =
{
plist=
{
CFBundleIconFile = “Icon.png”,
CFBundleIconFiles = {
“Icon.png”,
“Icon@2x.png”,
“Icon-72.png”,
},

CFBundleIdentifier = “com.appledts.GKTapper”, – Apple’s GameCenter Example (GKTapper)
},
components = {} – no openfeint
–components = { “openfeint” } – for openfeint & gamecenter
}
}
[/code] [import]uid: 7559 topic_id: 31056 reply_id: 126326[/import]

I noticed in today’s FAQ Wednesday:

“…Note that the content = “landscapeRight” line. Corona limits this setting to only one orientation…”

From this i gather I can’t use this workaround and support both landscapeRight and landscapeLeft. But it gives my app an amateurish feel to only support a single, fixed orientation, so I’m wondering if this is something that can by addressed by Coronalabs, at least until Apple fixes their bug. Basically i’d like “content” to support more than one orientation, just like “supported” does. [import]uid: 9422 topic_id: 31056 reply_id: 126327[/import]

@Tom,

Of course that’s not everything. Here’s everything (minus a few bits that are not iOS-rotation-related; it can build without the omitted bits).

settings =  
{  
 orientation =  
 {  
 default = "landscapeRight",  
 supported =  
 {  
 "landscapeRight",  
 "landscapeLeft"  
 },  
 },  
 iphone =  
 {  
 plist =  
 {  
 components = {},  
 CFBundleVersion = "66",  
 CFBundleIdentifier = "com.playgearz.toss",  
 CFBundleIconFile = "Icon.png",  
 CFBundleIconFiles = {  
 "Icon.png" ,   
 "Icon@2x.png" ,   
 "Icon-72.png" ,   
 "Icon-Small.png" ,   
 "Icon-Small-50.png" ,   
 "Icon-Small@2x.png"  
 },  
 UIInterfaceOrientation = "UIInterfaceOrientationLandscapeRight",  
 UISupportedInterfaceOrientations = {  
 "UIInterfaceOrientationLandscapeRight",  
 "UIInterfaceOrientationLandscapeLeft"  
 },  
 UIApplicationExitsOnSuspend = false,  
 UIStatusBarHidden = true  
 },  
 }  
}  
  
settings.iphone.plist["UIInterfaceOrientation~ipad"] = "UIInterfaceOrientationLandscapeLeft"  
settings.iphone.plist["UISupportedInterfaceOrientations~ipad"] =   
{  
 "UIInterfaceOrientationLandscapeRight",  
 "UIInterfaceOrientationLandscapeLeft"  
}  

I replaced the orientation part with…

orientation = {  
 default = "landscapeRight",  
 content = "landscapeRight",  
 supported = { "landscapeRight", "portrait" },  
},  

…and it made everything rotate into portrait.

Note that I did not change the UISupportedInterfaceOrientations or settings.iphone.plist[“UISupportedInterfaceOrientations~ipad”] parts, just the “orientation” section. Changing just the “orientation” section, by itself, made non-native content rotate into portrait. (It also prevented the content from rotating into landscapeLeft, but that was expected.)

As with Stephen, we need this to work for landscapeLeft and landscapeRight - but first we need this to work, period, and it does not. [import]uid: 105445 topic_id: 31056 reply_id: 126328[/import]

We like some of the fixes from latest builds, however, we can’t use it since iOS 6 workarounds provided so far are not acceptable or practical for our release (native text fields rotating 90 degrees to portrait).

Is there a way, we could build the latest for iOS 5.1 as well till we get iOS 6 issues resolved? [import]uid: 48484 topic_id: 31056 reply_id: 126547[/import]

I don’t think going back to 5.1 is a good idea since the majority of the devices have upgraded to iOS 6 already (I saw this stat somewhere but forgot where exactly).

CoronaLabs, we need that orientation update! [import]uid: 144908 topic_id: 31056 reply_id: 126548[/import]

Tom, can we just configure GameCenter not to show SignIn dialog?
If the user is already signed-in she can just continue playing with GC enabled.
If not, our app is notified with the new event.type, so we can show a message to tell the user to go to GC App and sign in if she wants to use GC.
However with all we have now we can’t stop sign in dialog to appear and result in crash.
The only missing piece is the ability to disable just the sign in dialog. [import]uid: 132466 topic_id: 31056 reply_id: 126606[/import]

Hi all, as you can probably imagine, our engineers have been pulling their hair about how to resolve this in an elegant and effective way.

It’s a tricky problem, especially since we’re trying to solve it in a way that addresses everyone’s use case, not just one person’s.

We have a stopgap in place, but we know it’s not perfect.

We took a step back late Friday to see if we could come up with something better. Will update when we have something solid to share.

walter
[import]uid: 26 topic_id: 31056 reply_id: 126656[/import]

Thanks!
We appreciate your efforts and have our fingers crossed waiting for a solution.

Anthony [import]uid: 87194 topic_id: 31056 reply_id: 126663[/import]

Add my name to list of people who need a fix! As with others who are using landscape mode, I think that restricting orientation to Landscape right will not go down well with reviewers and users, particularly on the iPad.

So it seems we have a choice: do not support Game Center and get scored down for not supporting it, or do not support the standard orientations, and get scored down!

Great support, Corona team so far, but we need a fix!!

Maybe I’m over-simplifying the issue, but I cannot see why portrait mode cannot be restricted from available orientations, except when game center is invoked.

Anthony [import]uid: 87194 topic_id: 31056 reply_id: 126479[/import]

I also need a fix for the orientation stuck in only 1 orientation. I just released a game yesterday and got a 1-star review just because it doesn’t rotate!! [import]uid: 144908 topic_id: 31056 reply_id: 126493[/import]

bfintal,

Exactly my point.
Come on, Corona, don’t hide behind Apple! Apply some resource here because we know you can fix it! How many great apps will be on hold until we have a fix?

Anthony [import]uid: 87194 topic_id: 31056 reply_id: 126506[/import]

– also posted as separate thread on daily builds
Hi,
Version 2012.928 (2012.10.4)

Two new issues with game center on IOS 6: shows up on Xcode simulator and device (iPhone4)

  1. Lauch app, press home button during game center activity; relaunch app. App crashes. Launch app for second time, no issue. I’m using all the recommended fixes for the game center orientation Apple bug. Has anyone else experienced this ? I have UIApplicationExitsOnSuspend = true

  2. To get around the annoying game center log-in box the first time you launch an app, I am only calling gameNetwork.init() when the user touches a “game center” button from within the game.
    I then call gameNetwork.show() from within the initCallback() function
    The issue is that if there is no internet connection, initCallback() is not called at all. So the user will press the “game center” button and get nothing. What is needed is a callback to indicate that login failed. Or even better a function to report whether the user is logged in (without invoking the log-in screen!)

CoronaLabs, any advice or ideas? Hopefully these can be incorporated into the use-cases you are looking at now.

Anthony [import]uid: 87194 topic_id: 31056 reply_id: 126728[/import]

We like some of the fixes from latest builds, however, we can’t use it since iOS 6 workarounds provided so far are not acceptable or practical for our release (native text fields rotating 90 degrees to portrait).

Is there a way, we could build the latest for iOS 5.1 as well till we get iOS 6 issues resolved? [import]uid: 48484 topic_id: 31056 reply_id: 126547[/import]

I don’t think going back to 5.1 is a good idea since the majority of the devices have upgraded to iOS 6 already (I saw this stat somewhere but forgot where exactly).

CoronaLabs, we need that orientation update! [import]uid: 144908 topic_id: 31056 reply_id: 126548[/import]

Tom, can we just configure GameCenter not to show SignIn dialog?
If the user is already signed-in she can just continue playing with GC enabled.
If not, our app is notified with the new event.type, so we can show a message to tell the user to go to GC App and sign in if she wants to use GC.
However with all we have now we can’t stop sign in dialog to appear and result in crash.
The only missing piece is the ability to disable just the sign in dialog. [import]uid: 132466 topic_id: 31056 reply_id: 126606[/import]

Hi all, as you can probably imagine, our engineers have been pulling their hair about how to resolve this in an elegant and effective way.

It’s a tricky problem, especially since we’re trying to solve it in a way that addresses everyone’s use case, not just one person’s.

We have a stopgap in place, but we know it’s not perfect.

We took a step back late Friday to see if we could come up with something better. Will update when we have something solid to share.

walter
[import]uid: 26 topic_id: 31056 reply_id: 126656[/import]

Thanks!
We appreciate your efforts and have our fingers crossed waiting for a solution.

Anthony [import]uid: 87194 topic_id: 31056 reply_id: 126663[/import]

Here is an update …

I just tried 2012.930 build on both iPad 3 and iPhone 4 running iOS 6.

Our landscape only app has no game center integration, we have native text fields and photo picker functionalities.

Photo picker

  • Works fine on iPhone 4 (native text fields not rotating to portrait now)
  • Crash on iPad 3 (photo picker doesn’t work)

Based on this, I think the fix is required on iPad 3 as well.

Or, is there any iPad specific settings that needs to be applied?

Thanks a lot for working on this issue. [import]uid: 48484 topic_id: 31056 reply_id: 126897[/import]

I tried the new fix incorporated in daily build 2012.930 and can confirm opening the photo picker on an iPad 2 will crash. It does not crash on an iPhone 4 (and the photo picker opens in portrait orientation as expected). [import]uid: 9422 topic_id: 31056 reply_id: 126908[/import]