Could not change executable permissions on the application - xcode

Just updated to iOS 6 sdk and latest Xcode and get this when trying to build to my 3gs.
I 've added armv6 under valid architectures?
"Could not change executable permissions on the application"

I could solve it erasing an application that I had previously uploaded using the same Bundle Identifier (xcode get's confused doing the chmod). Try checking the log from xCode Organizer (Your device's Name -> Console) you should get information from that log. Good luck!

folks, i get this resolved
- because i already have the same app using the same bundle identifier installed on the phone.
- what you need to do is to delete all those apps on your iphone which is using the same bundle identifier name.
- you'll make it!!

You probably have a different target name. You can start the app from scratch, but you'll need the same target name and the same bundle identifier.

Delete the apps that were already installed on iphone/ipad with the same Bundle identifier.iphone/ipad gets confused with the apps with same bundle identifier. so change change the Bundle identifier of the current app or delete the app that was already installed.

It can happen when you launch the app from Xcode and you have the appstore version installed in the phone with the same bundle-id but a different name. In my case I'm using App_Beta when in the appstore is App.
If the two versions does not have the same product name you wont be able to test the upgrade from the old to the new version. To solve make the names match.

I went into the Organizer and selected the Applications underneath my test device. Even though I had deleted the application on my device itself, it still showed up in my list of applications. I deleted it there, and this took care of the issue for me.

You need to delete all the app's using the same bundle identifier. I did the same, but still the same error persisted on my iPod, i cleaned the (cmd + shift + k) the build and restarted the iPod and i was able to run the app on the iPod.

You just delete the apps that were already installed on your device with the same identifier.

I ran into the same problem, but I needed to keep the current installed App in the device for debug purposes. My solution was to use the same:
Target Name
Bundle identifier
Product Name

I had this error, and what fixed it for me was Product Name under Build Settings. I had changed it to something else, and started getting this error. I changed it back and it fixed it.

Just delete all the previous versions of the application. Due to mismatch/confusion about bundle identifier it happens.
I removed all the existing application with the similar identifier and was able to install.

I was able to resolve this error message simply by unplugging the USB cable, and plugging it in again after a few seconds. YMMV!

You need to make sure that your device is not set to two applications with the same Bundle ID.

I had this error when I tried copying and pasting one xcode project to build another app. What I had to do was change the bundle identifier name to something different than my previous app.

Could not change executable permissions on the application
Cause: I had icons in the files system named 29x29.png, 58x58.png, 72x72.png, etc. I had soft links (ln -s) with the required names per App Icons on iPad and iPhone. For example, Icon-Small.png was a link to the real file 29x29.png.
I did this because my program runs on different platforms, from mobile phones to desktops. Android, Apple and Microsoft all have similar requirements. So "one set of icons" and "different links for different OS" made the most sense to me.
Fix: Don't use links. Apple does not tell you that. And their error message of "Could not change executable permissions on the application" is useless.
Looking at all the different answers (and causes), it looks like lots fo things can cause it.

Related

XCode, frameworks, app submission and SwiftFolder

I have built a Swift app. I added all libraries in Project -> Target -> Link binary with Libraries. I added external frameworks such as Parse to the project too.
I then selected all frameworks under the project and created a group folder called Frameworks.
I have observed/recorded three issues:
When I run ls -l in shell, the Frameworks folder is not actually there
Only frameworks such as Parse & Bolts are actually listed under the project. Other frameworks (e.g. QuartsCore, CoreGraphics etc.) are not listed anywhere with the ls -l command
If I try to archive the project, because the Frameworks folder is not 'there' as far as xcode is concerned, the SwiftFolder is not created (which would result in the app being rejected)
Surely it should be a straight forward process. What am I missing?
Apologies in advance for the fact that my code works yet I cannot solve such a simple problem!
1: A group in Xcode is not a file system folder, it's an in-app Xcode-specific construct. You can add file system folders to Xcode, but they are different and distinct from groups.
2: iOS frameworks will not be visible in your project folder as their location is managed by Xcode. They are added/linked to your app bundle at compile time.
3: Is your app failing validation/being rejected? Sounds like it could be a separate issue, everything else you're seeing sounds normal.
Only one thing worked - Shenzhen (failed on first attempt due to space issue). Here is what you need to do:
Go to Shenzhen on github, download, run and send apple the bill ;)
In case you are wondering, before I tried Shenzhen again, I actually tried the following:
Created a "Hello World" Single View Swift application in xcode. Added all the libraries and used the xcode archive facility to see if it generates the Payload and SwiftFolder. It failed on both.
I downloaded xcode 7.1 (beta) and tried again. This time I got the Payload folder but still no luck with SwiftFolder. So don't waste time on xcode 7.1 for this.
Called apple dev support (and yes, you are likely to be billed for this) - was transferred between three call centres (English spelling - sorry) and finally submitted the issue.

