Document provider inconsistency

1k views Asked by At

I am using the new document provider functionality to try to export files to third party cloud services:

UIDocumentMenuViewController* activity = [[UIDocumentMenuViewController alloc] initWithURL:writer.file
                                                                                    inMode:UIDocumentPickerModeExportToService];

When I run this, I see iCloud, Google Drive and Dropbox as an option (and they appear to work). What I don't see, even though I have the app installed, is Box.

What's more odd is that when I use UIDocumentPickerModeOpen, Box does appear, along with iCloud, but Dropbox and Google Drive are missing. I can't open the file from either provider, though; it won't let me select my custom document type. In another app where I just export a CSV file is seems to work without issue to all providers.

The file uses a custom file type, which I'm guessing is part of the problem. There are other questions here about that and I believe I've correctly followed the instructions.

Custom document type configuration

Did I miss a step when adding a the custom file type? Are there other options when creating the document menu? Are there bugs in the document providers? (I note that it works in all cases with iCloud Drive.)

1

There are 1 answers

2
ylian On

At this moment only iCloud Drive supports all four modes: import, export, open and move. Dropbox and Google Drive don't support open. Box does support open. I don't think there is much we developers can do except waiting for all the cloud providers to support all modes.

I am also using a custom UTI, and this setting is working for me. I can select a .qvlibrary file from iCloud Drive, and open it with a security-scoped URL. Remember to call -[NSURL startAccessingSecurityScopedResource] before accessing the files or directories.

Custom UTI Setup