1 decade ago by fulvio
I've included the following in my main game init:
I then call the following code later on in the game:
The problem is that as soon as the game starts up I get the following error.
gameCenter: null,
init: function() {
// Authorise Game Center.
this.gameCenter = new Ejecta.GameCenter();
this.gameCenter.authenticate(function(error) {
if (error) {
console.log('Game Center Auth failed');
} else {
console.log('Game Center Auth successful');
}
});
}
I then call the following code later on in the game:
if (this.gameCenter.authed) {
// Report Achievement 'bleh' with 100% completion.
this.gameCenter.reportAchievement('091238715292', 100, function(error) {
if (error) {
console.log('Reporting the achievement failed');
} else {
console.log('Achievement successfully reported');
}
});
}
The problem is that as soon as the game starts up I get the following error.
* Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES'
* First throw call stack:
(0x3b6ac3e7 0x36211963 0x3b6ac307 0x36e7a84f 0x3701ef21 0x36efecd5 0x36efdf63 0x3b6afad4 0x3b60728f 0x3701c0f3 0x339dde01 0x3462a793 0x3462a5db 0x3462de45 0x3b6801b1 0x3b5f323d 0x3b5f30c9 0x3b4de33b 0x36e66289 0xaedbb 0xaed60)
libc++abi.dylib: terminate called throwing an exception
