开发者

What's fastest way to re-test iPhone core data migration to a new version?

开发者 https://www.devze.com 2023-04-07 01:56 出处:网络
What\'s fastest way to re-test iPhone core data migration to a new version? That is, how would one set up an easy/quick way to:

What's fastest way to re-test iPhone core data migration to a new version?

That is, how would one set up an easy/quick way to:

  • set up older version of app on simulator
  • run the new version of the app from Xcode which will as part of running it开发者_JAVA百科 on the simulator effectively run the migration

BACKGROUND- haven't had to do a migration yet. It's not to me in Xcode how to do the first bullet in particular. Would one use a previous image/snapshot as part of the approach?


What I always did is:

  1. navigate to your applications folder /Users/username/Library/Application Support/iPhone Simulator/4.3.2/ notice the iOS version number, its the one you're using in the simulator
  2. there should be one or more folders with hash values, found the one you're working with
  3. in the documents folder should be your .sqlite database file (as long as you haven't changed the directory in code)
  4. backup that one (for example version 1)
  5. when you want to test the migration, simply replace this db file with your backup

(the hash may change when you delete and rebuild your app)

0

精彩评论

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