I save the video to the end of the camera roll
PHPhotoLibrary.shared().performChanges({
PHAssetChangeRequest.creationRequestForAssetFromVideo(atFileURL: mergedVideoFile!)
}) { saved, error in
if saved {
print("saved")
}
}
It's quite easy, you need to pass the Date
while saving the PHAsset
.
PHPhotoLibrary.shared().performChanges({
let changeRequest = PHAssetChangeRequest.creationRequestForAssetFromVideo(atFileURL: videoUrl)
changeRequest.creationDate = Date() //Pass whichever Date you want
}) { (success, error) in
debugPrint(success)
debugPrint(error)
}