Hi Lori,
In most cases, when the user “suspends” the app (presses the home button or turns off the device entirely) the app should remain in a backgrounded/suspended state (those two terms being the same thing in this context). The user would not typically expect the app to restart entirely upon being backgrounded, although that might be logical in some cases, which is why the non-default option exists in the build settings file.
Now about your questions:
-
At any time, the OS reserves the right to quit/restart an app that is in the background. This usually happens because the user has opened several other apps since the suspension of that app, and/or the OS needs to allocate more memory toward the currently active app or toward apps that were opened more recently. That’s why, if saving state is important to your game, you should consider this very real possibility and handle the “applicationExit” state as mentioned in that tutorial.
-
I guess I answered this one in #1. You don’t need to save state on the “applicationSuspend” state, only on the “applicationExit” state. In mirror image, you would then ignore reading/restore of that saved state info on the “applicationResume” state, and instead handle it on “applicationStart”.
Hope this helps,
Brent