zoukankan      html  css  js  c++  java
  • 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.

  • 相关阅读:
    NOIP模拟 1
    wlan
    IS-IS IGP
    linux 基础 软件的安装 *****
    第五部分 linux 软件安装RPM SRPM与YUM
    第四部分 linux使用者管理
    添加rpmforge源 centos 7
    x86 保护模式 十 分页管理机制
    X86保护模式 八操作系统类指令
    poj2230 Watchcow【欧拉回路】【输出路径】(遍历所有边的两个方向)
  • 原文地址:https://www.cnblogs.com/zhangsheng/p/3719382.html
Copyright © 2011-2022 走看看