zoukankan      html  css  js  c++  java
  • Jenkins Xcode 证书设置错误 Code Sign error: No matching codesigning identity found: No codesigning identities

    Jenkins 集成Xcode 项目的时候在证书上遇到了问题。实际上如果在本地的话。只要Xcode工程里选择了项目就不需要重新设置证书了。jenkins会自动找到这个证书,只要在build setting 里设置的是正常的。
    并且在xcode 里能正常编译。

    Check dependencies Code Sign error: No codesigning identities found: No codesigning identities (i.e. certificate and private key pairs) that match the provisioning profile specified in your build settings (“qingyunDeveloper”) were found.

    如果遇到类似的错误 解决办法:
    首先打开keychain keys 找到apple 的开发者证书。然后复制。 再选择左边的系统(system)把刚复制的证书放进去。
    如果这个还没有解决。
    接下来第二步:
    找到你用户下的Provisioning Profiles 文件。目录为 /Users/xxx/Library/MobileDevice/Provisioning Profiles xxx表示你自己的用户名
    把这里面所有的证书复制到/Users/Shared/Jenkins/Library/MobileDevice/Provisioning Profile   这个文件。


    最后提示
    iPhone.build/ProjectCos.xcent /Users/chenqing/Sqy/iOSProject/cyou/Svn/Cos/CosXCode_lxh/build/ProjectCos.app
    
    ** BUILD SUCCEEDED **
    
    Finished: SUCCESS


    参考资料:
    http://code-dojo.blogspot.co.uk/2012/09/fix-ios-code-signing-issue-when-using.html

    Fix the iOS code signing issue when using Jenkins

    This week I setup the Jenkins on my Mac and try to build iOS applications. unfortunately I got the code signing issues, either I use xcode plugin or xcode command line tool. Through a couple days of googling and I could not find any solution that works for me, but I finally solve this issue by myself through different try out, and the solution is such an easy, now I would like to share with my solution.

    The core reason is Jenkins is running as daemon mode in Mac, just assume it is a different user - "Jenkins", so it will not have access to the keychain or provision profile as a you login using your credentials, which cause the code signing issue.
    I found I have following 2 errors

    1. "Code Sign error: There are no valid certificate/private key pairs in the default keychain"
    Solution: Copy your iPhone developer certificate from "login" keychain to "System" keychain.
    Detailed steps:
      open the "Keychain Access" application, click the login tab, right click the certificate like "iPhone Developer: your_name (XXXXXXX)", choose copy, then click the "System" tab, right click mouse, choose "Paste 2 items"; you might need to do the same thing with the certificate like "iPhone Distribution: your_name".

    After doing this, you will get the second error.
    2. "Code Sign error: Provisioning profile 'xxxxx-xxxx-xxxx-xxxxx' can't be found"
    Solution: Copy the provision profile to Jenkins user folder.
    The provision profile is under in the folder
    /YourUserName/Library/MobileDevice/Provisioning Profiles,
    for example in my machine, the provision profile files are under /Users/steve/Library/MobileDevice/Provisioning Profiles
    In the mac, the Jenkins will be in /Users/Shared/Jenkins, create the following folder:
    /Users/Shared/Jenkins/Library/MobileDevice/Provisioning Profile,  then copy the .mobileprovision file to this folder.

    After doing this, the code signing issues will be fixed. Hope my finding will be helpful to other Jenkins users.




    ,
  • 相关阅读:
    Java day03第三课流程控制
    java day02第二课基本数据类型、修饰符、运算符
    Objective-C 枚举类型和字符串互转方案
    UISlider
    ios中AES和RSA 加密
    1. SEL和IMP(动态性)
    《iOS开发进阶》
    【旧事重提】iOS中文件读写
    Apple移动设备处理器指令集 armv6、armv7、armv7s及arm64
    Unity3D 与 Xcode的结合
  • 原文地址:https://www.cnblogs.com/qingjoin/p/3929493.html
Copyright © 2011-2022 走看看