xcode-botsxcode-server

Xcode Server / BOT cannot find the provision profile


I set up OS X Server/Xcode server and created a BOT for CI. Everything seems fine except the installable product/archive.ipa cannot be created because the archive failed. This is the error:

Build Service Issues:

Bot Issue for Bot1 (build service warning) Integration #1 of Bot1 Open in Xcode: xcbot://(null)/botID/2a1dfcbd053b728e6dfced564601114f/integrationID/2a1dfcbd053b728e6dfced5646011de6

Assertion: No matching provisioning profile found: Your build settings specify a provisioning profile with the UUID “013173ad-b54a-4a1d-8a65-xxxxxxxxxxxx”, however, no such provisioning profile was found. File: (null):(null)

Full logs for this integration are attached.

On the same server machine, I have no problem to manually create the archive/xxx.ipa file using the selected Xcode. The provision file is obviously on the server machine.

Appreciate any suggestion or pointer.


Solution

  • You need to download and copy the provisioning profiles under the folder

    /Library/Developer/XcodeServer/ProvisioningProfiles
    

    The Xcode bots search in that folder for the correct profiles.

    Additionally make sure that you have installed your distribution/developer certificate & private key in the System keychain. Also, you may need to allow to codesign and security binary to access to previous private key. This will prevent the bot get stuck while trying to access the key to sign the app.

    Recently I wrote a blog about CI with Xcode Server and using Fastlane to upload the IPA to iTunes Connect. You could refer to the link below, if you are interested on uploading to iTunes Connect from your xcode bot:

    https://blog.xmartlabs.com/2016/03/07/ci-with-xcode-server-and-fastlane/