Search code examples
xcode4jenkinscode-signingxcodebuild

xcodebuild / Jenkins can't find the PROVISIONING_PROFILE for an iOS job


I can build with Jenkins/xcodebuild when the project has the correct Provisioning Profile selected.

We want to be able to set the provisioning profile in xcodebuild.

Unfortunately, when the jenkins user runs

xcodebuild PROVISIONING_PROFILE="XXX"

...Lots of build output...

Check dependencies

Code Sign error: Provisioning profile 'XXX' can't be found

I can run the same line and have it work with a regular user account, accessing the file in ~/Library/MobileDevice/Provisioning Profiles/

The provisioning profiles are stored in /Users/Shared/Jenkins/LibraryMobileDevice/Provisioning Profiles

Anyone know where else the Jenkins user would be looking for these?


Solution

  • To answer this question: the provisioning profiles must be named after the UUID.

    If you download and do not rename a .mobileprovision file, it will not be read by xcodebuild

    A script for doing so is in another StackOverflow answer