Hi @clenart ,
Thanks for the replay!
I know that addDomain needs a valid displayName, but my problem is a little different.
While I create NSFileProviderManager object (using above snippet code), sometimes it'll change displayname of a already added domain.
I found more detail log today. It seems that fileproviderd detect displayname changed and did change the domain info and physical directory path.
2022-11-30 17:29:14.657796+0800 0x6c5f Default 0x0 1332 0 fileproviderd: (FileProviderDaemon) [com.apple.FileProvider:default] [NOTICE] need a new domain for <private> because display name changed
Can you help to reach developer team and check whether this is an bug?
Thanks.
more log here
2022-11-30 17:29:14.657427+0800 0x6c15 Debug 0x0 1332 0 fileproviderd: (FileProviderDaemon) [com.apple.FileProvider:default] [DEBUG] Adding domain <private> at URL (null) with persona unique string:'(null)', perso:0 ent:0 def:0 sys:0 type:1000
2022-11-30 17:29:14.657530+0800 0x6c15 Debug 0x0 1332 0 fileproviderd: (FileProvider) [com.apple.FileProvider:default] [DEBUG] ┣1a1 dispatching to <private>
2022-11-30 17:29:14.657570+0800 0x6c15 Debug 0x0 1332 0 fileproviderd: (FileProvider) [com.apple.FileProvider:default] [DEBUG] ┗19e
2022-11-30 17:29:14.657584+0800 0x6c5f Debug 0x0 1332 0 fileproviderd: (FileProvider) [com.apple.FileProvider:default] [DEBUG] ┳1a1 continuing on <private>
2022-11-30 17:29:14.657656+0800 0x6c5f Default 0x0 1332 0 fileproviderd: (FileProviderDaemon) [com.apple.FileProvider:default] [NOTICE] Adding domain <private> for extension <private>, importing directory (null), for pid=594 name=... path=.... isPOSIX=0
2022-11-30 17:29:14.657697+0800 0x6c5f Debug 0x0 1332 0 fileproviderd: (FileProviderDaemon) [com.apple.FileProvider:default] [DEBUG] creating domain as userEnabled because the provider already has one enabled domain: <private>
2022-11-30 17:29:14.657717+0800 0x6c15 Debug 0x0 1332 0 fileproviderd: (FileProviderDaemon) [com.apple.FileProvider:default] [DEBUG] invalidating <private>
2022-11-30 17:29:14.657731+0800 0x6c5f Debug 0x0 1332 0 fileproviderd: (FileProviderDaemon) [com.apple.FileProvider:default] [DEBUG] domain <private> already exists
2022-11-30 17:29:14.657786+0800 0x6c67 Debug 0x0 1332 0 fileproviderd: (FileProviderDaemon) [com.apple.FileProvider:default] [DEBUG] Invalidating <private> because we don't have any inflight request or lifetime extender #lifetime
2022-11-30 17:29:14.657796+0800 0x6c5f Default 0x0 1332 0 fileproviderd: (FileProviderDaemon) [com.apple.FileProvider:default] [NOTICE] need a new domain for <private> because display name changed
2022-11-30 17:29:14.657869+0800 0x6c67 Debug 0x0 1332 0 fileproviderd: (CloudDocs) [com.apple.clouddocs:default personal] [DEBUG] notifying '<private>' on token 30 with state 0
2022-11-30 17:29:14.657883+0800 0x6c5f Default 0x0 1332 0 fileproviderd: (FileProviderDaemon) [com.apple.FileProvider:default] [NOTICE] domain <FPDDomain: 0x7fde418155f0> ..., user-enabled is being disconnected, switching to a dead-end backend