# macOS project auto provisioning

**URL:** <https://discuss.bitrise.io/t/macos-project-auto-provisioning/14920>\
**Category:** Question & Answer\
**Tags:** ios-auto-provision\
**Created:** [November 20, 2020, 5:28am UTC](https://discuss.bitrise.io/t/macos-project-auto-provisioning/14920 "2020-11-20T05:28:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![steveroy](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/steveroy/32/3044_2.png) [@steveroy](https://discuss.bitrise.io/u/steveroy)\
**Post date:** [November 20, 2020, 5:28am UTC](https://discuss.bitrise.io/t/macos-project-auto-provisioning/14920/1 "2020-11-20T05:28:56Z")

</div>

Hey, I have a macOS project that I’m trying to set up to run unit tests. I had uploaded the development certificate and provisioning profile in the **Code Signing** tab but the Xcode Test for Mac step failed with:

```
Provisioning profile "Mac Team Provisioning Profile: xxx.xxxxxx.xxxxx" doesn't include the currently selected device "xxxxxxxxxxxxxxxxxxxx"

```

The selected device in question appeared to be the one used to run the tests on Bitrise. Of course my provisioning profile doesn’t have it. And I can’t possibly know all the devices that could be used by Bitrise to run my tests. So I assume I need an auto provision step.

I didn’t find a macOS auto provision step but tried [iOS Auto Provision with App Store Connect API](https://app.bitrise.io/integrations/steps/ios-auto-provision-appstoreconnect), reasoning that iOS and macOS projects provisioning work the same way. However this yields the error:

```
Checking development provisioning profiles for 1 bundle id(s)
No profiles for platform: macOS

```

Am I heading in the right direction? If I can’t provision automatically, is there a manual alternative?

Or is there a way to run the tests without requiring provisioning?

---

<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:** [December 1, 2020, 3:33pm UTC](https://discuss.bitrise.io/t/macos-project-auto-provisioning/14920/2 "2020-12-01T15:33:08Z")

</div>

Hey steveroy,

You can manually upload profiles and certificates using the certificate and profile installer step.

 ![27%20AM](https://us1.discourse-cdn.com/flex016/uploads/bitrise/original/2X/a/a5b5d642e0e2e8a24cb200763edccc9ec5d09c13.png)

Thank you,

Thi

---

<div class="post-metadata">

**Author:** ![steveroy](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/steveroy/32/3044_2.png) [@steveroy](https://discuss.bitrise.io/u/steveroy)\
**Post date:** [December 2, 2020, 4:59am UTC](https://discuss.bitrise.io/t/macos-project-auto-provisioning/14920/3 "2020-12-02T04:59:41Z")

</div>

Thanks Thi,

I gave this another shot. When using the **Certificate and profile installer** step, I get the same error as above in the **Xcode Test for Mac** step. Which is how I ended up considering the **iOS Auto Provision** step in the first place. But if that’s not the solution, and both methods fail with the same error, maybe something else is amiss.

I’m curious about the error:

> error: Provisioning profile “Mac Team Provisioning Profile: xxx.xxxxxx.xxxxx” doesn’t include the currently selected device “xxxxxxxxxxxxxxxxxxxx” (identifier xxxxxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxxxx).

Why is it complaining about a provisioning profile for a Mac app? Shouldn’t it just need the development certificate to run the app locally?

I was reading [Getting Started with MacOS apps](https://devcenter.bitrise.io/getting-started/getting-started-with-macos-apps/) and noticed this bit:

> Running Xcode tests and deploying their results to Bitrise do not require any code signing files.
> 
> There is one exception: if you set a team for your project locally, in Xcode, then Xcode will ask for that team’s Developer certificate before running the test.

This is exactly my case: I have a team set in my project. So in **Code Signing** I do have my development certificate uploaded. Is that not how to resolve that?

---

<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:** [December 3, 2020, 5:55pm UTC](https://discuss.bitrise.io/t/macos-project-auto-provisioning/14920/4 "2020-12-03T17:55:54Z")

</div>

It depends on the project, and if you are using the Certificate and Profile installer step, it may require both development and distribution to authenticate.

Do you have a build URL?

Can you also enable support access?

> **[Enabling the Bitrise Support user for your app](https://devcenter.bitrise.io/troubleshooting/enabling-bitrise-support-user/)**
>
> If you need quick tech support from us, our onsite chat support can look into your project and fix your technical issues in the most efficient way! All you have to do is enable Bitrise Support user so that we have access to your app.

Thank you,

Thi

---

<div class="post-metadata">

**Author:** ![steveroy](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/steveroy/32/3044_2.png) [@steveroy](https://discuss.bitrise.io/u/steveroy)\
**Post date:** [December 4, 2020, 5:02am UTC](https://discuss.bitrise.io/t/macos-project-auto-provisioning/14920/5 "2020-12-04T05:02:51Z")

</div>

Hi Thi,

I did and here you go:  
[https://app.bitrise.io/build/2317cd9a07e386bb#?tab=log](https://app.bitrise.io/build/2317cd9a07e386bb#?tab=log)

I had both the development and distribution certificates but the last time I tried I removed the latter. It didn’t work either way.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/bitrise/original/2X/d/d901cf2aad020f2dd11918afc89ec2089bb87b35.png) [@system](https://discuss.bitrise.io/u/system)\
**Post date:** [January 3, 2021, 5:14am UTC](https://discuss.bitrise.io/t/macos-project-auto-provisioning/14920/6 "2021-01-03T05:14:03Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