Duplicated target: Xcode cannot run using the selected destination

(OS X, not iOS): "Choose a destination with a supported architecture in order to run on this system"
Fixed the copied .plist in the Build settings, removed spaces from the new product name. Can't find any difference with the original target's settings, still this dreaded error. Any ideas?
I got this error when I opened an old project under Xcode 4.5. The problem: The build setting were set to Standard Architecture, which means 64bit and 32 bit, while the minimum deployment target was set to OS X 10.4.
Setting the minimum deployment target to OS X 10.5 fixes the problem.
When i faced this issue, on top of the xcode window i changed My Mac 64-bit to My Mac 32-bit. It worked for me.
For me it was a mismatch between the filename of the executable, as specified by "Product Name" in the target build settings, and the executable filename indicated in the Info.plist. In fact, when you duplicate a target, you get a "copy" suffix that you usually change right away, and this may lead to some mistakes.
An additional indication of this mismatch can be seen when selecting the product app in Xcode, and opening it in the Finder. If the app icon is overlayed with a kind of "stop" sign, here it is, your app isn't executable.
If everything looks alright, one last thing that you should check contents of your app.
Most probably application name Info.plist file does not match what you have in your build configuration.
With Xcode 4.5.2. (4G2008a) this issue has gone away, apparently. I can now make a duplicate of the original target, fix the product name, and get a properly running application.
I started getting the same thing. I did a Clean and it seems to have fixed it.
Lion/Xcode 4.6.2
I got the same error message after accidentally copying a binary to /usr/local/bin. The binary was "manually" generated by Makefile - the building process of Xcode (5.1) was configured to place the binary in /usr/local/bin too. Removing the manually generated file and starting the build again fixed the problem.

Xcode error: failed to launch

I have a Mac app I have written to support iCloud. However, I get this when trying to run the app:
error: failed to launch /Users/padsoftware/Library/Developer/Xcode/DerivedData/Scrawl-heofvoywsunchdhjowxkvkoiqvan/Build/Products/Release/Scrawl.app/Contents/MacOS/Scrawl
The odd thing is that this appears for all of my Mac apps, with or without iCloud, with or without sandboxing, with or without entitlements, or ever with or without code signing. Any idea on how to fix this?
I had this problem too. For me, it was a code sign issue. Make sure you're signing with developer, not distribution.
I encounter this problem every once in a while. Like the others mentioned, these are the steps I take:
1. Clean (Shift+Cmd+K) ------
Removes all the product files, as well as any object files (.o files) or other intermediate files created during the build process (Apple Doc)
2. Navigate to "~/Library/Developer/Xcode/DerivedData", delete folder for app in question ------
Derived data consists of project indexes, logs, and build products including intermediate files (Apple Doc)
3. Restart Xcode
One or the other usually fixes it. I haven't had to change Code Signing settings, but that would be my next step. Wouldn't re-install Xcode unless absolutely necessary.
I had such problem also and restarting Xcode Fixed the issue .
even it happened after renaming the application ....
Under Build Settings make sure you are signing with a valid developer profile for debug and release.
Then Build for Testing
That fixed the problem.
"Product"->"Scheme"->"New Scheme" fixed my problem
Just in case it helps anyone else, my problem was fixed by rebooting my iPhone (4S). Then the app suddenly appeared on the Springboard (it was like it was already installed but somehow hidden).
...I did all the other steps (restart Xcode, clean project, delete derived data) but none of it worked this time.
What worked for me... I was already code signed as developer so I cleaned my code
menu bar -> Product -> Clean
That still didn't fix it but I noticed that I was getting handshake error, I had a large amount of apps already running on my phone (~15-20) so I exited out of all of them and retried. It worked after exiting out of all other apps.

Sharing an archived iOS build won't succeed on the clients side - no such file or directory

