We implement NSFileProviderReplicatedExtension. A package item has a content type conforming to UTType.package, with a directory and ordinary nested members in remote storage. The system requests contents for the package root. What exact representation should the extension pass to the completion handler of fetchContents(for:version:request:completionHandler:) to materialize that package?
The selected macOS SDK's NSFileProviderReplicatedExtension.h, line 347, states:
must be a regular file on the same volume as the user-visible URL.
The complete ownership comment and method declaration are in FileProvider.framework/Headers/NSFileProviderReplicatedExtension.h, lines 314–416. The current method documentation describes same-volume temporary content, ownership transfer and matching the returned content version.
For a directory-backed package, is a reconstructed directory URL in the manager-provided temporary location a supported exception to the regular-file requirement? If so, please identify the applicable contract and required returned item metadata, including content type and version. If it is not supported, what documented API sequence delivers the package's directory contents? We need to preserve the existing directory representation; we are not asking for an archive convention or a storage-format change.
Verified development environment:
- macOS 27.0.1, build 26A434.
- Xcode 27.1, tool build 27A9275.
- Selected macOS SDK reports version 27.0.
The proposed isolated test host also reports macOS 27.0.1 (26A434); its developer tools have not been inspected.
Observed behavior and limits:
- Installed callback records show our extension returning
NSFileProviderError.cannotSynchronizebefore handing any content URL to the system. This is our current refusal, not evidence that macOS rejected a directory URL. - The actual
requestedVersionarguments were not captured. Native cached version values do not establish those callback arguments. - The isolated directory-URL handoff test has not run. OS acceptance or rejection of that handoff on the environment above is therefore not observed.
The planned minimal reproduction uses one small synthetic package containing a nested directory, a file with known bytes and an empty member, plus one ordinary-file control. In an isolated development location, we will allow system-initiated fetches, record the actual callback arguments and completion values, and verify the resulting directory structure and bytes. No customer documents, paths, identifiers or private archives are needed. The contract question above can be answered independently of that pending runtime observation.