core data “Can't find model for source store”;

前端 未结 3 2047
逝去的感伤
逝去的感伤 2021-01-15 18:10

Heres the problem... I Have an app in the app store, which uses core data... I have been updating my model correctly (using versions etc) but Just recently I have accidental

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-15 18:51

    For future reference and not recommended.

    If the model is unrecoverable, you can "fake it".

    1. Create a new model that is identical to the one you lost
    2. Test it and see if you get lucky (unlikely).
    3. Write down the entity hashes that Core Data spits out in the log
    4. Input those hashes into the model as overrides in the (Version Hash Modifier)
    5. Run your migration again.
    6. Never ever modify the production model again. Check it into source control immediately on shipping.

提交回复
热议问题