Search code examples
iosobjective-cxcodecloudkit

CloudKit: switch container environment from Development to Production


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?


Solution

  • 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.

    enter image description here