测试迁移映射模型的核心数据
我想知道一些人对测试映射模型的最佳方法有何看法?我目前正在开发一个应用程序来升级应用程序商店中的应用程序,并希望在提交之前对映射模型进行严格测试。
I was wondering what some people's opinions are about the best way to test a mapping model? I'm currently working on an app to an upgrade of an app in the app store and want to test the mapping model hard before submitting.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
偶然发现这个,为了测试迁移,在启动模拟器之前,只需...复制一个文件。您需要使用旧版本覆盖您的应用程序数据库(所有 CoreData 数据和元数据都在)
模拟器在那里安装您的应用程序:
"/Users/<用户名>/Library/Application Support/iPhone Simulator//Applications//"
CoreData 数据库可能就在那里(取决于您的内容)做) :
"/Users/<用户名>/Library/Application Support/iPhone Simulator//Applications//Documents/whatever.sqlite3"
您可以快速打开此文件夹从终端使用:
然后只需在迁移之前保留备份,并在启动应用程序之前将其复制到模拟器一上。
Found this one accidentally, to test a migration, before starting simulator, just... copy a file. You need to overwrite your app database with an older version (all CoreData data and metadata is in)
The Simulator install your app there :
"/Users/<username>/Library/Application Support/iPhone Simulator/<iOS Version>/Applications/<Some UUID>/"
The CoreData Database is probably there (depends on what you do) :
"/Users/<username>/Library/Application Support/iPhone Simulator/<iOS Version>/Applications/<Some UUID>/Documents/whatever.sqlite3"
You can quickly open this folder from terminal using :
Then just keep a backup before migration, and copy it over simulator one before starting your app.
我一直在做同样的事情。
我使用 iPhone 配置实用程序来安装我们的应用程序的 1.0 版本(反复)。之后,我只需在 Xcode 的调试器中运行应用程序的当前版本 (1.0.1)。效果很好。华泰
I have been doing exactly this same thing.
I use iPhone Configuration Utility to install the 1.0 version of our app (repeatedly). After that, I simply run the current version of the app (1.0.1) in the debugger in Xcode. Works just fine. HTH