Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 623
user2924482 Avatar asked Dec 08 '14 18:12

user2924482


2 Answers

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

like image 193
snagra Avatar answered Oct 27 '22 22:10

snagra


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

like image 21
Graham Gardiner Avatar answered Oct 27 '22 21:10

Graham Gardiner