Created
September 22, 2016 20:08
-
-
Save makthrow/facb5b3122c0f8fb7ab76bbe69e6a90c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// TODO: iOS9.0 - rewrite using Photos framework | |
PHPhotoLibrary.shared().performChanges({ | |
let request = PHAssetChangeRequest.creationRequestForAssetFromVideo(atFileURL: outputFileURL) | |
}, completionHandler: { (success, error) in | |
if !success { NSLog("error creating asset: \(error)") } | |
}) | |
// ALAssetsLibrary().writeVideoAtPath(toSavedPhotosAlbum: outputFileURL, completionBlock: { | |
// (assetURL:URL!, error:NSError!) in | |
// if error != nil{ | |
// print(error) | |
// | |
// } | |
// | |
// do { | |
// try FileManager.default.removeItem(at: outputFileURL) | |
// } catch _ { | |
// } | |
// | |
// if backgroundRecordId != UIBackgroundTaskInvalid { | |
// UIApplication.shared.endBackgroundTask(backgroundRecordId) | |
// } | |
// | |
// }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment