# Xcode Build for Testing Step Issues

**URL:** <https://discuss.bitrise.io/t/xcode-build-for-testing-step-issues/11134>\
**Category:** Builds\
**Created:** [November 27, 2019, 1:25am UTC](https://discuss.bitrise.io/t/xcode-build-for-testing-step-issues/11134 "2019-11-27T01:25:33Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![bdaniels](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/bdaniels/32/2588_2.png) [@bdaniels](https://discuss.bitrise.io/u/bdaniels)\
**Post date:** [November 27, 2019, 1:25am UTC](https://discuss.bitrise.io/t/xcode-build-for-testing-step-issues/11134/1 "2019-11-27T01:25:33Z")

</div>

Using the build for testing step I am receiving these errors both on Bitrise and locally

> set -o pipefail && xcodebuild “-workspace” “CRM.xcworkspace” “-scheme” “CRM” “-destination” “generic/platform=iOS” “COMPILER\_INDEX\_STORE\_ENABLE=NO” “build-for-testing” | xcpretty
> 
> ❌ error: Provisioning profile “match Development com.company.crm.CRMUITests” has app ID “com.company.crm.CRMUITests”, which does not match the bundle ID “com.company.crm.CRMUITests.xctrunner”. (in target ‘CRMUITests’ from project ‘CRM’)
> 
> ❌ error: Provisioning profile “match Development com.company.crm.CRMUITests” doesn’t match the entitlements file’s value for the application-identifier entitlement. (in target ‘CRMUITests’ from project ‘CRM’)

I could use some help trying to sort this out.

---

<div class="post-metadata">

**Author:** ![bdaniels](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/bdaniels/32/2588_2.png) [@bdaniels](https://discuss.bitrise.io/u/bdaniels)\
**Post date:** [November 27, 2019, 1:42am UTC](https://discuss.bitrise.io/t/xcode-build-for-testing-step-issues/11134/2 "2019-11-27T01:42:12Z")

</div>

This seems to be related to having had setup manual code signing on my UITest target. When I switch it to automatic code signing for this target, it appears to resolve the issue.

What is the general consensus regarding code signing for test targets?

Looking at my past commits, I had changed it to manual code signing to support build-for-test, but now it’s actually breaking it.

---

<div class="post-metadata">

**Author:** ![bdaniels](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/bdaniels/32/2588_2.png) [@bdaniels](https://discuss.bitrise.io/u/bdaniels)\
**Post date:** [November 27, 2019, 1:51am UTC](https://discuss.bitrise.io/t/xcode-build-for-testing-step-issues/11134/3 "2019-11-27T01:51:34Z")

</div>

After reverting back to automatic code signing it is now working locally when build-for-testing, but on Bitrise I am getting this error

> ❌ error: No profiles for ‘com.company.crm.CRMUITests.xctrunner’ were found: Xcode couldn’t find any iOS App Development provisioning profiles matching ‘com.company.crm.CRMUITests.xctrunner’. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. (in target ‘CRMUITests’ from project ‘CRM’)

---

<div class="post-metadata">

**Author:** ![bdaniels](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/bdaniels/32/2588_2.png) [@bdaniels](https://discuss.bitrise.io/u/bdaniels)\
**Post date:** [November 27, 2019, 4:48am UTC](https://discuss.bitrise.io/t/xcode-build-for-testing-step-issues/11134/4 "2019-11-27T04:48:48Z")

</div>

Some googling hinted at xctrunner being a change with Xcode 11.

---

<div class="post-metadata">

**Author:** ![bdaniels](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/bdaniels/32/2588_2.png) [@bdaniels](https://discuss.bitrise.io/u/bdaniels)\
**Post date:** [November 27, 2019, 5:39am UTC](https://discuss.bitrise.io/t/xcode-build-for-testing-step-issues/11134/6 "2019-11-27T05:39:55Z")

</div>

Ok so I reverted back to manual code signing, and updated my app identifier and bundle identifer for the UI Test target to include .xctrunner at the end. This seems to get me past all this. The question now is if this is the correct approach.

---

<div class="post-metadata">

**Author:** ![tamaspapik](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/tamaspapik/32/251_2.png) [@tamaspapik](https://discuss.bitrise.io/u/tamaspapik)\
**Post date:** [November 27, 2019, 8:52am UTC](https://discuss.bitrise.io/t/xcode-build-for-testing-step-issues/11134/7 "2019-11-27T08:52:18Z")

</div>

I think using manual code signing is not required, just the .xctrunner suffix of the bundle id.

---

<div class="post-metadata">

**Author:** ![bdaniels](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/bdaniels/32/2588_2.png) [@bdaniels](https://discuss.bitrise.io/u/bdaniels)\
**Post date:** [November 27, 2019, 5:15pm UTC](https://discuss.bitrise.io/t/xcode-build-for-testing-step-issues/11134/8 "2019-11-27T17:15:33Z")

</div>

Specifying the bundle ID as com.company.CRMUITests.xctrunner caused the error message to mention that no profile was found for Bundle ID of com.company.CRMUITests.xctrunner.xctrunner

What I got to work was having my bundle ID as com.company.CRMUITests and my provisioning profile as com.company.CRMUITests.xctrunner

---

<div class="post-metadata">

**Author:** ![paymand](https://avatars.discourse-cdn.com/v4/letter/p/e19b73/32.png) [@paymand](https://discuss.bitrise.io/u/paymand)\
**Post date:** [December 11, 2019, 1:16pm UTC](https://discuss.bitrise.io/t/xcode-build-for-testing-step-issues/11134/9 "2019-12-11T13:16:00Z")

</div>

So why is this happening all of a sudden? I’m starting to get the same error. Is this linked to Xcode version?

---

<div class="post-metadata">

**Author:** ![paymand](https://avatars.discourse-cdn.com/v4/letter/p/e19b73/32.png) [@paymand](https://discuss.bitrise.io/u/paymand)\
**Post date:** [December 11, 2019, 1:42pm UTC](https://discuss.bitrise.io/t/xcode-build-for-testing-step-issues/11134/10 "2019-12-11T13:42:26Z")

</div>

> [@bdaniels](#):
>
> Some googling hinted at xctrunner being a change with Xcode 11

Yes, solution stated here works for me: [xcode 11 changes the bundle id of WDA · Issue #13086 · appium/appium · GitHub](https://github.com/appium/appium/issues/13086#issuecomment-559488669)

---

<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 10, 2020, 1:42pm UTC](https://discuss.bitrise.io/t/xcode-build-for-testing-step-issues/11134/11 "2020-01-10T13:42:29Z")

</div>

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