Hello everyone,
I'm developing a macOS application with an integrated Content Filter System Extension. Both the main app and the extension are signed with a Developer ID Application provisioning profile. When building in Xcode, I'm encountering an entitlement mismatch error.
I've inspected the provisioning profile using the command: security cms -D -i FilterContentExtension-prod-profile.provisionprofile | grep -A 10 com.apple.developer.networking.networkextension
And found that the com.apple.developer.networking.networkextension section only contains values with the -systemextension suffix, for example: content-filter-provider-systemextension.
However, when I enable Network Extension → Content Filter in Xcode, the .entitlements file is generated with:
<string>content-filter-provider</string>.
This leads to the error: "Provisioning profile 'FilterContentExtension-prod-profile' doesn't match the entitlements file’s value for the com.apple.developer.networking.networkextension entitlement."
My specific questions are:
-
Why does this error occur?
-
How can I use the content-filter-provider entitlement?
-
If I want to use the content-filter-provider entitlement inside com.apple.developer.networking.networkextension for my Content Filter System Extension, what should I do?
When building in Xcode, I'm encountering an entitlement mismatch error.
Right. There’s a surface level explanation of this, but it raises a bigger issue.
It sounds like you’re trying to use your Developer ID signing identity for day-to-day development. That is a mistake. Rather, use an Apple Development signing identity for your day-to-day development. See The Care and Feeding of Developer ID for an explanation of why that’s important, and for other general hints about dealing with Developer ID signing identities.
Once you make that switch, you’ll only encounter when you go to distribute your app. And the fact that Xcode isn’t aware of the -systemextension
suffix is a known bug. I talk about that in detail in Exporting a Developer ID Network Extension.
Finally, the Network Extension Resources has lots of links to useful docs and other resources in this space, and I think you’ll find Debugging a Network Extension Provider particularly useful.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"