Comment by kccqzy

Comment by kccqzy 6 days ago

3 replies

Prior to true multitasking on iOS, Apple would tell you to tag view controllers for preservation so that when your app launches, the OS will restore the original view controllers, as if the app has been running the whole time. Old documentation here: https://developer.apple.com/library/archive/featuredarticles...

(These days few apps bother to do this anymore. I switch away from an app in a minute and upon switching back I'm back at the app's home screen.)

jerf 6 days ago

w.r.t. few apps caring about state, I recently upgraded my phone, which I had been using for a while and did not realize was a 2021 model, basically solely because at 4GB of RAM, I was getting to the point that I couldn't switch between any two apps without them all totally restarting on every switch because I was out of RAM all the time. I was also just starting to notice the battery was going but I could have managed that for a while yet... I really upgraded just for the RAM.

(Also I had to reset the built-in camera to factory state and tell it to stop updating, because it couldn't even start with my phone's RAM anymore. Weird thing is I can't tell you what it was doing any better than the stock factory version.)

But on, ahem, a "real" phone, it is nice to just assume that either I'm still swapped in, or the user doesn't care anymore. It's not quite 100% accurate, but it's pretty close, and low-effort for the app developer who doesn't have to be guessing any more about what state is and is not important.