UIDocumentInteractionController fails with QLUbiquitousItemFetcher "could not create sandbox wrapper"

I'm using the UIDocumentInteractionController. It's initialized with an absolute URL like so:


[UIDocumentInteractionController interactionControllerWithURL:absoluteFileURL];


The app is crashing on iOS 13 (it did work fine up and including iOS 12) with the following output in the console:


2019-07-19 11:24:18.684359+0200 APP Test[77348:2475747] [default] QLUbiquitousItemFetcher: <QLUbiquitousItemFetcher: 0x600002667c50> could not create sandbox wrapper. Error: Error Domain=NSPOSIXErrorDomain Code=22 "couldn't issue sandbox extension com.apple.quicklook.readonly for '/Users/me/Library/Developer/CoreSimulator/Devices/32E561F2-970D-4065-845E-79F543BA998B/data/Containers/Data/Application/9AEAF606-4407-41CD-8465-D25F25238FD9/Documents/385b424e-1c3a-ff39-aff8-93b5c3492a23/MYFILE.175/MYFILE_501.jpeg': Invalid argument" UserInfo={NSDescription=couldn't issue sandbox extension com.apple.quicklook.readonly for '/Users/me/Library/Developer/CoreSimulator/Devices/32E561F2-970D-4065-845E-79F543BA998B/data/Containers/Data/Application/9AEAF606-4407-41CD-8465-D25F25238FD9/Documents/385b424e-1c3a-ff39-aff8-93b5c3492a23/MYFILE.175/MYFILE_501.jpeg': Invalid argument} #PreviewItem

2019-07-19 11:24:18.718760+0200 APP Test[77348:2475747] [default] URL cannot be nil when trying to fetch the contents of QLUbiquitousItemFetcher #PreviewItem

2019-07-19 11:24:18.718946+0200 APP Test[77348:2475747] [default] Will show error view because presenter could not successfully fetch content of preview item: <QLItem: 0x60000396b500> - , contents: (null), error: Error Domain=com.apple.quicklook.QLUbiquitousItemFetcher Code=0 "(null)". #PreviewController


I did confirm that the file does exist at the path /Users/me/Library/Developer/CoreSimulator/Devices/32E561F2-970D-4065-845E-79F543BA998B/data/Containers/Data/Application/9AEAF606-4407-41CD-8465-D25F25238FD9/Documents/385b424e-1c3a-ff39-aff8-93b5c3492a23/MYFILE.175/MYFILE_501.jpeg.


What exactly is it that did change in iOS 13 in this area?

Replies

The same thing is happing with all my QLPreview items.

On additional info: it is working fine on the real device, this is just an issue in the simulator. Am I the only one affected by this?

I'm seeing the same issue with iOS 13b5. Works on a real device but gives the error in simulator.


Might be related to another issue I'm having with the simulator. I can log into iCloud in the simulator but I can't access iCloud Drive through the Files app. I end up wiith an endless loop of being told to enable iCloud Drive in the Settings app (even though it is enabled) and being asked to log into my account (even though I'm logged in).