- Home /
Run in background for iOS
What is the way to make iOS application run in background instead of reloading when it's called back? When I had only one scene, game continued from last frame, but now I have menu scene and level scene, I play my level scene, press home button, and when I call back application, it starts with splash screen and loads menu scene. Could I do something In Unity that changed this? Or is it XCode that makes this happen?...
Just found out that I had to change boolean in XCode info.plist to NO on "Application does not run in background".
If that's your answer, you should answer your own question so we know it's complete
Answer by Valdemars Magone · Apr 16, 2011 at 06:28 PM
Just found out that I had to change boolean in XCode info.plist to NO on "Application does not run in background"
Answer by Dreamora · Apr 16, 2011 at 09:43 PM
Just keep in mind that it won't remain playing there in the background. iOS might let it continue some time until it pauses it (no application can remain permanentely in background unless its VOIP, Media Player or GPS the rest can only get an "extended timeframe till pause") but it will definitely not remain there and there is no guarantee iOS does not pause it completely.
Generally by iOS specifications and guidelines you should treat each OnApplicationPause (thats what unity calls when the app gets paused / unpaused by iOS) as if you are going to be terminated if its pause true and store the state for later restoration
Answer by UnityDev291 · Oct 14, 2016 at 03:36 PM
See also iOS Player Settings -> Behaviour in Background which references example code:
Your answer
Follow this Question
Related Questions
Application Crashes On Launch - How To Fix? 0 Answers
How to get some background process time after OnApplicationPause 1 Answer
Keep unity running when minimized on iOS and Android 2 Answers
[URGENT] No background image on the logo showing while starting game on iOS 0 Answers
iOS camera/background images/planes 0 Answers