Can't refresh contents of File Provider -managed folder (Dropbox)

I want a user to be able to save a URL of a folder on a cloud share using the standard FileManager APIs. I'm testing with Dropbox in particular. The initial interaction is working (I can select a folder, save it as a bookmark, and scan the files in that folder). However, no changes made externally to the folder will be reflected in the app when I refresh the contents.

Launching the Files app and browsing to the folder DOES show the updated contents, and once that step is complete, then my app will again show up-to-date contents.

Is there perhaps some API I should be calling to trigger the Dropbox File Provider extension to update it's cache?

Sample project demonstrating issue: https://github.com/dhennessy/FolderScan

STEPS TO REPRODUCE

  1. Launch the app on a physical device
  2. Tap Choose, browse to folder on a Dropbox share, tap Open to select
  3. The app will show the contents of the folder (the 'test' folder)
  4. Switch to the Dropbox app and create a new subfolder of the test folder
  5. Return to the test app and tap Refresh. Notice that the changes do not appear
  6. Re-launching the app also does not show the changes

Workaround

  1. Launch the Files app (or re-open the UIDocumentPickerViewController by tapping choose and then dismiss it)
  2. Tap Refresh and the changes will appear in the app

Note: None of the other 'cloud file providers' (google drive, one drive, box) even allow the user to even select a folder.

Have you tried using NSFilePresenter or NSFileCoordinator on the folder you are viewing?

The framework engineer may have more insight and comments. I'd just like to share that the issue doesn't happen with iCloud Drive. I tried this way:

  1. Launch the app on my iPhone + iOS 18.4 beta 2.
  2. Tap Choose, browse to folder on iCloud Drive, tap Open to select.
  3. The app shows the contents of the folder (the 'test' folder).
  4. On my Mac + macOS 15.3.1 (24D70) that is logged in with the same iCloud account, add a new subfolder to the test folder. I intentionally used my Mac to avoid launching Files.app on my iPhone.
  5. Return to the test app and tap Refresh. Notice that the change DOES appear.

@denishennessy Would you mind to try with iCloud Drive as well to see if you get the same result?

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

I can confirm that this works with iCloud Drive. Unfortunately, for the real product behind this test project, we want people to be able to share data they've created on their existing file share service, which means Dropbox, Google Drive, One Drive, etc. I was going to write off the problem as a badly implemented provider (by Dropbox) except that the Files app seems to be able to trigger a refresh. I guess it's possible that the Files app is using a private API...

I’d suggest that you file a feedback report then – If you do so, please share your report ID here for folks to track.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

I’d suggest that you file a feedback report then

I'm not going to do that (I have open tickets going back to 2013 so it doesn't seem a good use of my time).

I was hoping to get a straightforward answer to the question: "Can I use iOS file service APIs to access third party cloud providers?".

From my testing, it seems like the answer is NO but the reason I created the DTS ticket, and also posted the sample project here was to see if perhaps I was using the wrong API.

"Can I use iOS file service APIs to access third party cloud providers?".

The answer is yes. In case you use NSFileCoordinator to access files, the system-provided file system APIs should work.

However, there are different ways to implement a file provider. Putting aside third-party solutions, developers can use the system-provided File Provider framework to create NSFileProviderReplicatedExtension-based and NSFileProviderExtension-based extensions. The former uses a new architecture, and is highly recommended. And yet, developers who already have an NSFileProviderExtension-based extension may not adopt NSFileProviderReplicatedExtension quickly.

Concretely in your case, I am unclear if Dropbox has adopted NSFileProviderReplicatedExtension yet – If it hasn't, I'd believe that the issue is on the extension side. On the other side, UIDocumentPickerViewController can do the right thing, meaning that the File Provider team will have space to investigate, and that's why I suggested a feedback report. Buy yeah, the teams don’t guarantee to reply every feedback; they typically only bother a feedback reporter when they need to gather more information or have something to communicate.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

Can't refresh contents of File Provider -managed folder (Dropbox)
 
 
Q