I am using UIImagePickerController to capture video. I have set the delegate to save the captured video when video capture is stopped. The delegate does get called when stopVideoCapture is called by the program based on user action.
I would like the same actions to also happen if while video capture is in progress the user presses the home button to terminate the app.
I tried adding call stopVideoCapture in applicationWillTerminate but for some reason the delegate action to save the video is not being called. The imagePickerController delegate is a separate view controller and not the UIApplicationDelegate.