10

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) which already contains the old app I get the error: "Could not change executable permissions on the application."

The new executable works ok if I run it on the simulator or delete the current application on the device and install fresh. My concern is people upgrading to this latest version of the app won't be able to.

How do you handle this scenario?

Eric
  • 1,014
  • 2
  • 13
  • 22
  • 2
    This is a duplicate of this one: http://stackoverflow.com/questions/11391710/start-over-ios-app. Unfortunately, that one hasn't been answered either. By the way, have you read this: http://www.joelonsoftware.com/articles/fog0000000069.html? – woz Jul 23 '12 at 14:20
  • 2
    haha nice article. Truth be told it was my first app ever written in objective C so its pretty, pretty bad and crashes all the time. Poor me right? Well I want to correct it for my users. Trying to go through and correct my shoddily written code is going to take longer than doing it over the right way, especially for future updates. Thanks for the 12 year old article though :p – Eric Jul 23 '12 at 14:47
  • 1
    This can happen if you change the name of your app and not the identifier. Double check the name under the icon is the same as your previous version – Danny Parker Sep 24 '12 at 13:33
  • 1
    Check the answer to this question, which seems to solve your issue http://stackoverflow.com/questions/12547706/could-not-change-executable-permissions-on-the-application/12559057#12559057 – Ignacio Oroná Sep 24 '12 at 20:59
  • Eric, did you release your upgrade and did it cause any issues? I'm having the same problem. Upgrade is ready to release but concerned about this error. – Fraggle Sep 30 '12 at 14:52

6 Answers6

20

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.

brynbodayle
  • 6,546
  • 2
  • 33
  • 49
  • 1
    Is it a new issue with XCode 4.5? I've never encountered it before and it doesn't seem to be that common. It's clearly a bug right? I mean is there any documentation on this "feature"? – Fraggle Oct 03 '12 at 19:15
  • Have you previously been able to build over App Store builds from Xcode and attach the debugger? I haven't... – brynbodayle Oct 03 '12 at 19:18
  • So you get the same error if you try to run over an App Store build? I certainly haven't gotten this message before XCode 4.5. I don't know for sure if I tried previously to run a development build over my App Store version, but I suspect that I have tried it. – Fraggle Oct 03 '12 at 19:28
  • Yes I do. Previously it was the same. – brynbodayle Oct 03 '12 at 20:46
  • 4
    Update: I just released the new version of my app in the app store (which had the permissions error) and I was able to upgrade over the previous store release successfully. So at least existing users are not effected by this XCode bug. – Fraggle Oct 05 '12 at 19:54
  • I've always been able to do this in the past. – powerj1984 Jul 16 '13 at 19:22
2

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.

Jake
  • 21
  • 2
1

For simulating upgrade through App store, do the following exercise

  1. 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)

  2. Now load the binary through iTunes syncing in your device. It would upgrade on top of the existing application.

  3. If everything goes okay then your app should be good.

DonDyck
  • 1,451
  • 5
  • 20
  • 35
1

Check for the bundle identifier, both old and new app should have the same identifier.

Suhaiyl
  • 1,071
  • 9
  • 17
0

Clean project, and remove previous build from device

Rajneesh071
  • 30,846
  • 15
  • 61
  • 74
0

watch this video, you must uninstall the app from your test device first
http://www.youtube.com/watch?v=Q-zrXdSEvJc

Mohammed Elrashidy
  • 1,820
  • 1
  • 14
  • 16