Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS: Support App Group folders in local file provider

I understand that if I provide the UIFileSharingEnabled and LSSupportsOpeningDocumentsInPlace keys in Info.plist for my iOS app, files in my app's Documents folder are shown in Files.app ("On This iPad") and the documents browser.

Now my question - aside from writing a File Provider extension - is there any way to add an app group's folder or replace the Documents folder with a folder in the app group's folder? For sharing between my extensions, I save everything in the App Group folder instead of Documents, but then, of course, Files.app doesn't have access to those files, that's why I'm asking.

I tried creating symbolic links from the documents folder to the actual file, and they are shown, but don't work correctly ("file doesn't exist").

I've also created a File Provider extension, but it was rejected by Apple because my extension isn't cloud-backed and was only for local files. According to my reviewer, a File Provider extension must be cloud-storage backed.

Thank you for your help and insights,

-Matt

like image 480
m.gansrigler Avatar asked Sep 22 '17 10:09

m.gansrigler


People also ask

Where are iOS app files stored?

In iOS, typically, apps store their data in a folder named Documents , that is saved in a location next to where the app itself is installed (†). It is important to note that you do not need a jailbroken phone to access this folder.

What is file provider storage on iPhone?

The file provider focuses on syncing data between the local copy and the remote storage—uploading any local changes and downloading any remote changes. For more information, see Replicated File Provider extension.

How do I manage files and folders on my iPhone?

Touch and hold the file or folder, then choose an option: Copy, Duplicate, Move, Delete, Rename, or Compress. To modify multiple files or folders at the same time, tap Select, tap your selections, then tap an option at the bottom of the screen.


1 Answers

It's pretty simple: No. :(

We are struggling with the same issue and its simple: You can't participate in the files app (or iTunes File Sharing) if you don't store your files in the Documents folder.

It seems like this is not well thought out. You should not integrate as a file provider unless you are actually providing a file system such as dropbox, at least that's what we've been told at WWDC. On the other side you should support stuff like iMessage extensions, today extensions,... which only are possible if your files are accessible through an app group. But this then automatically breaks the use of the Files.app as well as iTunes Filesharing.

We filed radars for that, any duplicate would help, I guess.

like image 166
Michael Ochs Avatar answered Nov 15 '22 01:11

Michael Ochs