My app edits a video and exports the edited version. I have the app running with no problems in the simulators, but when I try to preview the edited version of the video on a device I am not able to. I've tried all the de-bugging I could think of but still stuck.
I'm creating the export URL with the following code:
let videoName = UUID().uuidString
let exportURL = URL(fileURLWithPath: NSTemporaryDirectory()).appendingPathComponent(videoName).appendingPathExtension("mov")
Which gives me the following URL:
file:///private/var/mobile/Containers/Data/Application/DB9E4828-D869-4A67-A0C1-E0BA5FA25772/tmp/2019E9B5-1004-46F7-BF86-2133BDD533DF.mov
It seems like it should be working but the video is not playing. I've verified the playerLayer is being added to the view, but no video. Again, the app works on the simulator, so that leads me to believe it's a file access issue.
Does anyone see an issue with the URL I'm getting, or have any ideas as to what could be wrong?