Search code examples
iosxcodecloudkitcloudkit-environments

Is there any option to export all cloud kit data?


I am working on a application and I setup a development environment. Now I want to move to production environment. is There any option for moving all the data from development to production in cloud kit? or Can I export all the data in Json format?


Solution

  • When you deploy to production only the schema is copied, not the data.

    You will either have to write code to copy the data (E.g. JSON as you mentioned or persist the data locally in CoreData, synchronise with the development environment, then switch to the production environment, re-run the code and resync) or re-enter it manually.

    If you do use code, switch between the development and production environments using an entitlements file, mine is shown below for reference (change Production to Development as necessary and rebuild your code):

    Entitlements File Image