i have create one recording application, but user switch off or kill the application, so that time how to save ongoing record.
App Terminate Save Record
There isn't a guarantee and you likely get very little time. It might be better to leave the recording in a reasonable state. This might help... https://stackoverflow.com/questions/68911874/how-to-detect-when-a-user-terminates-an-app-swift