Use production CloudKit during development?

Eric picture Eric · May 12, 2015 · Viewed 13.1k times · Source

My iOS and Mac apps have been launched to the App Store and all of my users, including myself, are using the CloudKit production database. My question is, is there any way to target the production environment for my development builds? It seems there is no way to target the production environment outside of the Mac App Store, and for iOS, only Ad Hoc distribution can target the production environment.

Answer

RawMean picture RawMean · Nov 4, 2016

Add the following entry to your entitlements file and perform a clean build.

This allows you to run your application in Xcode with the CloudKit in the production mode.

Entry to add: com.apple.developer.icloud-container-environment with value: Production. Note: Will not work with simulator

enter image description here