I've been working on an iPhone project with iOS 4.0. I just downloaded Xcode 3.2.4 with iOS SDK 4.1 so that I can work with the updated iOS. Upon opening the project in the udpated Xcode, I found that the target read 'Base SDK Missing'. I fixed that by following the instructions here.
Now when I try building targeting any version of iOS, I receive this error (with the corresponding version referenced in the error text):
CodeSign Error: code signing is required for product type 'Application' in SDK 'Device - iOS 4.1'
I have the Team Provisioning Profile created by Xcode installed, that Provisioning Profile has my certificate, and the Code Signing Entity selected is 'iPhone Developer: Aaron Milam'.
Any ideas as to what I could be missing here?
This question is related to
iphone
ios
xcode
code-signing
In file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/SDKSettings.plist
change the CODE_SIGNING_REQUIRED YES
to
CODE_SIGNING_REQUIRED NO
Restart Xcode
Maybe your mac's date and time are incorrect. Just correct them.
Summarised form an answer to Xcode fails with "Code Signing" Error
project.pbxproj
files can be merged in such a way that two CODE_SIGN_IDENTITY
lines can be inserted. Deleting one of these normally fixes the issue.
I have created simple script to help diagnose this issue it can be found here: https://gist.github.com/4339226
A full answer can be found here.
Make sure that you have created provisioning profiles correctly.. if you did.. you must be having ... public key, private key and Certificate in Keychain Access. CHECK if you have all these..
XCode 3.2.4 Comes with the Auto device provisioning ... so you just have to sign in to your developers account it will download all valid profiles..
If you have all you need in keychain and downloaded profiles... When you are selecting iPhone Developer: Aaron Milam'. in build settings.. make sure you have selected Configuration ( on left top inside Target->Build ) you want to make build for. or you can do All configuration to make changes in all available configurations i.e. Debug, Release etc.
Be sure you code sign on the line "any iOS SDK" and not "Debug/Distribution/Release"
Here is exactly what I did :
Code signing identity -> don't code sign
* Debug -> don't code sign
** any iOS SDK -> [my developer profile]
* Distribution -> don't code sign
** any iOS SDK -> [my AppStore profile]
* Release -> don't code sign
** any iOS SDK -> [my AdHoc profile]
When I put my profiles one level above (at Debug/Ditribution/Release), it doesn't work for some reason (bug ?).
Hope it helps some of us !
Another possibility - When you Build for Archive make sure your Archive choice in your scheme is set for Distribution, not Release.
Go to Product -> Edit Scheme This brings up a new dialog.
Select Archive on the left. Make sure the build configuration is Distribution.
After trying all of the above answers, and everything else I could think of from within Xcode 4.6, I fixed this with these steps:
CODE_SIGN_IDENTITY = "iPhone Developer: Joe Smith (555NN555)"; "CODE_SIGN_IDENTY[sdk=iphoneos*]" = "iPhone Developer: Joe Smith (555NN555)";
I found 2 targets with value like that, and 2 targets with
CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTY[sdk=iphoneos*]" = "";
I copied the former pair of lines over the latter pair of lines for all cases where the latter pair was emtpy.
I then restarted Xcode, and it works fine now.
Following these 4 steps always solves my issues.
Have you updated the firmware version of the iPhone you are testing on?
I use Xcode 4.3.2, and my problem was that in there where a folder inside another folder with the same name, e.g myFolder/myFolder/.
The solution was to change the second folder's name e.g myFolder/_myFolder and the problem was solved.
I hope this can help some one.
I love Stack Overflow:
I realized that some time being too specific is not enough that is because we may have different Xcode version, I have 2 xcode version on the same Mac Pro myself. So here I would like to provide a general instruction that i hope it will work for all Xcode version:
My 2 versions are xcode 3.2.6 and 4.0. You need to find (even google for the settings) your xcode BUILD SETTINGS and its CODE SIGNING under CODE SIGNING you have CODE SIGN IDENTITY this provide you a list of IDENTIFIERS (if you do not have IDENTIFIERS go here to get one and registration is required https://developer.apple.com/ios/manage/overview/index.action - follow this instruction of Apple "Get your application on an iOS with the Development Provisioning Assistant") If you have a list of identifiers just select a valid one and run your Xcode again. It will work!
3.2.6 specific: On your scode window - click on Project -> Project settings -> Build (tab) -> there is a scroll down because the list is long MAKING SURE you scroll down to find your CODE SIGNING section
4.0 specific: On your xcode window - click on your project file left most colum -> then next colum click on your target app -> find CODE SIGNING and assign an IDENTIFIER. It should work for you.
Done!
Most common cause, considering that all certificates are installed properly is not specifying the Code Signing Identity in the Active Target settings along with the Project settings. Change these from to iPhone Developer (Xcode will select the right profile depending on App ID match).
In Xcode , change from Simulator to Device (in the dropdown at the top of the Xcode window), so that your target for application deployment will be the Device.
The default ID which is a wild card ID is like a catch all iD, when associated in Code Signing (if you are using sample files to build, they will most obviously not have com.coolapps.appfile imports, in which case without the 'Team Provisioning profile', your build would fail. So you would want to set this in your
Xcode->Project ->Edit Project Settings->Build (tab)->Code Signing Identity (header) ->Any iOS (change from Any iOS Simulator)->(select 'iPhone Developer' as value and it will default to the wildcard development provisioning profile (Team Provisioning Profile: * )
and also (VERY IMPORTANT)
Complete steps for a beginner at: http://codevelle.wordpress.com/2010/12/21/moving-from-ios-simulator-to-the-ios-device-smoothly-without-code-sign-error/
As already mentioned here if you don't want to code sign you application you can
set CODE_SIGNING_REQUIRED
to NO
. Here is method to do it without any project/files
modification:
Create file NoCodeSign.xcconfig:
CODE_SIGNING_REQUIRED = NO
Set XCODE_XCCONFIG_FILE
environment variable to path to this file:
export XCODE_CXCONFIG_FILE=/path/to/NoCodeSign.xcconfig
Now you can build your application without code signing.
Source: Stackoverflow.com