Saturday, September 15, 2012
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.
Subscribe to:
Post Comments (Atom)
It works! THX a lot!!
ReplyDeleteThanks a lot!!!
ReplyDeleteIt took me a while search for an answer, final this page helped me. Thanks Steve!
ReplyDeleteThanks a lot!!
ReplyDeleteTypo in the last folder: create /Users/Shared/Jenkins/Library/MobileDevice/Provisioning Profiles and *NOT* /Users/Shared/Jenkins/Library/MobileDevice/Provisioning Profile
ReplyDeleteNotice the s at the end.
Its work for me too, Thanks
ReplyDeleteThanks, you saved my time
ReplyDeleteBuddy,... that worked like charm .. got fixed those issues , now started getting other error. BTW thanks!!!
ReplyDeleteHere is a better solution: http://stackoverflow.com/questions/9626447/unable-to-sign-ios-builds-with-jenkins?rq=1
ReplyDeleteif jenkins is executed as admin, this issue is fixed?
ReplyDeletethank you Steve.
ReplyDeleteNo more to say : thank you !!! You made my day !
ReplyDeleteYou Awesome! :D
ReplyDeleteThanks a lot!
ReplyDeleteExcellent post! This was my last struggle I could't win for long time)
ReplyDeleteI am configuring CI for my IOS project on MAC yosemite-OS and got on problem:
ReplyDeleteerror: /usr/bin/codesign --force --preserve-metadata=identifier,entitlements,resource-rules --sign /Users/mitul/Desktop/jenkins_ios_profile/PCertificates.p12 --resource-rules=/var/folders/rj/cc6d38nn53v6tk8y4jn7ghkr0000gp/T/42RbMszHQX/Payload/XXX.app/ResourceRules.plist /var/folders/rj/cc6d38nn53v6tk8y4jn7ghkr0000gp/T/42RbMszHQX/Payload/XXX.app failed with error 1
even my build and archive are getting success but not able to make .ipa file
even tried all possibilities from this /usr/bin/codesign failed with exit code 1 but no luck
Please help me what I am missing to do
My Xcode configuration is as follows:
Custom xcodebuild arguments:
CODE_SIGN_RESOURCE_RULES_PATH=/Users/mitul/Public/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/ResourceRules.plist
rest are all with default setting
Could you tell us what version of xcode does clang-scanbuild plugin support
ReplyDeleteor what all features of jenkins are available for iOS
This comment has been removed by the author.
ReplyDeleteYou Are the Best!!!! Thanx a lot.
ReplyDeleteSuperb !!!!
ReplyDeletethank you for your share, it work well !
ReplyDeleteThank you!!!
ReplyDeleteThanks Steve!
ReplyDeleteAmazing how a ~4 year old post continues to prove so useful.
Any thoughts on why different slaves can behave differently, with apparently the same configurations?
This happens _only_ when there are multiple login accounts on a machine.
Deletethx a lot !!
ReplyDeleteSimple and very helpfull! thanks
ReplyDeleteThank you so much steve.. It was very helpful!!
ReplyDeleteThese steps are not helping me as well getting the following error still --- Need help
ReplyDeleteNo profile matching 'XXXXXXXXX' found: Xcode couldn't find a profile matching 'XXXXXXXXX'. Install the profile (by dragging and dropping it onto Xcode's dock item) or select a different one in the General tab of the target editor.
Code signing is required for product type 'Application' in SDK 'iOS 10.0'
facing same issue ..... please help me badly stuck here https://stackoverflow.com/questions/46580092/jenkins-build-failed-xcode-couldnt-find-a-provisioning-profile-matching
DeleteThank you so much Steve.. It was very helpful!!
ReplyDeleteIt was very helpful. Thanks.
ReplyDeleteWith reference to point 2 ) In the mac, the Jenkins will be in /Users/Shared/Jenkins, create the following folder:
ReplyDelete/Users/Shared/Jenkins/Library/MobileDevice/Provisioning Profile, then copy the .mobileprovision file to this folder.
In my case I have /Users/Jenkins/Library/MobileDevice/Provisioning .....so should I move profile to ../Shared/..
Excellent and helpful post… I am so glad to left comment on this. This has been a so interesting ..I appreciate your effort..
ReplyDeleteIphone app development uk | ios app development uk
You Awesome! :D
ReplyDeleteThanks, it worked.
ReplyDeleteQUESTION: How to create .ipa file using jenkins?
It 's amazing article and useful for developers
ReplyDeleteiOS Online Course
Hey Steve Zhang, Thanks you saved the Day!!!
ReplyDeleteHi,
ReplyDeleteThanks for this saved my time. But now I am getting:
Signing certificate is invalid. Signing certificate "iPhone Developer:----", serial number "----", is not valid for code signing. It may have been revoked or expired.
although it is valid as I can create build in xcode using the same
That's an excellent idea, keep up the good work!
ReplyDeleteThank you for saving my life and our team life.
ReplyDeleteSharp
DeleteLampung
Metroyoutube
youtube
lampung
kuota
Indonesia
Setiap permainan judi online, ada panduan bermain agar mampu memenangkan permainan. Tanpa terkecuali dengan judi dominoqq online
ReplyDeleteasikqq
dewaqq
sumoqq
interqq
pionpoker
bandar ceme terpercaya
hobiqq
paito warna terlengkap
bocoran sgp
Great work , Appreciate ...
ReplyDeleteCROWNQQ I AGEN BANDARQ I BANDARQ ONLINE I ADUQ ONLINE I DOMINOQQ TERBAIK
ReplyDeleteYuk Buruan ikutan bermain di website CrownQQ
Sekarang CROWNQQ Memiliki Game terbaru Dan Ternama loh...
9 permainan :
=> Poker
=> Bandar Poker
=> Domino99
=> BandarQ
=> AduQ
=> Sakong
=> Capsa Susun
=> Bandar 66
=> Perang Baccarat (NEW GAME)
=> Bonus Refferal 20%
=> Bonus Turn Over 0,5%
=> Minimal Depo 20.000
=> Minimal WD 20.000
=> 100% Member Asli
=> Pelayanan DP & WD 24 jam
=> Livechat Kami 24 Jam Online
=> Bisa Dimainkan Di Hp Android0619679319
=> Di Layani Dengan 5 Bank Terbaik
=> 1 User ID 8 Permainan Menarik
Ayo gabung sekarang juga hanya dengan
mengklick Daftar CrownQQ
Link Resmi CrownQQ:
ratuajaib.com
ratuajaib.net
ratuajaib.org
BACA JUGA BLOGSPORT KAMI:
Agen BandarQ Terbaik
Winner CrownQQ
Daftar CrownQQ
Info Lebih lanjut Kunjungi :
WHATSAPP : +855882357563
Line : CS CROWNQQ
Facebook : CrownQQ Official
Jadi, PayPal ini merupakan salah satu sistem ataupun mekanisme pembayaran yang nantinya bisa dilakukan dengan secara on the web. Nah, kunjungi pulsa dengan paypal pada intinya PayPal tersebut adalah sebuah perusahaan yang memang menawarkan jasa transfer ataupun penerimaan uang melalui surat elektronik.
ReplyDeleteaphelios ct
ReplyDeleteSylas Ct
Lucian Ct
sett ct
IOLPOKER Agen Poker Deposit Ovo | Bandar Ceme | DominoQQ
ReplyDeleteDaftar IDN Poker
Agen Togel Deposit Ovo
Bandar Ceme
DominoQQ
Link ALternatif Liga588
ReplyDeleteLink Alternatif Liga588
Dewa Slot Online
Situs Slot
Slot Online
Link Daftar Liga588
Microgaming telah memperkenalkan sekitar empat game baru yang unik dan inovatif setiap bulan. Salah satu elemen paling menarik dari permainan perusahaan adalah item bagus yang dikenal sebagai Viper pokerpelangi
ReplyDelete98toto
Don't forget visit to my site bro Bandar Slot
ReplyDeleteayo tunggu apalagi website terbaik dan terpercaya win rate 98%
ReplyDeleteqqslot
qq288
judi slot
fee feel to visit my site https://idnslotjoker.com
ReplyDeleteYour blog is very nice and has sets of the fantastic piece of information. Thanks for sharing with us. If you face any technical issue or error, visit:
ReplyDeleteQuickbooks customer service
Garlic Bulb Cutting Machine
ReplyDeleteGarlic Peeling Machine
Garlic Peeling Machine
Removing Machine
Silage Machine
Peanut Peeling Machine
Türkiye'nin en güvenilir takipçi satış platformu : takipçi satın al
ReplyDeleteİnstagram takipçi mi almak istiyorsun sadece tıkla : instagram takipçi satın al
Tiktokta fenomen olmaya hazır mısın işte seçenekler : tiktok takipçi satın al
2 . takipçi satın alma linki : takipçi satın al
3 . takipçi satın alma linki : takipçi satın al
Hey! Fabulous post. It is the best thing that I have read on the internet today. Moreover, if you need instant support for QuickBooks Error, visit at QuickBooks Customer Service Our team is always ready to help and support their clients.
ReplyDeleteEste blog é muito informativo Estou feliz em postar minha opinião neste blog. Acabou sendo muito útil para mim e tenho certeza para todos os comentaristas aqui! Este é um bom artigo. Lendo isso eu achei muito informativo. 카지노사이트
ReplyDeleteObrigado por dedicar seu tempo e esforço para escrever este artigo. Mais uma vez, percebi que estava perdendo muito tempo lendo e comentando.
Por favor, visite meu site e deixe um comentário. ajude meu site
bodrumbebekleri.com
ReplyDeletebodrumbebekleri
bodrum
goltürkbükü
yalıkavak
turgutreis
gümbet
akyarlar
güvercinlik
tül perde modelleri
ReplyDeletesms onay
Türk telekom mobil ödeme bozdurma
Nft Nasıl Alinir
ankara evden eve nakliyat
trafik sigortası
DEDEKTÖR
web sitesi kurma
aşk kitapları
smm panel
ReplyDeletesmm panel
iş ilanları
İnstagram takipçi satın al
hirdavatciburada.com
beyazesyateknikservisi.com.tr
SERVİS
Tiktok Jeton Hilesi İndir
çekmeköy toshiba klima servisi
ReplyDeleteüsküdar alarko carrier klima servisi
ataşehir toshiba klima servisi
çekmeköy beko klima servisi
ataşehir beko klima servisi
maltepe lg klima servisi
kadıköy lg klima servisi
maltepe alarko carrier klima servisi
maltepe daikin klima servisi
sohbet hattı
ReplyDeletetelde sohbet
sohbet hattı
sohbet hattı
sohbet hattı
sohbet hattı
Congratulations on your article, it was very helpful and successful. e5fd5b7180cbac9477db5789cf1efc20
ReplyDeletewebsite kurma
website kurma
numara onay
Thank you for your explanation, very good content. cbd4294a0dd47a17af2befaf51e91634
ReplyDeletedefine dedektörü
Good content. You write beautiful things.
ReplyDeletemrbahis
vbet
sportsbet
korsan taksi
vbet
hacklink
taksi
mrbahis
hacklink
Thanks for sharing this nice content. If you need website technical SEO audit
ReplyDeleteGood text Write good content success. Thank you
ReplyDeletemobil ödeme bahis
slot siteleri
betmatik
betpark
kralbet
tipobet
kibris bahis siteleri
poker siteleri
elf bar
ReplyDeletebinance hesap açma
sms onay
8P2N
elazığ
ReplyDeletekağıthane
kastamonu
nevşehir
niğde
yalova
V3QCE7
bilecik
ReplyDeletegebze
ısparta
şırnak
alsancak
GJ37
kaş
ReplyDeletekastamonu
kırıkkale
kütahya
pamukkale
3VYF
https://saglamproxy.com
ReplyDeletemetin2 proxy
proxy satın al
knight online proxy
mobil proxy satın al
7E41EO
dfgdxfgxfdhgfdhggf
ReplyDeleteصيانة افران الغاز بمكة
xdfgfdxhgcvhcgjh
ReplyDeleteصيانة افران الغاز بمكة
شركة كشف تسربات المياه بالدمام fy4wVGEQ6o
ReplyDeleteشركة عزل اسطح tKd8eSHOEN
ReplyDeleteشركة مكافحة حشرات بجازان PFSZZyGCWR
ReplyDelete