在后台启动AVAssetExportSession

Dex*_*Dex 9 avfoundation ios avassetexportsession

我的应用程序做了一些处理,在某些时候它需要调用AVAssetExportSession.

如果会话已经开始,然后我对应用程序进行后台处理,一切都正常完成.不过,如果我的背景之前调用应用程序exportAsynchronouslyWithCompletionHandler.我收到此错误:

AVAssetExportSessionStatusFailed Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo=0x1e550db0 {NSLocalizedFailureReason=An unknown error occurred (-12985), NSUnderlyingError=0x1e574910 "The operation couldn’t be completed. (OSStatus error -12985.)", NSLocalizedDescription=The operation could not be completed}

是否可以在后台启动AVAssetExportSession?

Dex*_*Dex 5

实际上,由于您无法在后台启动新线程,因此无法实现.如果你想在后台做很多事情,你必须在app背景之前异步启动它们.