For one of my clients, I've developed a small iOS app. I'm a member of their dev team, so I've been using a development certificate to sign my local test builds.
Now the app is almost done and it should go into internal testing on the clients side. I created an archived build of the app which I then sent to my client. They imported it into the organizer and tried to "Share" it to be able to re-sign it using an ad hoc profile.
Creating the .ipa fails with an "no such file or directory" error though. The archive appears to be fine otherwise - the organizer shows all the usual information, the icon, and it will let them export it as another archive. Creating an .ipa without re-signing fails as well, which leads me to believe this is not an issue with ther certs and provisioning profile.
If I try the same thing on my side, writing an .ipa from the very same archive using my development cert, the operation succeeds.
It may be worth mentioning that the same procedure was working fine while we were still using XCode 3.x on earlier projects. This is the first time we've been trying this using XCode 4.
No additional (static) libraries have been used.
Any help greatly appreciated!!
Edit:
Someone at the apple dev forums suggested to me that I should check the system console for xcode error messages while attempting to export the .ipa - none were printed out. We discovered some other, older messages however, which read as follows:
18.04.11 13:54:35 /Developer/Applications/Xcode.app/Contents/MacOS/Xcode[123] /Users/User/Library/Developer/Xcode/Archives/2011-04-15/Foobar.xcarchive/dSYMs/Foobar.app.dSYM/Contents/Info.plist:
set flags (was: 00200000): Operation
not permitted
The timestamp is roughly at the time when my client first imported my archive, but we can't be sure since we didn't watch the console back then.
The message had been printed multiple time, once for every single ressource file contained in the bundle. Does this tell you guys something?
Problem solved.
Following another suggestion on the apple dev forum, we repaired permissions on both systems. Additionally, I built and archived the app again and used a different way to transmit the archive to my client. We did all of this in one try, so I can't quite tell which of these measures actually did the trick. If you stumble across this because you have the same problem, you might want to try all of this, too.
Thanks for listening!
Update:
It happened again - and this time, we tried to solve it step by step. Result: It's all about how the file is being transmitted. I just attached the archive package to a mail to my client, that's what broke it, although I don't know why. Zipping the archive before transmitting it solved the problem, however.
After downloading XCode 4.3 beta with the IOS 5 SDK, the Organizer function to share and archive stopped working with a cryptic error "No such file or directory found".
It turns out that this is related to having two different versions of codesign_allocate . To fix the problem, do the following in a terminal window.
sudo ln -s /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate /usr/bin
Another hint - try the manual way to create a shared ipa - since it gives you a lot more detail of what went wrong. See http://blog.dmahajan.net
Can you see if this is also linked to your problem?
EasyCoder's answer fixed this issue for me - I have the 5.0 beta SDK and had the same problem.
I ran the following and it was fixed:
ln -s /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate /usr/bin/codesign_allocate

Overwriting an iPhone app from a different Xcode Project

One of the apps I've developed is submitted and approved to the appstore.
Because of some big changes and a more generic code I created a new XCode project for this app.
The problem is when trying to install the same app (based on bundle identifier) from the new XCode project, it quits with a crash. If I try to install again (Build & Run/Debug) from XCode, it seems to successfully overwrite and run. So it seems the first time there are some merge / overwrite conflicts. A second install, over the failed first attempt makes it work.
I wouldn't want this to happen with app updates downloaded from the store.
I've read that the idea is not to build from XCode, but use an Ad Hoc Build through iTunes instead. This would simulate a more natural end-user process. I've tried this, but somehow it won't sync / overwrite the existing app from the appstore (no errors, the app is just not changing).
Does someone have a hint on how to solve this?
Any help on this matter would be greatly appreciated!
I run into this problem all the time. I use one Developer Profile for all my dev work (and thus, one bundle identifier).
You have to delete the old App from the phone, and do a Clean Build.
These are similar problems. (1) (2)
As it seems working with an Ad Hoc build through iTunes does work.
Yesterday I double-clicked, but never got the iTunes message warning me of an older version existing in my apps and whether I want to replace it.
Dragging the .IPA into the iTunes app section did give me this message. Telling it to replace and next syncing works okay. iTunes sync status bar displays the message "YourAppName Updating". Afterwards launching it works fine with stored data intact.
The flow described here worked for me:
How to test an iPhone application update

Resources