We have enabled iCloud capability in our application and enabled below services,
But while trying to export the build through the archive, it's throwing me the below error,
Profile doesn't include the
com.apple.developer.icloud-container-environment
entitlement.
I have tried to set the com.apple.developer.icloud-container-environment entitlement
in Entitlements file also as Production
or Development
but it did not help me either.
Any clue how to resolve this error?
For me, the trick was making sure it was capitalized: "Production" is different from "production" according to Apple.
As indicated:
https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_icloud-container-environment
Here's how I fixed it:
I created an iCloud container on the CloudKit dashboard (in the iCloud section of the Signing & Capabilities in Xcode).
I assigned the newly created container to my app (Developer Website > Certificates, Identifiers & Profiles > Identifiers > my app ID > Capabilities > iCloud > Edit button) and saved the app ID configuration.
Then I created a new App Store provisioning profile for this app ID and used it to manually sign the app when I uploaded it in Xcode.
This can also be done by Automatically manage signing. Just select the team, add Capability ICloud. Mark Tick on Container Checkbox and you will get the container there. Reference screenshot attached.
I followed this link. Look at the answer from @AppleStaff that says to click this link
Here is a screenshot of it filled out:
In the Description
section you can add whatever you. At the bottom of theIdentifier
section, it says
We recommend using a reverse-domain name style string (i.e., com.domainname.appname).
Fill it out like this-
Identifier
: iCloud.com.yourCompanyName.yourAppName
Description
: yourAppNameContainer (or whatever you want)
Press Continue when your finished.
Afterwards, go to Xcode
> Blue icon
in the upper left hand corner > Signing & Capabilities
(in the Targets
section) > iCloud
(you should have already previously enabled iCloud) > click the small Reload Button
(wait a few seconds) > tick
the name that you choose above:
Try the following steps, which might help you
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With