0

I'm newer to iOS development and I find the file system to be difficult to work with. I've got many cases implemented in my app to share pdfs from browsers and the files app, but when i try to share a pdf from adobe the shared url to the resource looks like:

file:///private/var/mobile/Containers/Data/Application/EB6B8570-6422-49D8-BCBD-C68B9CBCF3C9/tmp/BBTempFileManager/sharedcopies/C2FB25ED-1414-49F0-8953-FFF3A4F6C76C/Sky.pdf

I have a shared container set up that I can already successfully read and write to during other scenarios. Any ideas why the system believes the file does not exist in this location? It appears maybe I just don't have access? What entitlements/permissions should be set up to explicitly allow for this?

  • What is a shared container? What's wrong with the URL shown above? What are those 'other scenarios'? – El Tomato Sep 16 '21 at 00:39
  • A shared container is a storage container where data can be shared amongst apps. In short in order to share a pdf from the Files app, I have to copy the file from the App container 1 to the shared app group container in order to process the file from another application. I'm not sure what's wrong w/ the URL above, other than it making my call fail : ([filemgr copyItemAtURL:fromUrl toURL:sharedDirectory error: &myerror ] == YES). CopyItemAtURL thinks this file doesn't exist at that URL, even though if I can buffer the file using other methods. Other scenarios are listed in the question. – BT b killin me Sep 16 '21 at 15:07

0 Answers0