Я получаю эту ошибку при загрузке видео в определенный альбом в библиотеке фотографий iPhone.
func saveImage(filePath: String) {
if assetCollection == nil {
return // If there was an error upstream, skip the save.
}
PHPhotoLibrary.requestAuthorization({ (newStatus) in
if (newStatus == PHAuthorizationStatus.authorized) {
PHPhotoLibrary.shared().performChanges({ () -> Void in
let createAssetRequest: PHAssetChangeRequest = PHAssetChangeRequest.creationRequestForAssetFromVideo(atFileURL: URL(string: filePath)!)!
createAssetRequest.placeholderForCreatedAsset
}) { (success, error) -> Void in
print(error?.localizedDescription)
if success {
//popup alert success
}
else {
//popup alert unsuccess
}
}
}else {
}
})
}
Ожидаемое видео успешно сохранено.