我正在使用 requestExportSessionForVideo 方法从 PHAsset 获取可发送视频,但我收到此警告,并且导出会话记录了一个空值:
Null passed to a callee that requires a non-null argument
这是方法调用:
[manager requestExportSessionForVideo:asset options:videoOptions exportPreset:AVAssetExportSessionStatusUnknown resultHandler:^(AVAssetExportSession * _Nullable exportSession, NSDictionary * _Nullable info) {
NSLog(@"Export session is: %@ ///// Info is %@", exportSession, info);
}];
但是,打印的信息看起来不错:
Info is {
PHImageFileSandboxExtensionTokenKey = "8b504346993c71de48743d3c9c796385d7911ad2;00000000;00000000;000000000000001b;com.apple.avasset.read-only;00000001;01000002;00000000000468eb;/private/var/mobile/Media/DCIM/100APPLE/IMG_0004.MOV";
PHImageResultDeliveredImageFormatKey = 20000;
PHImageResultIsInCloudKey = 0;
PHImageResultWantedImageFormatKey = 20000;
}
如何从 PHAsset 中获取可以发送到云容器的视频对象?这个警告会影响输出吗?请注意,我的资产是使用 GMImagePicker 选择的。