3
votes

I'm pretty new with iCloud - I made a container and then created a Record Type in it. Then deployed to production.

Well, I don't want this record type anymore, so I tried to delete it.

Invalid attempt to delete a record type which is active in a production container.

Well, it doesn't seem like I can delete it from Production.

Maybe if I use the red reset button in the Development environment it will let me clear the data from Production?

will be revert to the version in the production environment

That's not going to help me - what am I supposed to do then? Surely there is a way to eliminate that Record Type without creating a whole new container?

1
I have a small question that I find too stupid to merit another SE question: the container in the dashboard says "IN DEVELOPMENT" - is that ever supposed to change to "IN PRODUCTION" or something? I mean if I deploy to the App Store surely it shouldn't say in development, right?Voldemort

1 Answers

17
votes

Your main question and your comment question are related.

On the cloud kit dashboard, each container will have a blue box for the development environment and green box for the production environment. When testing, your app will access the (blue) development environment unless you specifically configure .entitlements file to point to the production environment. Beta Apps released through Testflight and apps published on the app store will always access the (green) production environment.

(In my case, I have people testing my app through testflight, and thus accessing the prod env. So, in order to share data with them, I reconfigured my .entitlements file to point to prod so when I build from xcode, I'm using the environment as my testers. But, I only did that after my schema was pretty stable, as switching back to dev to create new records, push to prod, switch back to prod is a little tedious.)

You can create and delete record types on the fly in the (blue) development environment. Once you deploy to the (green) prod environment though, that schema becomes permanent in that container. You can't delete record types from the (green) prod env. And you can't delete record types in the (blue) dev environment once they've been pushed into prod. And no, you can't delete containers, either. You can create a new container and tell you app to use that different container. But your original container with the original record type is now permanent.

So, long story short, you can create as many containers as you want, but you can't delete them. You can add and delete record types in the blue dev environment as much as you want, unless/until you push the schema to the green prod environment. Then those record types also become permanent.

The blue dev and green prod environments will never change "in development" or "deployed to prod" labels. Your app will accesses the dev or prod environment depending on the source of the app.