When building an iOS app, in the âCertificate and Provisioning Profile Installer stepâ you can specify the âProvisioning profile URLâ. If I upload several Provisioning Profiles via the âCode Signingâ tab (eg. dev, test and stage) how do I tell Bitrise to use the âtestâ Provisioning Profile for a specific workflow. $BITRISE_PROVISION_URL contains all provisioning profiles (I cannot specify a specific profile).
Hi @stefanz,
Thanks for asking this here!
You can specify that in your Xcode project and in the Xcode Archive step (Select method for export
input).
If you use the Xcode 8 auto code signing option, which is now the default for new projects, then the base signing (to create the (xcarchive
) is always performed with a special team development profile. To get that weâd suggest you to use codesigndoc as described here: http://devcenter.bitrise.io/ios/code-signing/#collect-the-required-files-with-codesigndoc
To specify the type of export code signing you want to use for generating the IPA (from the xcarchive
) you should use the Xcode Archive stepâs Select method for export input/option. Related guide: http://devcenter.bitrise.io/ios/code-signing/#configure-xcode-archive-to-create-the-signed-ipa
You can find more info in our iOS code signing guide at http://devcenter.bitrise.io/ios/code-signing/
If youâd have any questions just let us know!
How would you accomplish this same thing using Xamarin Archive? I am trying to achieve the same thing as @stefanz, but I am using Xamarin to build iOS and Android apps simultaneously. I donât believe the Xamarin Archive step has a similar âSelect method for exportâ option.
In the âCertificate and profile installerâ step, I do see a field to specify the Provisioning Profile URLâ. However, I am unable to figure out how I can get the URL download location for each of the 3 provisioning profiles I have uploaded to the âCode Signingâ tab.
I tried looking in the Build Logs for the download location, but the URL is starred out:
=> Downloading provisioning profile: 1/2
Downloading (https://con***85c) to (/var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/bitrise-cert-tmp283166656/profile-0.mobileprovision)
Hi @clee46,
the easiest way is to define different solution configuration|platform configs (also wire in mapping to project configuration|platform), for different code sign types.
For the mapped project configuration|platform define direct code signing properties (Signing Identity and Provisioning Profile).
On bitrise use the desired solution configuration|platform for your workflows.
The other way is to upload certificates and profiles as GENERIC FILE (last section on code sign tab in workflow editor). When you upload a generic file, you have to specify an environment variable, which will hold the download url of the file.
In your workflows, specify these env vars for certificate-and-profile-installer step related input values.
Hi @godreikrisztian, thanks for your reply!
I understand your suggestion to use Generic File Storage, since it is very easy to retrieve the URL for the file location. However, I donât quite follow what you meant by:
What is meant by âconfiguration/platform configsâ? The main issue I am having now is, how can I retrieve the URL download location for either a provisioning profile or certificate that I have uploaded to the âCode Signingâ tab? Once I can do that, I should have no problem specifying the URL to the âCertificate and profile installerâ step.
Hi @clee46,
regarding to: On bitrise use the desired solution configuration|platform for your workflows.
This is part of the first solution, where you specify different configurations (in your solution) for different release types.
For example for app store builds you may define:
- solution configuration:
ReleaseAppStore
- map this solution configuration to project configurations (you may define
ReleaseAppStore
configuration for the ios project as well, this way the solution configuration - project configuration mapping is:ReleaseAppStore - ReleaseAppStore
) - for project configuration (
ReleaseAppStore
) specify direct code sign properties - on bitrise.io lets say you have a workflow which deploys to app store, this workflow should contain xamarin-archive step, set ReleaseAppStore for xamarin_configuration of the step
workflows:
wf1:
steps:
...
- xamarin-archive:
inputs:
- xamarin_configuration: ReleaseAppStore # for app store builds
- xamarin_platform: iPhone
...
wf2:
steps:
...
- certificate-and-profile-installer:
inputs:
- xamarin_configuration: ReleaseDevelopment # for development builds
- xamarin_platform: iPhone
...
The certificate download urls are stored (in pipe (|
) separated list): BITRISE_CERTIFICATE_URL
The certificate passpharses are stored (in pipe (|
) separated list): BITRISE_CERTIFICATE_PASSPHRASE
The provisioning profile download urls are stored (in pipe (|
) separated list): BITRISE_PROVISION_URL
If you upload multiple certificates, you can not refer directly to a single certificate.
But if you upload your code sign files as GENERIC FILE, you have to assign an env var per file, which will hold the download location of the file.
Then use this env vars for Certificate and profile installer
step inputs, like:
workflows:
wf1:
steps:
...
- certificate-and-profile-installer:
inputs:
- certificate_url: $MY_CERT_AS_GENERIC_FILE_1
- certificate_passphrase: $MY_CERT_PASSPHRASE_1 # define as secret/app/workflow env
- provisioning_profile_url: $MY_PROFILE_AS_GENERIC_FILE_1
...
wf2:
steps:
...
- certificate-and-profile-installer:
inputs:
- certificate_url: $MY_CERT_AS_GENERIC_FILE_2
- certificate_passphrase: $MY_CERT_PASSPHRASE_2 # define as secret/app/workflow env
- provisioning_profile_url: $MY_PROFILE_AS_GENERIC_FILE_2
...
Hello Viktor, it appears your links direct to a 404 page, any chance on updating the url or point to new resources?
Please try using this link: