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.

Fix the iOS code signing issue when using Jenkins的更多相关文章

  1. (译)iOS Code Signing: 解惑

    子龙山人 Learning,Sharing,Improving! (译)iOS Code Signing: 解惑 免责申明(必读!):本博客提供的所有教程的翻译原稿均来自于互联网,仅供学习交流之用,切 ...

  2. iOS Code Signing: 解惑详解

    iPhone开发的代码签名 代码签名确保代码的真实以及明确识别代码的来源.在代码运行在一个开发系统以前,以及在代码提交到Apple发布以前,Apple要求所有的的应用程序都必须进行数字签名.另外,Ap ...

  3. iOS Provisioning Profile(Certificate)与Code Signing详解

    引言 关于开发证书配置(Certificates & Identifiers & Provisioning Profiles),相信做 iOS 开发的同学没少被折腾.对于一个 iOS ...

  4. 【转】iOS Provisioning Profile(Certificate)与Code Signing详解 -- 待看

    原文网址:http://blog.sina.com.cn/s/blog_82c8198f0102vy4j.html 引言 关于开发证书配置(Certificates & Identifiers ...

  5. 【转】 iOS Provisioning Profile(Certificate)与Code Signing详解

    原文:http://blog.csdn.net/phunxm/article/details/42685597 引言 关于开发证书配置(Certificates & Identifiers & ...

  6. [转载]iOS Provisioning Profile(Certificate)与Code Signing详解

    原文:http://blog.csdn.net/phunxm/article/details/42685597 引言 关于开发证书配置(Certificates & Identifiers & ...

  7. CodeSign error: code signing is required for product type Application in SDK iOS

    在真机测试的时候往往会突然出现这样一个错误,code signing is required for product type 'Application' in SDK 'iOS 7.0'  ,就是说 ...

  8. [BEROR]CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 8.1'

    解决方法: 选择project->Build Settings -> Code Signing -> Code Signing Identity -> Debug -> ...

  9. Code signing is required for product type 'Application' in SDK 'iOS 11.4'

    查看链接: https://blog.csdn.net/Fantasy_Jun/article/details/78082359 处理方法: 将code signing identity设置为iOS ...

随机推荐

  1. Cocos2d-x 核心概念 - Node(节点)与Node层级架构

    Cocos2d-x采用层级结构管理场景 层 精灵 等节点(Node)对象 一个场景包含了多个层,一个层又包含多个对象 层级结构中的节点(Node)可以是场景,精灵等任何对象 节点的层级结构 Scene ...

  2. Java时间的处理

    1. Java计算时间依靠1970年1月1日开始的毫秒数.2. Date类的构造函数Date()返回代表当前创建的时刻的对象.Date的方法getTime()返回一个long值在数值上等于1970年1 ...

  3. Error:No suitable device found: no device found for connection "System eth0"

    环境描述: Vmware 故障说明: 在克隆几台虚拟机,发现启动后不能配置IP地址等信息,使用linux命令: “ifup eth0”也不能激活网卡, 而在使用"service networ ...

  4. java利用Scanner获取键盘输入

    首发地址:我的网易博客 在运行一个java程序的时候,可能我们需要在运行的时候传递一些参数进去...咋办呢... java提供了一个Scanner类,利用这个类,我们可以很方便的获取键盘输入的参数.. ...

  5. 离线更新VSAN HCL数据库

    从VSAN 6.0起,VSAN提供了Health Check功能,其中就包括VSAN HCL数据库,通过此运行状况检查验证用于 HCL 检查的 VMware 兼容性指南数据库是否是最新的.这些 VCG ...

  6. linux 系统下 ngnix 显示目录形式

    vi  /usr/local/nginx/conf/nginx.conf   #编辑配置文件,在server {下面添加以下内容: location  / { autoindex on; autoin ...

  7. python3 装饰器

    #Author by Andy#_*_ coding:utf-8 _*_#装饰器的原则及构成:# 原则:# 1.不能修改被装饰函数的源代码.# 2.不能修改被装饰函数的调用方式.# 3.不能改变被装饰 ...

  8. 【Fiddler】改写返回数据功能

    方法一:打断点 1.在手机上设置好代理后,随便进入一个APP:之后选择Rules->Automatic Breakpoints->After Responses,在返回值处打断点 2.重新 ...

  9. node与mongodb的使用

    1.mongdb安装好后,在.bin文件夹下执行mongod.exe --dbpath=D:\mongodb\db  即可启动mongodb,表示将数据放在db这个文件夹,且每一次启动要执行完整的这句 ...

  10. JAVA04类与对象之课后问题解决

    1.验证ClassAndObjectTest.java(使用自定义类) public class ClassAndObjectTest { public static void main(String ...