开发者

adding Indexed to Core Data property - when is it created? Will it break app update?

开发者 https://www.devze.com 2023-03-08 08:32 出处:网络
I am releasing an update to my app and I Indexed a few fields in my model to speed up searching and lookups.

I am releasing an update to my app and I Indexed a few fields in my model to speed up searching and lookups.

Is this going to break my update requiring a re-install? Or will it be a smooth upgrad开发者_运维问答e and those properties will just get indexed the next time the app is run?

I did not change the model in any other way.


Will break. You changed the model after all.

Just change it and let it run in the simulator. it should throw you an exeption since they differ. You could use versioning, but that is a pain for a small change.


Any time you change the model in any way at all, you need to use versioning to continue using existing data stores (like the ones that users already have in their copies of the app). For the changes you describe this should be quite simple-- you can use automatic lightweight migration and the updating should be automatic and quick.

0

精彩评论

暂无评论...
验证码 换一张
取 消