Reputation: 1004
I am trying to build a barebone app with Xcode 12.5 Beta 3 on macOS Big Sur 11.2.2 with a file provider extension. I use the beta version of Xcode because previous versions do not provide a template for file provider extensions (example project on GitHub).
The app and its extension have a common app group set up in their entitlements and are signed automatically with my personal team and a development certificate.
I built and ran my app and extension. But, as far as I know, I have now control over when it is (un)loaded because that is up to the system.
pluginkit -vvvvmi SomeOrganization.SomeProduct.SomeProvider
).$ pluginkit -vvvvmi SomeOrganization.SomeProduct.SomeProvider
! SomeOrganization.SomeProduct.SomeProvider(1.0)
Path = /Users/peter/Library/Developer/Xcode/DerivedData/SomeProduct-gyyunhpcbweleidtluxpslpciwjj/Build/Products/Debug/SomeProduct.app/Contents/PlugIns/SomeProvider.appex
UUID = E2FDC7AB-3CDD-4AEE-A2B2-CC2BA0CBC409
Timestamp = 2021-03-09 16:49:57 +0000
SDK = com.apple.fileprovider-nonui
Parent Bundle = /Users/peter/Library/Developer/Xcode/DerivedData/SomeProduct-gyyunhpcbweleidtluxpslpciwjj/Build/Products/Debug/SomeProduct.app
Display Name = SomeProvider
Short Name = SomeProvider
Parent Name = SomeProduct
(1 plug-in)
com.apple.FileProvider
subsystem I stumble over these messages after building the extension (I had to reveal private values as described in this answer):[ERROR] could not load the domain properties
[WARNING] found directory with no domain plist in it: ~/L{5}y/A{17}t/F{10}r/S{26}t.SomeProvider
There are also two others about PhotosFileProvider
and com.apple.CloudDocs.MobileDocumentsFileProvider
which (I guess) are unrelated. The PhotosFileProvider
reports the same warning. The above path can be expanded to:
~/Library/Application Support/FileProvider/SomeOrganization.SomeProduct.SomeProvider
which contains Domains.plist
having this (binary) content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSFileProviderDomainDefaultIdentifier</key>
<dict>
<key>Connected</key>
<false/>
<key>Enabled</key>
<false/>
</dict>
</dict>
</plist>
I did not find anything about the meaning of the exclamation mark or how to find out what the actual problem is. How can I debug this? The error in Console sticks out suspiciously. It appears to me like I am missing some piece in the puzzle which is not mentioned in documentation like a secret step in a how-to.
For reference: my question in the Apple Developer Forums.
Upvotes: 5
Views: 3726
Reputation:
Are you calling +[NSFileProviderManager addDomain:completionHandler:]
from your application? https://developer.apple.com/documentation/fileprovider/nsfileprovidermanager/2890934-adddomain?language=objc
On macOS, unlike iOS, there is not a default FileProvider domain created by the system. Your application must explicitly register domains.
Upvotes: 5