1

I have an App which uses core data with a persisten database where the user can store data.

The first version of the App was targeted for iOS 4.1

I've done a massive update user-end and developer-end. The App is now targeted for iOS 5.1 because i wanted to take advantadge of Storyboards and ARC. So, instead of going to the old project and begin changing things, I started a new project from scratch. I gave the project the same bundleID and I set the version and build to 2.0 (both of them). The xcode project has a different name, however.

The App works fine in both simulator and device. However in order to check whether the update process will be OK, I installed the old version on both devices (iPhone and iPad) and then, I killed the App from the background and I launched the 2.0 version from xcode.

The App is installed (the icon is updated) but the app won't launch. I tried to tap the App on the home screen again but it just doesn't work. The only way it works is if I delete the App from the device and install the 2.0 version. The problem is that the sqlite database is deleted from the documents and the user will lose his/her data.

On the console the only message is the following:

error: failed to launch '/Users/marcal/Library/Developer/Xcode/DerivedData/pureNMR-ddeelrvexokmoocaqkbwswvyubhi/Build/Products/Debug-iphoneos/pureNMR.app/pureNMR' -- failed to send the qLaunchSuccess packet

I'm sure I'm not the only one who has faced this problem and I'd would really appreciate some help here.

Thanks in advance!

UPDATE:

I've cleaned the Derived Data on Xcode again. Then I checked the App name, which didn't match with the original App (v1.0). When I did that, Xcode changed the bundleID to match the App name, so I had to find out how to change the bundleID again to match the original one. This is important because otherwise it would be considered a new App.

After all that, I installed the v1.0 on the device, quit the app, deleted it from the background and installed the v2.0

Now the console gives me the following error:

error: failed to launch '/Users/marcal/Library/Developer/Xcode/DerivedData/pureNMR-ddeelrvexokmoocaqkbwswvyubhi/Build/Products/Debug-iphoneos/Pure NMR.app/Pure NMR' -- No such file or directory (/Users/marcal/Library/Developer/Xcode/DerivedData/pureNMR-ddeelrvexokmoocaqkbwswvyubhi/Build/Products/Debug-iphoneos/Pure NMR.app/Pure NMR)

The App doesn't launch imediately (this is when it gives me the error). However, the important thing is that when I tap the App on the device it launches perfectly and works just fine. Even better the data stored on the sqlite db on the v1.0 remains there as expected.

I think now the error is because I deleted the derived data, but otherwise is fine.

Further discussion on the problem is welcomed.

Marcal
  • 1,371
  • 5
  • 19
  • 37
  • I have seen errors similar to this when trying to run a release build on my device directly. You can't debug with an app that was signed with a release profile. – coneybeare Jul 05 '12 at 19:55
  • I don't really understand what you mean. Do you think that it woudn't be a problem once on the App store? – Marcal Jul 05 '12 at 19:57
  • Nevermind, I see you are running under "Debug-iphoneos". – coneybeare Jul 05 '12 at 19:59
  • possible duplicate of [failed to send the qLaunchSuccess packet](http://stackoverflow.com/questions/10055109/failed-to-send-the-qlaunchsuccess-packet) – coneybeare Jul 05 '12 at 20:00

1 Answers1

0

Try restarting Xcode and your device, clean, then build and try again.

coneybeare
  • 33,113
  • 21
  • 131
  • 183
  • Dind't help. On the simulator gives no problem at all and it updates just fine. Now that I think of it some days ago I deleted the derived data of the project on Xcode. i don't know if it has something to do with it. – Marcal Jul 05 '12 at 20:08