【发布时间】:2017-02-01 05:28:34
【问题描述】:
AVAssetExportSession 在 iPhone 6 及更低版本上运行良好,但在 iPhone 7、iPhone 7 Plus 模拟器上无法正常运行。 Xcode 8.0
exportSession 中的这段代码return nil 在 iPhone 7 - Plus 模拟器上执行,但在 iPhone SE、iPhone 6s ... 模拟器中不执行。请查看以下代码以获取更多信息。
NSURL *inputURL = [[NSBundle mainBundle] URLForResource: @"example" withExtension:@"m4a"];
AVURLAsset *assetAV = [AVURLAsset URLAssetWithURL:inputURL options:nil];
AVAssetExportSession *exportSession = [[AVAssetExportSession alloc] initWithAsset:assetAV presetName:AVAssetExportPresetAppleM4A];
NSAssert(exportSession != nil, @"AVAssetExportSession must not be nil");
是雷达还是我遗漏了什么?
示例项目位于:
https://github.com/rafaelpereznajera/AVAssetExportSessionRadar
【问题讨论】:
-
iPhone 7 是否包含示例文件?
-
是的,文件退出,在 iPhone 6 上运行良好。您可以在 github 上查看示例项目。
-
这似乎坏了。虽然
AVAssetExportPresetPassthrough有效...
标签: ios objective-c ios-simulator avfoundation