I'm building a test tool to verify content in CloudKit, but I want to be able to select the container's environment.
On iOS, you can select either the "Development" or the "Production" environment when you export your app for ad hoc testing, but you don't have that option on OS X. It always points to the "Development" environment.
Anyone knows, if there is a programmatically way to set or select what container environment you want to work with, either on OS X or iOS?
In the entitlements file, add in the row of com.apple.developer.icloud-container-environment
and you can switch the value of that back and forth between Development
and Production
.
I know this might be a bit late for those who posted but for others with the same problem, in the entitlement file change the com.apple.developer.icloud-container-environment
from Development
to Production
Then delete your app from your device so you get a clean build. When you run it, it should work. The key is to have a clean build.
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