Hi there!
I have the following problem:
I have a iOS game where the following needs to happen:
1) When the user gets a phone call the app should suspend, so that after the phone call he can pick up the game where he left it.
2) When the user presses the home button (to 'exit' the game) and later relaunches the game, it should start from the main menu (and NOT from the point where the user left the game).
Now, for facebook single-sign-on I need to set UIapplicationExitsOnSuspend = false, and this creates all kinds of problems. First of all, when the user presses the home button, the app doesn't exit. Using os.exit() doesn't do anything so that doesn't work to get the app to relaunch in the main menu after quitting it - you keep ending up in mid-game which sucks.
To make matters worse, the system event "ApplicationExits" doesn't register anymore when pressing the home button on iOS, so there's no way I can detect for that and make my game jump to the main menu in my code.
This is very frustrating. It seems only natural, and it is like this in 95 percent of games, that pressing the home button 'quits' the app, meaning that relaunching will take you to the home screen, but this seems impossible when you set "UIApplicationExitsOnSuspend = false". Well, you can write code that goes to the main menu on suspend, but then again that's what I don't want: suspend should leave the user in mid-game (so he can pick up where he left after a phone call) while the home buttons should quit, or do something that looks like the app ended (meaning that upon relaunch the app starts freshly from the main menu).
Any perspective on this? I'd hate to ditch single-sign-on for facebook just because there is no way to detect a home button press then.