Failed to initialize an AVAssetExportSession (iPhone XS, XR, XMax)

408 views Asked by At

When I instantiate an AVAssetExportSession object in new simulators instance with either of the 2 methods:

AVAsset *videoAsset = [AVAsset assetWithURL:videoURL];
AVAssetExportSession *exporter =  [AVAssetExportSession exportSessionWithAsset:asset presetName:AVAssetExportPresetHighestQuality];

or

AVAssetExportSession *exporter = [[AVAssetExportSession alloc] initWithAsset:asset presetName:AVAssetExportPresetHighestQuality];

and, run the app on one of the 3 new simulators: iPhone XR, iPhone XS, and iPhone XS MAX, I got exporter = nil, whereas on all other simulators I got a normal non null exporter object.

I also noticed that ONLY when I set the presetName parameter to be AVAssetExportPresetPassthrough, the exporter is not nil. Any other presetName will make the initialization to fail.

Anyone has encountered the similar problems?

1

There are 1 answers

0
Sterling On BEST ANSWER

Apparently it's an apple bug... https://bugreport.apple.com/web/?problemID=44701489 Will report back once the original bug is closed.

EDIT: This issue has been fixed by Apple in iOS 10.1 SDK. You just update your xcode to 10.1.