Can't save file to app documents on iPhone but works on iPad.

I have developed an application that screen records and saves the video to the document directory of the App.

This works flawlessly on iPad but does not work on iPhone and I receive the following error:

[RPDaemonProxy issueSandboxExtensionForClientFileWrite:]:136 Error issuing sandbox extension for client folder path /var/mobile/Containers/Data/Application/A81A2889-D05A-4659-808F-312C745A6750/Documents

error is produced when the following code is run:


        let videoURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0].appendingPathComponent("output0.mp4")

        recorder.stopRecording(withOutput: videoURL, completionHandler: { [unowned self] (error) in

...

I have searched for hours only to find references to Bookmarks which I don't believe apply to this situation since this has worked previously on multiple iPad devices.

Thank you!

I've encountered the same issue. It was working when I deployed the app to an iPhone with iOS 15 but the above issue occurred when I upgraded the iPhone to iOS 16.0.3

I have the same issue with recorder.stopRecording since iOS 16. Were you ever able to solve it?

Yes I too have the same issue, the code works on everything prior to iOS 16, I have searched and searched again but still have not found a workaround

Can't save file to app documents on iPhone but works on iPad.
 
 
Q