I've been stuck on this for a couple of hours now. I have a Mac app which uses CloudKit. It has been working until today. When I started up XCode today, the app fails. I see this message in the debug output:
The application is missing required entitlement com.apple.developer.icloud-services
I do have that setting in the entitlements file, just as it was yesterday.
On the capabilities pane, I see that there are three red flags.
Add the iCloud Feature to your App ID.
Add the iCloud Containers to your app ID.
and, under push notifications, which used to work fine also:
Add the Push Notifications feature to your App ID.
I have checked my App ID and all of these are present.
I have tried quite a few things including restarting xCode, rebooting the Mac, redownloading certificates, provisioning profiles and more, but I cannot get this resolved yet.
I work on this project on 4 different Macs and keep the code in Dropbox, but I'm only running one of them now.
CloudKit has been working great, synching on all of these Macs and also an iPhone.
I opened the iOS project and see the same issues now.
One thing I did this morning is switch the CloudKet environment on the dashboard from Production to Development so I can add more tables. Suspecting that this was causing the issue, I switched it back to Production, but the issues remain.
This sounds like your provisioning profile may have lost the entitlements that are marked in red, but it also sounds like you might have verified that on the Developer Portal already. I might suggest you contact our Developer Technical Support team and they can work 1:1 with you to resolve the issue. https://developer.apple.com/support/technical.
OK, I filed a request with tech support. I can't see anything else I can do.