问题
I tried to manage AVAssetExportSession working when app in background. I have iOS 6 device and testing it there. So i m making audio mix and trying to export audio. When app is in foreground i m making all OK, but if i m going to background i m getting AVAssetExportSessionStatusFailed and have to create it from beginning. So, is it ever possible to make audio mixing work in background?
I m trying to make [exportSession exportAsynchronouslyWithCompletionHandler: ] in NSOperationQueue or getting global queue - but the results is the same - it stops when app going in background and sending failed afterwards.
Does anyone have an example with AVAssetExportSession working in background?
回答1:
I have found a solution which works for audio, I have not tried video
If you update your "Background Modes" setting in the capabilities of the project to include Audio. It will allow the export.
This is intended for playing music in the background.
---- Edit ---
This also works for video
来源:https://stackoverflow.com/questions/24123907/avassetexportsession-working-in-background