0

I am having an app on app store. I have to update model version after every 2 months on average due to updates.

I have 7 versions right now and they will definitely increase in future.

enter image description here

I have some questions:

  • How I can efficiently manage this
  • Can I delete my older version?
  • How many versions I can add?
iBug
  • 2,334
  • 3
  • 32
  • 65

2 Answers2

1

How I can efficiently manage this

Continue to increase versions when you add changes to model.

Can I delete my older version?

Yes you can. Just open data model in finder and delete version, re-add data model to project. Also make sure you handle NSPersistentStore creation fail (if merge is unsuccessful).

How many versions I can add?

As many as you need.

f3n1kc
  • 2,087
  • 18
  • 18
1

How I can efficiently manage this

I recommend naming the model versions based on the release they are associated with. It helps to keep things straight.

Can I delete my older version?

Yes but not recommended. If someone is still using an older version of your app they will fail to migrate if the source is not there.

How many versions I can add?

Unlimited. However you should only have a version for each production release where data structure has changed. If you have intermediate versions that only exist for development, I would recommend removing them as they don't impact the user.

Lastly, make sure you have a unit test that migrates from every old version to the current version. Core Data is not temporal and will not go from 1 to 2 to 3. It only understands source and destination. Can your app currently migrate from 1 to 10? If not, you need to address that.

Marcus S. Zarra
  • 46,571
  • 9
  • 101
  • 182