I am encountering some issues with a ReplayKit Broadcast Extension I am using to broadcast my screen.
I believe iOS is killing it under certain circumstances (e.g. when I sometimes lock the screen); my Broadcast Extension is not being notified of this, and does not have the chance to clean up after itself, causing problems for my application.
Does iOS notify the app extension somehow that it is going to get killed, similar to how applications are notified via UIApplicationWillTerminateNotification
? In my testing, that callback doesn't fire if one observes it from the app extension itself.
Alternatively, is there a way to know from the application that the app extension has been killed?