I’m looking into AppID capabilities in Dev portal…
Shouldn’t there be a 1-1 relationship between Xcode’s capabilities and AppID capabilities? I do see Keychain sharing in Xcode if I try adding a capability.
However I don’t see such a capability in Apple developer portal for AppIDs. Why?
Thanks to Dave Lyon who gave me this answer:
It's very confusing!
Every capability you see in provisioning profile of your AppID will require an entitlement.
The same is not true for every capability you add in Xcode. As a result you will find more capabilities in Xcode. Some of them may need entitlements and some may not.
Specifically in your case, Keychain sharing doesn't need entitlements, so you don't see them it when you're configuring your App ID.
EDIT: Found docs from Apple
The ☝️ is important and yet cryptic. That's why Apple tells us that the code signing entitlements depends is quite complex and depends on various inputs
This page is also worth seeing. It goes through the entitlements process.
https://developer.apple.com/library/archive/technotes/tn2415/_index.html#//apple_ref/doc/uid/DTS40016427-CH1-SOURCES
Has A LOT of good explanations. Make sure you read it inside out.
There’s also two sections under Entitlement Sources and Entitlement Destination
Specifically under the Entitlement Destination:
This implies the provisioning profiles are embedded but the app can end up having different entitlements. Basically if an entitlement is the kind that needs to be given through Provisioning profiles and your app is using it then you need to have that entitlement in your provisioning profile otherwise it would error upon code-signing.