Xcode 'CodeSign error: code signing is required'

后端 未结 15 1665
离开以前
离开以前 2020-12-07 16:40

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

相关标签:
15条回答
  • 2020-12-07 17:22

    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:

    1. Close Xcode
    2. Right-click on .xcodeproj file -> show package contents
    3. Edit project.xcodeproj in a text editor
    4. Search for "CODE_SIGN_IDENTITY" - there will be pairs of lines like this:
     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.

    0 讨论(0)
  • 2020-12-07 17:24
    • 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!

    0 讨论(0)
  • 2020-12-07 17:24
    1. Populate "Code Signing" in both "Project" and "Targets" section
    2. Select valid entries in "Code Signing Identity" in both "Debug" and "Release"
    3. Under "Debug" select you Developer certificate
    4. Under "Release" select your Distributor certificate

    Following these 4 steps always solves my issues.

    0 讨论(0)
  • 2020-12-07 17:24

    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

    0 讨论(0)
  • 2020-12-07 17:26

    It happens when Xcode doesn't recognize your certificate.

    It's just a pain in the ass to solve it, there are a lot of possibilities to help you.

    But the first thing you should try is removing in the "Window" tab => Organizer, the provisioning that is in your device. Then re-add them (download them again on the apple website). And try to compile again.

    By the way, did you check in the Project Info Window the "code signing identity" ?

    Good Luck.

    0 讨论(0)
  • 2020-12-07 17:27

    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 !

    0 讨论(0)
提交回复
热议问题