When I try to build my iOS XCode project in Jenkins I get the following error:
=== CLEAN NATIVE TARGET MyTarget OF PROJECT MyProject WITH CONFIGURATION Debug === Check dependencies [BEROR]Code Sign error: The identity 'iPhone Developer: My Name (xxxxxxxx)' doesn't match any valid, non-expired certificate/private key pair in your keychains
After reading some articles (like this and this) I've ensured that the login.keychain is present using:
MacMini:Keychains jenkins$ security list-keychains
"/Users/Shared/Jenkins/Home/Library/Keychains/login.keychain"
"/Library/Keychains/System.keychain"
MacMini:Keychains jenkins$
and that the SessionCreate=true is present in my /Library/LaunchDaemons/org.jenkins-ci.plist
PS. I would highlight the fact that the XCode running on my mac mini is successfully building the project,but if I run the command
/usr/bin/xcodebuild -target MyTarget -configuration Debug clean build
...I still get the same error message. Any idea?