0

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")
     }
}
Sohil R. Memon
  • 9,404
  • 1
  • 31
  • 57

1 Answers1

1

It's quite easy, you need to pass the Date while daving 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)
}
Sohil R. Memon
  • 9,404
  • 1
  • 31
  • 57