Is there any way to receive notification inside a running iOS App when the OS is about to update the same App so it can release resources?
The problem we currently encounter with an App is that when updating the running App (i.e. replacing it with a newer version of the App) through iTunes then the process stalls and the previous version of the App remains active.
This may be due to the fact that the active App is playing audio in the background at that moment.
So ideally I'd like to release resources and stop the audio playback when an update process for that App is started. How do I do that?
Here's a rough sketch of what's happening AFAIK:
- App in version 1 is installed and running, playing back audio
- New version of the IPA (version 2) is added to iTunes
- App is set to update, Device is set to sync
- Start Update of running App from iTunes
Symptoms:
- App update starts
- After a short time the App's icon stalls / stays in the "Installing..." progress state
- App cannot be started via this stalled App icon
- Previous version of the App is still running (i.e. audio is still playing back)
If I first end the running App and then start the update through iTunes everything is just fine (of course...)