5

I would like to know what state is the app in when an app updates.

For example: Lets say we have an app running (called Le Music) that is playing music in background mode.

Now we go to the store and see there is an update available and we tap update. What is the life cycle on the current version of Le Music during the transition from old version of the app to the new version

Bhavik P.
  • 905
  • 3
  • 10
  • 28
  • Why don't you test this yourself? Add some logging messages in some of the relevant application delegate methods. Run your app through Xcode. Getting it running as desired. Now do another build through Xcode. Review the relevant log messages from the device console to see what happened. – rmaddy Mar 24 '17 at 14:40
  • Yea, I am doing that regardless. I was hoping someone on the net had a reference article that I can read up on to know what is going on. – Bhavik P. Mar 24 '17 at 14:44

1 Answers1

4

Your app will be replaced. That means it will be terminated. You are running in the background ex hypothesi, so the only event you might hope to get is applicationWillTerminate. (However, I wouldn't count on it: see this answer.) If you were in the background but not running, you wouldn't get any event at all.

Community
  • 1
  • 1
matt
  • 515,959
  • 87
  • 875
  • 1,141