putpkt:错误和测试 Core-Data 轻量级迁移
我有一个 xcode 项目,有 4 个目标(2 个应用程序,每个目标 1 个 iPhone 和 1 个 iPad 版本)。我最近实现了核心数据轻量级迁移。
我目前只测试其中两个应用程序,即 iPhone 版本,将它们称为应用程序 A 和应用程序 B。我可以在我的 iPhone 上运行应用程序 A 的当前应用程序商店版本,然后安装新版本的应用程序 A 来测试轻量级迁移。它工作正常,没问题。
然后,我对 App B 尝试同样的操作。我可以毫无问题地在我的 iPhone 上安装 App B 的当前应用商店版本。但是,当我尝试在 iPhone 上安装新版本的应用程序 B 时,我每次都会收到以下错误(或其变体):“putpkt:写入失败,管道损坏”
我很困惑,因为当前的两个版本是在同一个项目中,并且每个配置(调试、发布、分发)都具有完全相同的设置。这不是临时分发。
我在这个论坛和任何地方读到的关于此错误的每一篇文章都建议删除应用程序、重新启动设备、重新启动 xcode 等。当然,我可以让它以这种方式工作。但我无法以这种方式测试我的迁移。如果我从设备中删除旧版本的应用程序,则不会迁移任何内容!
我正在为此抓狂。这两个应用程序原本位于两个不同的项目中,我将应用程序 B 添加到应用程序 A 项目中作为新目标 - 这是我唯一能想到的,因为我感觉我已经看过了所有内容。我真的很感激一些帮助来解决这个问题。我对发送无法测试的数据库更新感到恶心 - 我不能冒险破坏人们的数据,特别是当我在当前版本之前没有提供备份选项时。啊。
编辑:当我尝试在设备上运行 App B 而不更新时,我经常收到以下错误: 启动可执行文件时出错...不知道如何运行。尝试“帮助目标”。
编辑:我认为我遇到了这个麻烦,因为我重命名了应用程序 B 的产品名称。我认为这更改了捆绑包,并且不允许我迁移数据。我会尝试将其改回来并发布更新。与此同时,合并捆绑包似乎对应用程序 A 运行良好。
I have an xcode project that has 4 targets (2 apps, 1 iPhone and 1 iPad version for each). I have recently implemented Core Data Lightweight Migration.
I am currently only testing two of the apps, the iPhone versions, call them App A and App B. I am able to run the current app store version of App A on my iPhone, then install my new version of App A to test the Lightweight Migration. It works fine, no problem.
Then, I try the same thing with App B. I am able to install the current app store version of App B on my iPhone no problem. BUT, when I try in install the new version of app B on my iPhone, I get the following error (or a variant of it) EVERY time: "putpkt: write failed, broken pipe"
I am confused since the two current versions are in the same project and have the exact same settings for every configuration (debug, release, distribution). The is not ad-hoc distribution.
Every post I have read for this error on this forum, and anywhere, suggests things like removing the app, restarting the device, restarting xcode, etc. And sure, I can get it to work that way. BUT I cannot test my migration that way.. If I remove the old version of the app from the device nothing is getting migrated!
I am pulling my hair out over this. The two apps were originally in two different projects, and I added App B to the App A project as a new target - that is the only thing I can think of, as I feel like I have looked at everything. I would really appreciate some help to figure out this problem. I feel sick about sending out a database update that I cannot test - I can't take the chance of corrupting people's data, especially when I have not offered a backup option until this current version. Ugh.
EDIT: when I try to run App B on the device without updating, I often get the following error:
Error Starting Executable... Don't know how to run. Try "help target".
EDIT: I think I am having this trouble because I renamed the product name for app B. I think this changed the bundle and will not allow me to migrate data. I will try to change it back and post an update. It seems like merge bundles IS working well for app A in the meantime.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保新项目和原始项目具有相同的产品名称和相同的数据模型名称为我解决了这个问题。
Making sure the new project and the original project had the same product name and the same data model name fixed this problem for me.