Symptom
When I was building an App Clip, the following warning was reported by XCode. Provisioning profile “iOS Team Provisioning Profile: com.aiharasoft.***App” for “***” contains entitlements that aren’t in the entitlements file: com.apple.developer.associated-appclip-app-identifiers. To use these entitlements, add them to your entitlements file. Otherwise, remove unused entitlements from your provisioning profile.
Solution
From https://developer.apple.com/, “Certificates, Identifiers & Profiles” >> “Profiles” >> Choose profile. Somehow, the Status got into Invalid.
And I edited the profile and saved, and the status turned to Active.Rebuild XCode and the warning has gone.
Another point is when I added “Associated Domains” from capabilities, only on debug was selected. Thus, two entitlements file for debug and release were created. I did not notice the two entitlements, debug and release files became inconsistent, and then uploaded to App Store Connect. So, the app got into into inconsistent state.
I’m not sure, but as the warning says, inconsistency between Provisioning Profile and *App.entitlements causes this warning.
Anyway, check the Profiles, entitlements, and the consistencies, first.
- https://developer.apple.com/, “Certificates, Identifiers & Profiles”
- App.entitlements in Xcode file.