Hello,
I don't manage to establish a connection between my Endpoint security system extension and my application.
The following command always returns nil:
NSConnection *conn = [NSConnection connectionWithRegisteredName:serverName host:nil];
It works from a FinderSync extension, so I'm sure that the server part (my application) is working.
I have "NSLogged" the "serverName", so I'm sure that it's correct.
Here is the entitlements of the app:
% codesign -d --entitlements :- /Applications/myApp.app
Executable=/Applications/myApp.app/Contents/MacOS/myApp
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http...PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.application-groups</key>
<array>
<string>123ABCDEFG.a.b.c.d</string>
</array>
</dict>
</plist>
The entitlements of my Extension:
% codesign -d --entitlements :- /Users/myuser/Library/Developer/Xcode/DerivedData/myApp-hjadpvvlcxmludafetdemwmwwglv/Build/Products/Debug/a.b.c.d.myAppLS.Extension.systemextension
Executable=/Users/myuser/Library/Developer/Xcode/DerivedData/myApp-hjadpvvlcxmludafetdemwmwwglv/Build/Products/Debug/a.b.c.d.myAppLS.Extension.systemextension/Contents/MacOS/a.b.c.d.myAppLS.Extension
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http...PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.application-identifier</key>
<string>123ABCDEFG.a.b.c.d.myAppLS.Extension</string>
<key>com.apple.developer.endpoint-security.client</key>
<true/>
<key>com.apple.developer.team-identifier</key>
<string>123ABCDEFG</string>
<key>com.apple.security.application-groups</key>
<array>
<string>123ABCDEFG.a.b.c.d</string>
</array>
<key>com.apple.security.get-task-allow</key>
<true/>
</dict>
</plist>
So, both belong to the same app group.
I'm able to start the extension successfully:
% systemextensionsctl list
1 extension(s)
What should I check?
Thank you.
I don't manage to establish a connection between my Endpoint security system extension and my application.
The following command always returns nil:
NSConnection *conn = [NSConnection connectionWithRegisteredName:serverName host:nil];
It works from a FinderSync extension, so I'm sure that the server part (my application) is working.
I have "NSLogged" the "serverName", so I'm sure that it's correct.
Here is the entitlements of the app:
% codesign -d --entitlements :- /Applications/myApp.app
Executable=/Applications/myApp.app/Contents/MacOS/myApp
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http...PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.application-groups</key>
<array>
<string>123ABCDEFG.a.b.c.d</string>
</array>
</dict>
</plist>
The entitlements of my Extension:
% codesign -d --entitlements :- /Users/myuser/Library/Developer/Xcode/DerivedData/myApp-hjadpvvlcxmludafetdemwmwwglv/Build/Products/Debug/a.b.c.d.myAppLS.Extension.systemextension
Executable=/Users/myuser/Library/Developer/Xcode/DerivedData/myApp-hjadpvvlcxmludafetdemwmwwglv/Build/Products/Debug/a.b.c.d.myAppLS.Extension.systemextension/Contents/MacOS/a.b.c.d.myAppLS.Extension
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http...PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.application-identifier</key>
<string>123ABCDEFG.a.b.c.d.myAppLS.Extension</string>
<key>com.apple.developer.endpoint-security.client</key>
<true/>
<key>com.apple.developer.team-identifier</key>
<string>123ABCDEFG</string>
<key>com.apple.security.application-groups</key>
<array>
<string>123ABCDEFG.a.b.c.d</string>
</array>
<key>com.apple.security.get-task-allow</key>
<true/>
</dict>
</plist>
So, both belong to the same app group.
I'm able to start the extension successfully:
% systemextensionsctl list
1 extension(s)
-- com.apple.system_extension.endpoint_security
* 123ABCDEFG a.b.c.d.myAppLS.Extension (1.0/1) myApp LS Extension [activated enabled]
What should I check?
Thank you.