We have a new application I'm writing that uses the endpoint security entitlement. The profile seems to be something we can set up via xcode, but we are not using xcode. We use custom makefiles and manually codesign. When we try to use this entitlement, it fails to load with this error:
Code has restricted entitlements, but the validation of its code signature failed. Unsatisfied Entitlements:
It appears that this is most likely because we aren't using a provisioning profile, but instead, just using codesign to set hardening and the endpoint security entitlement.
I have not found any information about how to fix this, and I am relatively new to apple osx development, so any help would be appreciated!
There are two issues here:
-
If you’re building a daemon, rather than a system extension, you need to put it in an app-like structure. See Signing a Daemon with a Restricted Entitlement.
-
If you’re building outside of Xcode, you have to package and sign your code correctly. This can be quite a challenge. I have a number of DevForums posts and documents that can help, referenced below, but in many case your best option is to create a dummy Xcode project, use it to build the code, and then look at what it built and how it build it (you can find build transcripts in the Report navigator).
Anyway, on the post and docs front:
-
Signing a Mac Product For Distribution DevForums post
-
--deep
Considered Harmful DevForums post -
Manual Code Signing Example DevForums post
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"