gameNetwork.init( "gamecenter", initCallback ) Crahes XCode Simulator - Corona Simulator

Hey all,

Title says everything. I use latest stable build (Build 2012.971). When I try to init game center:

gameNetwork.init( "gamecenter", obj.gameCenterEvent)  

This is the callback:

obj.gameCenterEvent = function(event)  
 native.showAlert( "Return", json.encode( event.data ), { "OK" } )  
end  

I see nothing. When I comment the callback lines again nothing changes. It always crashes on device and also on XCode Simulator.

Any thoughts? [import]uid: 5629 topic_id: 33575 reply_id: 333575[/import]

This is almost certainly because you need to add CoronaUseIOS6LandscapeOnlyWorkaround = true, into your build.settings.

Read this for more info:
http://www.coronalabs.com/blog/2012/10/09/ios-6-game-center-and-landscape-orientation/

Corona team: I think this should probably be documented better. [import]uid: 135827 topic_id: 33575 reply_id: 133423[/import]

Good response @george18.

Is this a landscape only game you’re building?

Do you see any specific messages in the console log from the device? Or from the “Console” app on your Mac?
[import]uid: 199310 topic_id: 33575 reply_id: 133425[/import]

Thank you @george18!

@Rob yes. It’s only landspace app. And in console it says:

\*\*\* Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES'  

I didn’t see that blog post so I didn’t understand what the console says. It should really documented better. [import]uid: 5629 topic_id: 33575 reply_id: 133427[/import]

This is almost certainly because you need to add CoronaUseIOS6LandscapeOnlyWorkaround = true, into your build.settings.

Read this for more info:
http://www.coronalabs.com/blog/2012/10/09/ios-6-game-center-and-landscape-orientation/

Corona team: I think this should probably be documented better. [import]uid: 135827 topic_id: 33575 reply_id: 133423[/import]

Good response @george18.

Is this a landscape only game you’re building?

Do you see any specific messages in the console log from the device? Or from the “Console” app on your Mac?
[import]uid: 199310 topic_id: 33575 reply_id: 133425[/import]

Thank you @george18!

@Rob yes. It’s only landspace app. And in console it says:

\*\*\* Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES'  

I didn’t see that blog post so I didn’t understand what the console says. It should really documented better. [import]uid: 5629 topic_id: 33575 reply_id: 133427[/import]