File Provider-How to actively trigger the enumerateItems again

I found that the enumerateItems function is only called when a directory is opened for the first time. If the same directory is opened in the future, enumerateItems will not be called again. Can you set or actively trigger the call to the enumerateItems function

You can always send a notification to your fileprovider and call signalEnumerator to trigger a new enumeration. Then your enumerator returns the changes.

When there are remote changes on the server, call -[NSFileProviderManager signalEnumeratorForContainerItemIdentifier:completionHandler:] with NSFileProviderWorkingSetContainerItemIdentifier.

This will cause the system to enumerate the working set from the last anchor, where you can then enumerate the latest remote changes to the system. Those changes will be synced down to the local filesystem.

File Provider-How to actively trigger the enumerateItems again
 
 
Q