I'm trying to move a video to the photo library and I'm getting very unhelpful errors. Is there any way to get more detailed error information, or is there some place I can look them up?
I've verified that the movie exists by downloading the app data via devices/xcode and the movie plays fine on my macbook.
I have a full help request on StackOverflow with a link to the project (that it does not let me post here): https://stackoverflow.com/questions/63575539/swift-ios-save-video-to-library
I've tried:
with Error: Error saving video: Optional(Error Domain=PHPhotosErrorDomain Code=-1 "(null)")
and
with Error:
Domain=ALAssetsLibraryErrorDomain Code=-1 "Unknown error" UserInfo= ...... {Error Domain=com.apple.photos.error Code=42001 "(null)"
both compile fine and are called. But end up giving me errors that do not help in the slightest.
I've verified that the movie exists by downloading the app data via devices/xcode and the movie plays fine on my macbook.
I have a full help request on StackOverflow with a link to the project (that it does not let me post here): https://stackoverflow.com/questions/63575539/swift-ios-save-video-to-library
I've tried:
Code Block func saveVideoToLibrary(videoURL: NSURL) { PHPhotoLibrary.requestAuthorization { status in // Return if unauthorized guard status == .authorized else { print("Error saving video: unauthorized access") return } PHPhotoLibrary.shared().performChanges({ PHAssetChangeRequest.creationRequestForAssetFromVideo(atFileURL: videoURL as URL) }) { success, error in if !success { print("Error saving video: \(String(describing: error))") } } } }
with Error: Error saving video: Optional(Error Domain=PHPhotosErrorDomain Code=-1 "(null)")
and
Code Block UISaveVideoAtPathToSavedPhotosAlbum( videoPath, self, #selector(self.video(_:didFinishSavingWithError:contextInfo:)), nil)
with Error:
Domain=ALAssetsLibraryErrorDomain Code=-1 "Unknown error" UserInfo= ...... {Error Domain=com.apple.photos.error Code=42001 "(null)"
both compile fine and are called. But end up giving me errors that do not help in the slightest.