UIDocumentBrowserController on iOS 16 Beta - Error in opening my app's files. Works fine in iOS 14/15

Hi,

I have an app on App Store that works in iOS 14/15 and I just downloaded Xcode 16 beta to test compatibility with iOS 16 beta.

My app allows selecting photos or documents and encrypt them. This work fine in iOS 16 beta. The encrypted files, I can open them and decrypt them ok in iOS 14/15.

But in iOS 16 Beta, I get this error when opening the encrypted file. Any changes in iOS 16 that I should do?

Thanks M

2022-08-08 15:36:02.070081+1000 HideApp[4842:1574433] [default] [ERROR] Could not resolve bookmark. Error: NSError: Cocoa 257 "The file couldn’t be opened because you don’t have permission to view it."

2022-08-08 15:36:02.070216+1000 HideApp[4842:1574433] [DocumentManager] Failed to create a url from bookmarkableString (Error Domain=NSCocoaErrorDomain Code=257 "The file couldn’t be opened because you don’t have permission to view it.")

2022-08-08 15:36:02.070343+1000 HideApp[4842:1468399] [DocumentManager] tried to call delegate -documentBrowser:didPickDocumentURLs: with an empty array of items. This indicates the items failed to be prepared and materialized on disk: (

    "<DOCItemBookmark: 0x139d5fac0> FPItem=(null)"

)

Using Xcode 14 beta 5, I have the same error when using UIDocumentBrowserController in the iOS 16 simulator. I don't have a device with iOS 16, so I'm not sure if it's just a simulator issue. I only get this error with certain simulators, like iPhone. None of my iPad simulators have this issue.

Was able to test on an iPhone with iOS 16.0 Beta 5 (Build 20A5339d). I don't get this above error.

But I now, I get another crash.... using QuickLook ViewController.....that I am investigating...

UIDocumentBrowserController on iOS 16 Beta - Error in opening my app's files. Works fine in iOS 14/15
 
 
Q