NSFileProviderExtension - downloaded file disappears

Hi there, I am in the process of writing a macOS app using NSFileProviderExtension so that I can map my customer's data in Finder. I am in the process of building it out. But one thing I notice is that once the file is downloaded and I save it to the cache folder, I see it disappear from the folder. It looks like the system removed the downloaded file a few seconds later. How do I go about tracking this?

I have added the log stream messages from the point where it is downloaded to the point where it is gone missing. Any pointers greatly appreciated.

2025-07-15 16:10:41.989915-0700 0x138326   Default     0x0                  989    0    filecoordinationd: (Foundation) [com.apple.foundation.filecoordination:provider] Provider radwar.Drive.DriveFileProviderExtension finished providing for 44FB3A4A-CA50-4EE2-9DC8-1C96FE584DF5
2025-07-15 16:10:41.989974-0700 0x138326   Default     0x0                  989    0    filecoordinationd: (Foundation) [com.apple.foundation.filecoordination:claims] Provider radwar.Drive.DriveFileProviderExtension finished, unblocking claimer for 44FB3A4A-CA50-4EE2-9DC8-1C96FE584DF5
2025-07-15 16:10:41.987613-0700 0x138bb6   Default     0x0                  990    0    fileproviderd: (Foundation) [com.apple.foundation.filecoordination:provider] radwar.Drive.DriveFileProviderExtension finished providing
2025-07-15 16:10:42.034144-0700 0x138905   Default     0x71f4b8             624    7    runningboardd: (RunningBoard) [com.apple.runningboard:ttl] Invalidating assertion 624-44341-46806 (target:[xpcservice<radwar.Drive.DriveFileProviderExtension([osservice<com.apple.FileProvider(501)>:990])(501)>{vt hash: 247410607}[uuid:5AABEA5E-ACAD-428B-A6DD-F2EFF14CEE99]{persona:9EF54117-4998-4D72-83C4-F12587C95FBA}:44341]) from originator [xpcservice<radwar.Drive.DriveFileProviderExtension([osservice<com.apple.FileProvider(501)>:990])(501)>{vt hash: 247410607}[uuid:5AABEA5E-ACAD-428B-A6DD-F2EFF14CEE99]{persona:9EF54117-4998-4D72-83C4-F12587C95FBA}:44341]
2025-07-15 16:10:44.185866-0700 0x138906   Default     0x0                  624    7    runningboardd: (RunningBoard) [com.apple.runningboard:ttl] [xpcservice<radwar.Drive.DriveFileProviderExtension([osservice<com.apple.FileProvider(501)>:990])(501)>{vt hash: 247410607}[uuid:B08DACEF-EDCC-4DE9-91AA-DC26EDB2FA89]{persona:9EF54117-4998-4D72-83C4-F12587C95FBA}:44328] termination reported by launchd (0, 0, 0)
2025-07-15 16:10:44.186166-0700 0x138906   Default     0x0                  624    0    runningboardd: (RunningBoard) [com.apple.runningboard:process] Removing process: [xpcservice<radwar.Drive.DriveFileProviderExtension([osservice<com.apple.FileProvider(501)>:990])(501)>{vt hash: 247410607}[uuid:B08DACEF-EDCC-4DE9-91AA-DC26EDB2FA89]{persona:9EF54117-4998-4D72-83C4-F12587C95FBA}:44328]
2025-07-15 16:10:44.186424-0700 0x138906   Default     0x0                  624    0    runningboardd: (RunningBoard) [com.apple.runningboard:process] Removing assertions for terminated process: [xpcservice<radwar.Drive.DriveFileProviderExtension([osservice<com.apple.FileProvider(501)>:990])(501)>{vt hash: 247410607}[uuid:B08DACEF-EDCC-4DE9-91AA-DC26EDB2FA89]{persona:9EF54117-4998-4D72-83C4-F12587C95FBA}:44328]
2025-07-15 16:10:44.189939-0700 0x138c30   Default     0x71f4e4             976    0    gamepolicyd: (RunningBoardServices) [com.apple.runningboard:monitor] Received state update for 44328 (xpcservice<radwar.Drive.DriveFileProviderExtension([osservice<com.apple.FileProvider(501)>:990])(501)>{vt hash: 247410607}[uuid:B08DACEF-EDCC-4DE9-91AA-DC26EDB2FA89]{persona:9EF54117-4998-4D72-83C4-F12587C95FBA}, none-NotVisible
2025-07-15 16:10:44.190503-0700 0x138c8f   Default     0x0                  624    0    runningboardd: (RunningBoard) [com.apple.runningboard:process] XPC connection invalidated: [xpcservice<radwar.Drive.DriveFileProviderExtension([osservice<com.apple.FileProvider(501)>:990])(501)>{vt hash: 247410607}[uuid:B08DACEF-EDCC-4DE9-91AA-DC26EDB2FA89]{persona:9EF54117-4998-4D72-83C4-F12587C95FBA}:44328]
2025-07-15 16:10:46.294619-0700 0x13904a   Default     0x0                  44341  0    DriveFileProviderExtension: 🔥FileProviderExtension: 🔥FileProviderExtension: ❌ CRITICAL: File disappeared after 5 seconds! /Users/radwar/Library/Containers/radwar.Drive.DriveFileProviderExtension/Data/Library/Caches/FileCache/README.md (item: 19105790787)```

Answered by DTS Engineer in 849329022

For a new file provider extension project, you will want to use NSFileProviderReplicatedExtension, and not NSFileProviderExtension.

To create a file provider replicated extension, the following sample project is a good starting point:

You can check if your issue reproduces with this sample, and it does, share the detailed steps for folks to take a look.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

For a new file provider extension project, you will want to use NSFileProviderReplicatedExtension, and not NSFileProviderExtension.

To create a file provider replicated extension, the following sample project is a good starting point:

You can check if your issue reproduces with this sample, and it does, share the detailed steps for folks to take a look.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

Thanks Ziqiao. Is it available in obj-c? My project is in obj-c

Accepted Answer

No, the sample doesn't have an Objective C version.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

Thanks for the response. I am switching to doing this in Swift. Have a follow-up question, will start a thread for it.

NSFileProviderExtension - downloaded file disappears
 
 
Q