I am trying to fix this issue for hours now. I have checked the App ID and confirmed the iCloud containers. Also i have entered the same in the app entitlements.
But there is a always a red mark before "Add the “iCloud containers” entitlement to your App ID". I created the new provisioning profile and removed the expired provision files also. This is the first time i am facing this issue.
Is this issue related with the developer certificate signing or something?
I was having the same problem couple of days ago. Fixed it by doing these steps:
Worked for me.