Post

Replies

Boosts

Views

Activity

Reply to NSXPCConnection between app and FinderSync extension
So, I've been able to set my bundle id starting with a figure from the Build Settings tab... Now my app can communicate with the login item agent, but the FinderSync, still not... I found this error in the Console: Sandbox: Extension(7145) deny(1) file-read-data .....myApp.app/Contents/Library/LoginItems/a.b.c.d.e.LoginItemAgent.app The app, FinderSync ext and login item agent are all in the same App Group, sandboxed and signed with "Apple Development" (debuging in XCode). Any idea?
Apr ’21
Reply to NSXPCConnection between app and FinderSync extension
I have also tried without success to set com.apple.security.temporary-exception.mach-register.global-name/com.apple.security.temporary-exception.mach-lookup.global-name entitlements. In myApp.entitlements: ... keycom.apple.security.temporary-exception.mach-register.global-name/key array stringa.b.c.d.e.f/string /array And in Extension.entitlements: ... keycom.apple.security.temporary-exception.mach-lookup.global-name/key array stringa.b.c.d.e.f/string /array Should I use an XPC login item app between the app and the extension? myApp = XPC login item app = FinderSync ext By dint of searching, I came across the AppLoginItemXPCDemo example, but it dates from 2012 ... No better solution has been proposed by Apple since? It seems like it's a common problem to get an application to communicate with a FinderSync extension ...
Apr ’21
Reply to NSConnection between Endpoint security system extension and an application
Hello! So, I have added an XPC service to my application. I'm able to communicate between the app and the service but still not between the system extension and the service. The code is almost the same for the app and the system extension The only difference is: _xpcConnection = [[NSXPCConnection alloc] initWithServiceName:_serviceName]; // App code _xpcConnection = [[NSXPCConnection alloc] initWithMachServiceName:_serviceName options:0]; // Sys ext code The interruptionHandler and invalidationHandler don't catch any error. I don't see any error in the Console. The service and sys ext belong to the same app group. I have added NSEndpointSecurityMachServiceName to the Info.plist of the sys ext. I have also tried to add it to the Info.plist of the service (not sure it's usefull or not). "sudo launchctl procinfo ... " for the service: endpoints = { "a.b.c.d.e" = { port = 0x105c77 active = 1 managed = 1 reset = 0 hide = 0 } } "sudo launchctl procinfo ... " for the sys ext: endpoints = { "a.b.c.d.e" = { port = 0xf5d5b active = 0 managed = 1 reset = 0 hide = 0 } } How can I debug that? Thank you.
Mar ’21
Reply to NSConnection between Endpoint security system extension and an application
Thank you for your answer. Yikes! You’re using Distributed Objects (DO). Don’t do that. It’s been deprecated for a while now and for good reason. It’s deeply broken. It's an old app and I didn't want to rewrite everything (now). The migration is not trivial... The standard way to set up comms between an app and an ES sysex is via NSEndpointSecurityMachServiceName. Ok, I will try to get by using this.
Mar ’21