Search code examples
iosiphoneavfoundation

AVAssetWriter startSessionAtSourceTime: Cannot call method when status is 0


Well I happily discovered that my app crash on the version downloaded from the Apple AppStore whereas it never did before. looking at the log I get the exception

AVAssetWriter startSessionAtSourceTime: Cannot call method when status is 0

Obviously this error does not occur in debug mode. But it never did in release mode before in a code that was shipped with another app and available on the appStore.

Could it be the directoryForTemporaryFiles added in iOS 8 the responsible for this status 0 ?


Solution

  • Calling startWriting() method before startSessionAtSourceTime() should solve your problem.