How to achieve pagination in FileProvider Enumerator in Mac?

I tried this POC in enumerateItems delegate, which simulates paging.

Isn't it suppose to show the files as soon finishEnumerating upTo is triggered?

The files are shown only after finishEnumerating(upTo: nil) is called, if there are 20 pages then it will wait for 20 pages info then only the files will be listed in the Finder!

How to solve this? or Did I miss something?

func enumerateItems(for observer: NSFileProviderEnumerationObserver, startingAt page: NSFileProviderPage) {

        if(page.toInt64() == 100){

            observer.didEnumerate([FileProviderItem(identifier: NSFileProviderItemIdentifier(rawValue: "paging.txt"))])

            DispatchQueue.main.asyncAfter(deadline: .now() + 15) {
                observer.finishEnumerating(upTo: nil)
            }
            return
        }

        observer.didEnumerate([FileProviderItem(identifier: NSFileProviderItemIdentifier(rawValue: "a.txt"))])

        observer.didEnumerate([FileProviderItem(identifier: NSFileProviderItemIdentifier(rawValue: "b.txt"))])

        observer.didEnumerate([FileProviderItem(identifier: NSFileProviderItemIdentifier(rawValue: "c.txt"))])

        observer.didEnumerate([FileProviderItem(identifier: NSFileProviderItemIdentifier(rawValue: "d.txt"))])

        observer.finishEnumerating(upTo: NSFileProviderPage(100))

    }

Pagination in NSFileProviderEnumerator is not connected to the UI in Finder. It exists so that your application extension can return multiple smaller batches of items to the system, rather than 1 very large batch.

When a directory is browsed for the first time in Finder, Finder will wait until the directory is downloaded on disk. Directories can only be downloaded on disk when the initial enumeration is completed and all of the children that were enumerated are placed on disk. Hence, you see the expected behavior, where Finder does not show the directory listing until you complete the enumeration.

How to achieve pagination in FileProvider Enumerator in Mac?
 
 
Q