In macOS 27.3 beta 2, it is no longer possible to use NSFileCoordinator with NSFilePresenter instances to open a SQLite file with related WAL and SHM files when a sandboxed app has access to the primary SQLite file. In macOS 27.3 beta 1 and previous macOS releases, the Related File Access API works as expected.
This happens regardless where the files are located, so it seems to be unrelated to recent changes in Privacy & Security, although it could be an unexpected side effect of these changes.
Instead of correctly registering NSFilePresenter instances, errors like the following are logged in the XCode console:
NSFileSandboxingRequestRelatedItemExtension: Failed to issue extension for /Users/testuser/Desktop/Sample/Example.sqlite-wal because: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted" (The related item is protected by a different storage class than the primary item) UserInfo={NSDebugDescription=The related item is protected by a different storage class than the primary item}
+[NSFileCoordinator addFilePresenter:] could not get a sandbox extension. primaryPresentedItemURL: file:///Users/testuser/Desktop/Sample/Example.sqlite, presentedItemURL: file:///Users/testuser/Desktop/Sample/Example.sqlite-wal
The mentioned Related File Access API is documented here.
I have filed a Feedback, which includes a sample project: FB25625743
My question is: Is this a bug, or new intended behavior, or is there something else changed that should be dealed with when using this API in macOS 27.3 beta 2?