Fix the IOS code signing issue when using Jenkins

Source: Internet
Author: User

This week I setup the Jenkins in my Mac and try to build IOS applications. Unfortunately I got the code signing issues , either I use the Xcode plugin or Xcode command line tool. Through a couple days of Googling and I could not the find any solution the works for me, but I finally solve the issue by M Yself through different try out, and the solution is such a easy, now I would like to share with my solution.

The core reason is Jenkins are running as daemon mode in Mac, just assume it's a different user-"Jenkins", so it wil L Not has access to the keychain or provision profiles 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 is 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 on the certificate like "IPhone developer:you R_name (XXXXXXX) ", choose Copy, then click on the" System "tab, right click Mouse, choose" Paste 2 Items "; You might need to does the same thing with the certificate like "IPhone distribution:your_name".

After doing this, you'll get the second error.
2. "Code sign error:provisioning profiles ' xxxxx-xxxx-xxxx-xxxxx ' can ' t be found"
Solution: Copy The provision profile to Jenkins User folder.
The provision profile was under in the folder
/yourusername/library/mobiledevice/provisioning Profiles,
For example on my machine, the provision profiles files are under/users/steve/library/mobiledevice/provisioning profil Es
In the Mac, the Jenkins'll 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 would be fixed. Hope my finding'll be helpful to other Jenkins users.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.