# Specify a specific Provisioning Profile

**URL:** <https://discuss.bitrise.io/t/specify-a-specific-provisioning-profile/2011>\
**Category:** Question & Answer\
**Tags:** ios\
**Created:** [June 13, 2017, 9:51am UTC](https://discuss.bitrise.io/t/specify-a-specific-provisioning-profile/2011 "2017-06-13T09:51:59Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefanz](https://avatars.discourse-cdn.com/v4/letter/s/aeb1de/32.png) [@stefanz](https://discuss.bitrise.io/u/stefanz)\
**Post date:** [June 13, 2017, 9:51am UTC](https://discuss.bitrise.io/t/specify-a-specific-provisioning-profile/2011/1 "2017-06-13T09:51:59Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [June 13, 2017, 10:00am UTC](https://discuss.bitrise.io/t/specify-a-specific-provisioning-profile/2011/2 "2017-06-13T10:00:04Z")

</div>

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](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](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/](http://devcenter.bitrise.io/ios/code-signing/)

If you’d have any questions just let us know!

---

<div class="post-metadata">

**Author:** ![clee46](https://avatars.discourse-cdn.com/v4/letter/c/c89c15/32.png) [@clee46](https://discuss.bitrise.io/u/clee46)\
**Post date:** [July 27, 2017, 7:49am UTC](https://discuss.bitrise.io/t/specify-a-specific-provisioning-profile/2011/3 "2017-07-27T07:49:00Z")

</div>

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)
```

---

<div class="post-metadata">

**Author:** ![godreikrisztian](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/godreikrisztian/32/22_2.png) [@godreikrisztian](https://discuss.bitrise.io/u/godreikrisztian)\
**Post date:** [July 27, 2017, 1:48pm UTC](https://discuss.bitrise.io/t/specify-a-specific-provisioning-profile/2011/4 "2017-07-27T13:48:16Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![clee46](https://avatars.discourse-cdn.com/v4/letter/c/c89c15/32.png) [@clee46](https://discuss.bitrise.io/u/clee46)\
**Post date:** [July 27, 2017, 6:28pm UTC](https://discuss.bitrise.io/t/specify-a-specific-provisioning-profile/2011/5 "2017-07-27T18:28:13Z")

</div>

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:

> [@godreikrisztian](#):
>
> On bitrise use the desired solution configuration|platform for your workflows.

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.

---

<div class="post-metadata">

**Author:** ![godreikrisztian](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/godreikrisztian/32/22_2.png) [@godreikrisztian](https://discuss.bitrise.io/u/godreikrisztian)\
**Post date:** [July 28, 2017, 10:45am UTC](https://discuss.bitrise.io/t/specify-a-specific-provisioning-profile/2011/6 "2017-07-28T10:45:33Z")

</div>

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](http://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

```auto
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
    ...

```

> [@clee46](#):
>
> 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?

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:

```auto
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
    ...

```

---

<div class="post-metadata">

**Author:** ![donp](https://avatars.discourse-cdn.com/v4/letter/d/96bed5/32.png) [@donp](https://discuss.bitrise.io/u/donp)\
**Post date:** [November 4, 2020, 5:44pm UTC](https://discuss.bitrise.io/t/specify-a-specific-provisioning-profile/2011/8 "2020-11-04T17:44:41Z")

</div>

Hello Viktor, it appears your links direct to a 404 page, any chance on updating the url or point to new resources?

---

<div class="post-metadata">

**Author:** ![thi.nguyen](https://avatars.discourse-cdn.com/v4/letter/t/a8b319/32.png) [@thi.nguyen](https://discuss.bitrise.io/u/thi.nguyen)\
**Post date:** [November 30, 2020, 4:23pm UTC](https://discuss.bitrise.io/t/specify-a-specific-provisioning-profile/2011/9 "2020-11-30T16:23:08Z")

</div>

Please try using this link:

> **[Collecting and exporting code signing files with codesigndoc](https://devcenter.bitrise.io/code-signing/ios-code-signing/collecting-files-with-codesigndoc/)**
>
> The open source codesigndoc tool runs a clean Xcode/Xamarin Studio Archive on your Mac, and analyzes the generated archive file.
