putpkt: Error and testing Core-Data Lightweight migration
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 sur开发者_如何学Pythone, 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.
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.
精彩评论