【发布时间】:2020-05-31 16:01:52
【问题描述】:
我正在尝试将视频保存在我的照片库中。但有时我得到一个错误:操作无法完成。 (PHPhotosErrorDomain 错误 -1。)
这是我的代码:
PHPhotoLibrary.shared().performChanges({
PHAssetChangeRequest.creationRequestForAssetFromVideo(atFileURL: exporter!.outputURL!)
}) { saved, error in
if saved {
print("video saved to camera roll")
} else {
print(error?.localizedDescription)
}
}
【问题讨论】:
-
你有什么解决办法吗?我也面临同样的错误。
-
你的问题解决了吗?
标签: swift iphone xcode phphotolibrary