Upon testing my app, the app continues from where I left off even after I close the app. I know this answer has been posted somewhere I just can’t find it. Thanks in advance!
Hi
Yes this is due to the multitasking feature of IOS 4.0 +
If you want to restart your app afresh manually you can double press the home button and delete your app from the multitasking tray.
If you want it to always exit and close completely automatically you can add the following key value UIApplicationExitsOnSuspend = TRUE in the Info.plist file in XCODE. Make sure when you select the type for the value it should be a boolean
Note: when you close your app it basically gets put into a suspended state and you can manage it with this code in one of your scripts for when you close it and when it gets un-suspended again (see below):
// Unity is paused by the IOS
function OnApplicationPause (pauseState : boolean)
{
if (pauseState == true)
{
// paused
}
else
{
// unpaused, ... game resumes
}
}
I hope this answers your question
Dean
Aw thanks man! you just taught me how to use IOS 4 I had no idea about the multitasking feature. You nailed it. On my old iphone it shut down fine in 3.1.2… I had every application open that I ever opened.
Here’s some relevant links to this issue which explain that unity doesn’t support multitasking yet, … the app just gets suspended: