I think I have configured information on Apple server and my local machine correctly
I recommend that you not rely on Xcode to catch problems like this but instead verify the
output of your build process. You can dump the entitlements of a code item using:
Code Block % codesign -d --entitlements :- /path/to/item |
You can dump a provisioning profile using:
Code Block % security cms -D -i /path/to/profile |
Make sure to dump the
embedded.provisionprofile that’s embedded within the bundle.
Check that:
Only your main executables contain entitlements; do not add entitlements to library code (like frameworks, dynamic libraries, bundles)
Any such entitlements are allowedlisted by the matching provisioning profile
Pasted in below is an example of me doing this for a EndpointSecurity sysex (sorry it’s not an NetworkExtension sysex but it’s what I have lying around at the moment).
Note If you work through this example you’ll see that, for both the app and the sysex, the get-task-allow entitlement (
com.apple.security.get-task-allow) is not allowlisted by the profile. This is an unconstrained entitlement on macOS. Unconstrained entitlements don’t need to be allowlisted by a profile. Another example of this, particularly relevant for NE providers, is the
App Sandbox entitlement (
com.apple.security.app-sandbox).
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
Code Block % codesign -d --entitlements :- NullEndpointSecurity.app |
… |
<dict> |
<key>com.apple.application-identifier</key> |
<string>SKMME9E2Y8.com.example.apple-samplecode.NullEndpointSecurity</string> |
<key>com.apple.developer.system-extension.install</key> |
<true/> |
<key>com.apple.developer.team-identifier</key> |
<string>SKMME9E2Y8</string> |
<key>com.apple.security.get-task-allow</key> |
<true/> |
</dict> |
</plist> |
% |
% security cms -D -i NullEndpointSecurity.app/Contents/embedded.provisionprofile |
… |
<dict> |
<key>Entitlements</key> |
<dict> |
<key>com.apple.developer.system-extension.install</key> |
<true/> |
<key>com.apple.application-identifier</key> |
<string>SKMME9E2Y8.com.example.apple-samplecode.NullEndpointSecurity</string> |
<key>keychain-access-groups</key> |
<array> |
<string>SKMME9E2Y8.*</string> |
</array> |
<key>com.apple.developer.team-identifier</key> |
<string>SKMME9E2Y8</string> |
<key>com.apple.developer.networking.custom-protocol</key> |
<true/> |
</dict> |
… |
</dict> |
</plist> |
% |
% codesign -d --entitlements :- NullEndpointSecurity.app/Contents/Library/SystemExtensions/com.example.apple-samplecode.NullEndpointSecurity.Extension.systemextension |
… |
<dict> |
<key>com.apple.application-identifier</key> |
<string>SKMME9E2Y8.com.example.apple-samplecode.NullEndpointSecurity.Extension</string> |
<key>com.apple.developer.endpoint-security.client</key> |
<true/> |
<key>com.apple.developer.team-identifier</key> |
<string>SKMME9E2Y8</string> |
<key>com.apple.security.get-task-allow</key> |
<true/> |
</dict> |
</plist> |
% security cms -D -i NullEndpointSecurity.app/Contents/Library/SystemExtensions/com.example.apple-samplecode.NullEndpointSecurity.Extension.systemextension/Contents/embedded.provisionprofile |
… |
<dict> |
… |
<key>Entitlements</key> |
<dict> |
<key>com.apple.application-identifier</key> |
<string>SKMME9E2Y8.*</string> |
<key>keychain-access-groups</key> |
<array> |
<string>SKMME9E2Y8.*</string> |
</array> |
<key>com.apple.developer.team-identifier</key> |
<string>SKMME9E2Y8</string> |
<key>com.apple.developer.endpoint-security.client</key> |
<true/> |
</dict> |
… |
</dict> |
</plist> |