I get this error when tying to run an app on a device with Xcode 5
here is the full error
CodeSign /Users/Nevo/Library/Developer/Xcode/DerivedData/RecipesBook-efcrcmgnkaitsqaxahtumfbdxtmb/Build/Products/Debug-iphoneos/RecipesBook.app
cd "/Users/Nevo/Desktop/RecipesBook for ios 7 and 6"
setenv CODESIGN_ALLOCATE "/Applications/Xcode 2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate"
setenv PATH "/Applications/Xcode 2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode 2.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
Using code signing identity "iPhone Distribution: Shay Shalev (QN94KCWC64)" and provisioning profile "ProfileRecipeBook" (52D189D8-2FFD-4939-A3C6-1CD1F8B645E0)
codesign --force --sign 4F0E5397A87B47EE07EC3288681661CBCBB4781C --resource-rules=/Users/Nevo/Library/Developer/Xcode/DerivedData/RecipesBook-efcrcmgnkaitsqaxahtumfbdxtmb/Build/Products/Debug-iphoneos/RecipesBook.app/ResourceRules.plist --entitlements /Users/Nevo/Library/Developer/Xcode/DerivedData/RecipesBook-efcrcmgnkaitsqaxahtumfbdxtmb/Build/Intermediates/RecipesBook.build/Debug-iphoneos/RecipesBook.build/RecipesBook.xcent /Users/Nevo/Library/Developer/Xcode/DerivedData/RecipesBook-efcrcmgnkaitsqaxahtumfbdxtmb/Build/Products/Debug-iphoneos/RecipesBook.app
error: can't exec 'codesign' (No such file or directory)
I copied codesign from /usr/bin/
to:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
and it worked for me.
Solved my problem, thanks for the help. The issue was with my path. I had set my path via /etc/launchd.conf and I was driving myself insane trying to edit my path via ~/.bashrc etc. Make sure /usr/bin is in the path that xcode picks up. This page reminded me:
http://overwatering.org/blog/2012/08/setting-path-osx-mountain-lion/
I'm a newb with cpp so I am sure that this solution won't work for everyone and I am sure there are many reasons not to do this in certain situations.
My solution was to disable signing:
Build settings >> Signing >> Code Signing Identity >> set this to "Don't Code Sign"
Related
I am baffled about this error since I installed xcode 4.2 from xcode 3.2 and switched back to xcode 3.2 Since then I am not able to build for device for any of my projects for any configurations.
The error shown is:
CodeSign build/Debug-iphoneos/MyProject.app cd
"/Users/macadmin/Documents/iPhoneProjectDocs/Madhup/Test/Test
Development/MyProject" setenv PATH
"/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
setenv _CODESIGN_ALLOCATE_
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
/usr/bin/codesign -f -s "iPhone Developer: Madhup (MW9495NA8W)"
"--resource-rules=/Users/macadmin/Documents/iPhoneProjectDocs/Madhup/Test/Test
Development/MyProject/build/Debug-iphoneos/MyProject.app/ResourceRules.plist"
--entitlements "/Users/macadmin/Documents/iPhoneProjectDocs/Madhup/Test/Test
Development/MyProject/build/MyProject.build/Debug-iphoneos/MyProject.build/MyProject.xcent"
"/Users/macadmin/Documents/iPhoneProjectDocs/Madhup/Test/Test
Development/MyProject/build/Debug-iphoneos/MyProject.app"
/Users/macadmin/Documents/iPhoneProjectDocs/Madhup/Test/Test
Development/MyProject/build/Debug-iphoneos/MyProject.app: object
file format invalid or unsuitable Command /usr/bin/codesign failed
with exit code 1
The things I have tried to get over this are:
Completely removed all provisioning profiles and certificates and re-install them.
Change configurations (Debug to some other)
Completely uninstall and re-install xcode
Moreover if I try to build my project from some other systems with same provisioning profile, developer certificate and same build configuration I don't face any problem.
Please help me out as I am so frustrated and thinking of OS re-install :(
So to clarify, you've removed xcode with...
sudo /Developer/Library/uninstall-devtools –mode=all
Have you also cleaned the build (Product menu -> Clean)? I know this sounds a bit of an obvious one - but lots of people forget to do it!
I have such a problem.
I used Xcode 3.2.5 earlier then I have installed 4.1 Xcode into Developer folder, so my Xcode 3.2.5 was automatically removed to Xcode 3.2.5 folder. So I was a happy iOs developer with 2 Xcodes. But then I decided to install Xcode 4.2( into Developer folder too). First time no any Xcode could be launched. After reboot everything became ok. Except this:
CodeSign build/Debug-iphoneos/MyTest.app
cd /Users/alexslabinsky/Desktop/MyTest
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
setenv _CODESIGN_ALLOCATE_ /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
/usr/bin/codesign -f -s "iPhone Developer: Alex Slabinsky (NUMBERS_here)" --resource-rules=/Users/alexslabinsky/Desktop/MyTest/build/Debug-iphoneos/MyTest.app/ResourceRules.plist --entitlements /Users/alexslabinsky/Desktop/MyTest/build/MyTest.build/Debug-iphoneos/MyTest.build/MyTest.xcent /Users/alexslabinsky/Desktop/MyTest/build/Debug-iphoneos/MyTest.app
/Users/alexslabinsky/Desktop/MyTest/build/Debug-iphoneos/MyTest.app: object file format invalid or unsuitable
Command /usr/bin/codesign failed with exit code 1
I tried almost all what could find here and by Google.com but nothing helps. Please, help me. Thanks.
I've personally had upgrade issues several times in relation to using XCode 4.x, where the only thing that solved my problems was to completely uninstall the existing Dev Tools, reboot, and then install the new ones. Uninstall is done via:
sudo <Xcode>/Library/uninstall-devtools --mode=all
When I am building my project, I am getting this error:
CodeSign "build/Debug-iphoneos/MyApp.app"
cd /Users/crackers/Desktop/MyApp/MyApp
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
setenv _CODESIGN_ALLOCATE_ /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
/usr/bin/codesign -f -s "iPhone Developer: xxxxxxx xxxxxxxx (D492H27WDR)" "--resource-rules=/Users/crackers/Desktop/MyApp/MyApp/build/Debug-iphoneos/MyApp.app/ResourceRules.plist" --entitlements "/Users/crackers/Desktop/MyApp/MyApp/build/MyApp.build/Debug-iphoneos/MyApp.build/MyApp.xcent" "/Users/crackers/Desktop/MyApp/MyApp/build/Debug-iphoneos/MyApp.app"
/Users/crackers/Desktop/MyApp/MyApp/build/Debug-iphoneos/MyApp.app: object file format invalid or unsuitable
Command /usr/bin/codesign failed with exit code 1
I have both Xcode3.x and Xcode4.x (iOS5 beta) installed in my mac.
Few week ago everything was working fine. All certificates was working fine.
All certificates are in good state.
I had moved the Xcode(s) files to new directory. After that I am getting this error.
If you moved the Xcode files to a new directory and you get this error after you did that, then obviously you should reinstall Xcode in the proper Developer location which is the default. Im running the iOS 5 Beta Xcode and it works fine in the proper directory. First completely uninstall Xcode following a tutorial from the web like this: http://macdevelopertips.com/xcode/how-to-uninstall-xcode.html
Then reinstall Xcode in the proper place, let me know if this works. IMHO it should work though.
I'm compiling an iPhone app meant to be Distributed. It's my first app so I followed the "iPhone Provisioning Profiles" instructions. Unfortunately it fails with this:
CodeSign build/*_*_.app
cd "/Users/videojuegos/Documents/*_*_"
setenv IGNORE_CODESIGN_ALLOCATE_RADAR_7181968 /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/usr/bin/codesign -f -s "iPhone Distribution: ******" "--resource-rules=/Users/videojuegos/Documents/*_*_/build/*_*_.app/ResourceRules.plist" --entitlements "/Users/videojuegos/Documents/*_*_/build/Unity-iPhone.build/Distribution-iphoneos/Unity-iPhone.build/*_*_.xcent" "/Users/videojuegos/Documents/*_*_/build/*_*_.app"
/Users/videojuegos/Documents/*_*_/build/*_*_.app: The operation was cancelled by the user.
Command /usr/bin/codesign failed with exit code 1
I thought Keychain wasn't allowing Codesign to work but as far as I can tell that isn't the case.
I also attempted running these commands from a terminal and it failed with this message:
Users/videojuegos/Documents/*_*_/build/Unity-iPhone.build/Distribution-iphoneos/Unity-iPhone.build/*_*_.xcent: cannot read entitlement data
I have made the xcode setting from scratch three times. Googled it. No results. I don't have any idea what else to try. Any suggestions?
Do you have an entitlements value in the project build settings. If so then delete it and try again
I'm new to iPhone development. I am trying to get Xcode to run an application on a phone.
The app works fine in the simulator. Initially I hit the error:
The executable was signed with invalid entitlements
I followed the steps here:
The executable was signed with invalid entitlements
But now I am getting an exit code of 11. I checked the documentation on codesign but I can't find any mention of an exit code 11 (http://gemma.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man1/codesign.1.html)
Below is the log I am getting. Any help is greatly appreciated. I am using iPhone OS 3.1.3.
Build HubPages of project HubPages with configuration Debug
CodeSign build/Debug-iphoneos/HubPages.app
cd /Users/larryfreeman/src/hub/mobile/HubPages/build/iphone
setenv IGNORE_CODESIGN_ALLOCATE_RADAR_7181968 /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/usr/bin/codesign -f -s "iPhone Developer: Larry Freeman (LT6G4W62Z2)" --resource-rules=/Users/larryfreeman/src/hub/mobile/HubPages/build/iphone/build/Debug-iphoneos/HubPages.app/Entitlements.plist --entitlements /Users/larryfreeman/src/hub/mobile/HubPages/build/iphone/build/HubPages.build/Debug-iphoneos/HubPages.build/HubPages.xcent /Users/larryfreeman/src/hub/mobile/HubPages/build/iphone/build/Debug-iphoneos/HubPages.app
Command /usr/bin/codesign failed with exit code 11
Thanks!
-Larry
Exit code 11 is SIGSEGV - codesign crashed with a segmentation fault.
Maybe try removing & re-adding your certificates & recreating the entitlements.plist file?