applicationWillTerminate to wrap up Background Recording

Hello together,

the user is able to do recordings with my app. The recordings also runs, while the App is in Background.

I have Background Modes Audio & Background enabled.

When the user accidentally terminates the App while the recording is still running, the whole recording is lost.

I tried AppDelegate applicationWillTerminate on my iOS 26 App and it works perfectly to wrap up the LiveActivity that is shown while the recording is active. But it does not save the Audio and also doesn't update the Widgets (they are interactive and show a different state while recording and stay stuck in recording-state on accidental termination).

Any ideas?

Best wishes, Dominik

I’d like to clarify what you mean by this:

I tried AppDelegate applicationWillTerminate … and it works perfectly to wrap up the LiveActivity

So your -applicationWillTerminate: method is getting call, right?

But it does not save the Audio

Isn’t that a ‘you’ problem? I mean, the system has notified you of termination, and that’s its job done. If you don’t correct save the audio, that’s something for you to debug. Right?

Or am I missing something here?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

applicationWillTerminate to wrap up Background Recording
 
 
Q