# iOS Auto Provisioning Step downloads the wrong profile

**URL:** <https://discuss.bitrise.io/t/ios-auto-provisioning-step-downloads-the-wrong-profile/4733>\
**Category:** Builds\
**Created:** [April 6, 2018, 9:33am UTC](https://discuss.bitrise.io/t/ios-auto-provisioning-step-downloads-the-wrong-profile/4733 "2018-04-06T09:33:01Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![matthias.buchetics](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/matthias.buchetics/32/1223_2.png) [@matthias.buchetics](https://discuss.bitrise.io/u/matthias.buchetics)\
**Post date:** [April 6, 2018, 9:33am UTC](https://discuss.bitrise.io/t/ios-auto-provisioning-step-downloads-the-wrong-profile/4733/1 "2018-04-06T09:33:02Z")

</div>

In one of our apps, Bitrise seems to download the wrong provisioning profile for an app-store build:

```
Ensure Provisioning Profiles on Developer Portal
checking xcode managed development profile for target: APP (BUNDLE ID) with 5 services on developer portal
downloading development profile: iOS Team Provisioning Profile: BUNDLE ID
checking xcode managed app-store profile for target: APP (BUNDLE ID) with 5 services on developer portal
downloading app-store profile: iOS Team Ad Hoc Provisioning Profile: BUNDLE ID

```

Why is it using an Ad Hoc provisioning profile for the app-store build? Later on the archive step fails due to a missing profile.

Here is the build: [https://www.bitrise.io/build/768813409b8f7231](https://www.bitrise.io/build/768813409b8f7231)

---

<div class="post-metadata">

**Author:** ![yonas](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/yonas/32/1373_2.png) [@yonas](https://discuss.bitrise.io/u/yonas)\
**Post date:** [April 6, 2018, 1:41pm UTC](https://discuss.bitrise.io/t/ios-auto-provisioning-step-downloads-the-wrong-profile/4733/2 "2018-04-06T13:41:52Z")

</div>

We have a similar issue, though it’s downloading the wrong platform (iOS vs tvOS) [https://github.com/bitrise-steplib/steps-ios-auto-provision/issues/23](https://github.com/bitrise-steplib/steps-ios-auto-provision/issues/23)

---

<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:** [April 10, 2018, 4:20pm UTC](https://discuss.bitrise.io/t/ios-auto-provisioning-step-downloads-the-wrong-profile/4733/3 "2018-04-10T16:20:53Z")

</div>

@matthias.buchetics we’re working on the fix, the PR is already available ([https://github.com/bitrise-steplib/steps-ios-auto-provision/pull/24](https://github.com/bitrise-steplib/steps-ios-auto-provision/pull/24)), should be in the next update/version 🙂

---

<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:** [April 10, 2018, 4:25pm UTC](https://discuss.bitrise.io/t/ios-auto-provisioning-step-downloads-the-wrong-profile/4733/4 "2018-04-10T16:25:53Z")

</div>

@yonas thanks for reporting, just replied on github, we’ll check & fix that too ASAP! 🙂

---

<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:** [April 24, 2018, 10:37am UTC](https://discuss.bitrise.io/t/ios-auto-provisioning-step-downloads-the-wrong-profile/4733/5 "2018-04-24T10:37:27Z")

</div>

Hi all,  
thanks for the reports!

We released a new version ([1.0.2](https://github.com/bitrise-steplib/steps-ios-auto-provision/releases/tag/1.0.2)), which can distinguish between app-store and ad-hoc and ios and tvos profiles.

---

<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:** [April 26, 2018, 3:41pm UTC](https://discuss.bitrise.io/t/ios-auto-provisioning-step-downloads-the-wrong-profile/4733/6 "2018-04-26T15:41:24Z")

</div>

@matthias.buchetics & @yonas can you please test the new version of the step and let us know how it goes?

---

<div class="post-metadata">

**Author:** ![eduardo.miranda](https://avatars.discourse-cdn.com/v4/letter/e/a6a055/32.png) [@eduardo.miranda](https://discuss.bitrise.io/u/eduardo.miranda)\
**Post date:** [December 6, 2019, 1:49pm UTC](https://discuss.bitrise.io/t/ios-auto-provisioning-step-downloads-the-wrong-profile/4733/7 "2019-12-06T13:49:57Z")

</div>

Hello @viktorbenei @godreikrisztian, I created [https://github.com/bitrise-steplib/steps-ios-auto-provision/pull/100](https://github.com/bitrise-steplib/steps-ios-auto-provision/pull/100) which should solve this issue. Could you check it up?  
BTW issue still occurs in v1.4.2

---

<div class="post-metadata">

**Author:** ![Roland-Bak](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/roland-bak/32/3480_2.png) [@Roland-Bak](https://discuss.bitrise.io/u/Roland-Bak)\
**Post date:** [December 7, 2019, 7:51am UTC](https://discuss.bitrise.io/t/ios-auto-provisioning-step-downloads-the-wrong-profile/4733/8 "2019-12-07T07:51:27Z")

</div>

Hey there @eduardo.miranda,

Thanks for being so awesome and contributing with this PR 😉  
We’ll take a look at it as soon as we can! 🙂

---

<div class="post-metadata">

**Author:** ![laszlo.szucs](https://avatars.discourse-cdn.com/v4/letter/l/df705f/32.png) [@laszlo.szucs](https://discuss.bitrise.io/u/laszlo.szucs)\
**Post date:** [February 13, 2020, 3:42pm UTC](https://discuss.bitrise.io/t/ios-auto-provisioning-step-downloads-the-wrong-profile/4733/9 "2020-02-13T15:42:38Z")

</div>

Hello @matthias.buchetics,

CC: @yonas

This issue should be resolved by now, please try the latest release if the issue still persists.

> **[Releases · bitrise-steplib/steps-ios-auto-provision](https://github.com/bitrise-steplib/steps-ios-auto-provision/releases)**
>
> Contribute to bitrise-steplib/steps-ios-auto-provision development by creating an account on GitHub.

I will be closing this thread in a few days if no objections.
