"ipa build" passes from the command line but fails on Jenkins (Shenzhen Xcode iOS app) "ipa build" passes from the command line but fails on Jenkins (Shenzhen Xcode iOS app) jenkins jenkins

"ipa build" passes from the command line but fails on Jenkins (Shenzhen Xcode iOS app)


Assuming that your Jenkins build runs on the same machine that you tested through command line:

codesign requires the Provisioning Profiles to sign the IPA. By default, these are located here ~/Library/MobileDevice/Provisioning Profiles.

As you can see, the ~ is the user's home directory, i.e /Users/user_name_here/. The default permissions on that directory usually only allow access to that user only.

Jenkins runs by default as jenkins user. You need to make sure that your jenkins user has access to the directory where the provisioning profiles are. Or else, move the provisioning profiles to another location that jenkins user has access to, and modify your build tool to look for them there.

If your Jenkins master/slave node is not on the same Mac machine as you tested with command line, then you will have to manually copy the provisioning files to that machine too


The best way to solve this: Move the certs/keys you're trying to sign with from "login" to "System" in Keychain Access. You won't need to keep unlocking the keychain.


I'm suspecting that there is some problem with your $path or another environment variable (which is a common problem, looking like yours).

Jenkins executes its jobs in a "clean" environment (whithout any environment variable).