I have an app on the store for which I want to start rewriting the entire application \"from scratch\". When I try to build and execute the new app on my device (iPhone 4) w
I just ran into this issue also. What I did wrong was name the Xcode PROJECT file a different name than the old one. Naming it identically to the old project fixed the error and everything worked fine. I also kept bundleID and display name the same. The key to fixing the error for me was the .xcodeproj name.
I believe the issue has to do with the App's provisioning.
The version of the app on your device, downloaded from the App Store, has been signed with a Distribution profile. When you build from Xcode and try to install over it you are using a Development profile and trying to attach the debugger.
Based on my experience you can not overwrite an App Store app signed with a Distribution profile if you build from Xcode using a Development profile and try to install over the App Store app.
Try building from Xcode using a Distribution provisioning profile and without attaching the debugger.
Also, people will never experience this kind of error when upgrading their app in the App Store because both provisioning profiles are required to be a Distribution profile.
Clean project, and remove previous build from device
Check for the bundle identifier, both old and new app should have the same identifier.
For simulating upgrade through App store, do the following exercise
Prepare a code signed binary (.ipa) of the new code with the same credentials as the old one (same bundle ID, dev profile, version # can be different)
Now load the binary through iTunes syncing in your device. It would upgrade on top of the existing application.
If everything goes okay then your app should be good.
watch this video, you must uninstall the app from your test device first
http://www.youtube.com/watch?v=Q-zrXdSEvJc