Peter Jankuliak
Peter Jankuliak

Reputation: 3619

File provider extension not enumerating subfolders

I am implementing the NSFileProviderReplicatedExtension and have problem understanding what triggers a directory enumeration (either enumerateItems or enumerateChanges.

My setup is as follows:

  1. On the server I have the test/ folder
  2. I start the file provider extension
  3. The extension calls enumerateItems on the .workingSet and then on the .rootContainer and sees the test/ folder item in both with the itemVersion set to v("1", "1").
  4. I enter the test/ folder through Finder
  5. The server gets updated and it now also contains test/file.txt
  6. The app calls manager.signalEnumerator(for: .workingSet) to re-enumerate
  7. The extension then calls enumerateChanges on the .workingSet in which I tell the observer that the test/ folder item didUpdate with itemVersion set to v("2", "2") followed by finishEnumeratingChanges
  8. Nothing else happens

My expectation was that at step #8 the system sees that the version of the test/ folder has changed, creates an enumerator for it and calls either enumerateItems or enumerateChanges to see that there is now a new file file.txt in that folder.

But that doesn't happen. Is my above expectation wrong? Is there something other than itemVersion that the system looks for when deciding whether to enumerate child items?

Upvotes: 1

Views: 110

Answers (0)

Related Questions