1
我正在使用下面的代碼將視頻保存到照片庫。iOS 9 PHAssetChangeRequest creationRequestForAssetFromVideoAtFileURL:失敗,錯誤代碼爲-1
NSString *ss = [finalVideoURL path];
__block PHObjectPlaceholder *placeholder;
[[PHPhotoLibrary sharedPhotoLibrary] performChanges:^{
PHAssetChangeRequest* createAssetRequest = [PHAssetChangeRequest creationRequestForAssetFromVideoAtFileURL:[NSURL fileURLWithPath:ss]];
_placeholder = [createAssetRequest placeholderForCreatedAsset];
} completionHandler:^(BOOL success, NSError *error) {
if (success)
{
NSLog(@" success iOS 9");
}
else
{
NSLog(@"%@", error);
}
}];
此代碼工作很好地iOS 8.x.
但它失敗,錯誤代碼-1 iOS 9.x
。 錯誤是
`Error Domain=NSCocoaErrorDomain Code=-1 "(null)"`
有關此問題在iOS中9.任何想法? 任何幫助表示讚賞! 感謝
請讓你的代碼的正確的縮進... http://meta.stackexchange.com/questions/ 22186 /如何-DO-格式,我的代碼塊 –