# iOS build fails on xcode-archive, codesign issue

**URL:** <https://discuss.bitrise.io/t/ios-build-fails-on-xcode-archive-codesign-issue/18480>\
**Category:** Builds\
**Tags:** ios\
**Created:** [October 28, 2021, 8:01am UTC](https://discuss.bitrise.io/t/ios-build-fails-on-xcode-archive-codesign-issue/18480 "2021-10-28T08:01:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![lukawski](https://avatars.discourse-cdn.com/v4/letter/l/8edcca/32.png) [@lukawski](https://discuss.bitrise.io/u/lukawski)\
**Post date:** [October 28, 2021, 8:01am UTC](https://discuss.bitrise.io/t/ios-build-fails-on-xcode-archive-codesign-issue/18480/1 "2021-10-28T08:01:26Z")

</div>

# Bitrise Build Issue Report template

## Description of the issue

Hello. My bitrise build for iOS stopped working for some reason. It complains about not finding codesign groups. I haven’t changed anything related to a code signing for some time so it’s really weird.

```auto
Resolving CodeSignGroups...

Resolving CodeSignGroups...

Filtering CodeSignInfo groups for target capabilities

Filtering CodeSignInfo groups for export method

App was signed with NON Xcode managed profile when archiving,

only NOT Xcode managed profiles are allowed to sign when exporting the archive.

Removing Xcode managed CodeSignInfo groups

Failed to find Codesign Groups

generated export options content:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">

<dict>

<key>method</key>

<string>development</string>

</dict>

</plist> <nil>

```

## Environment:

**Where did the issue happen?**

Bitrise with Xcode 13.1.x, on macOS 11.4 (Big Sur) stack.

**Which build Step causes the issue and which version of the step?**

xcode-archive

## Reproducibility

- _Does a “Rebuild” help? (You can trigger a rebuild from the Build’s page, by clicking the “Rebuild” button in the top right corner of a finished build)_ : NO
- _Does a rebuild without caches help? (You can remove the `Cache:Pull` and `Cache:Push` steps temporarily to not to use the cache, or [you can delete all the caches on the `Settings` tab of the app](http://devcenter.bitrise.io/caching/about-caching/#downloading-and-deleting-caches)._ : NO
- _Does the issue happen sporadically, or every time?_ : every time
- _Does upgrading the build Step to the latest version help?_ : NO
- _When did the issue start?_ : first failed build was on October 26th

### Local reproduction

_Can it be reproduced on your own Mac/PC by following our [local debug guide](http://discuss.bitrise.io/t/how-to-debug-your-build-locally-it-works-on-my-mac-pc-but-not-on-bitrise-io/392)?_ No, seems to work fine locally. But on my machine I have development provisioning profiles installed so it might be the reason why it works.

### Local reproduction: Linux / Android (docker based) stack builds

_Can it be reproduced by running the build locally, after doing a new git clone of the repository into the `/tmp` directory and running the build from there with the Bitrise CLI ( [Bitrise CLI](https://www.bitrise.io/cli) )? If no, can it be reproduced with Docker (using the same docker images / environment we use on [bitrise.io](http://bitrise.io))? Related guide: [Running your build locally in Docker](http://devcenter.bitrise.io/docker/run-your-build-locally-in-docker/) ._

## Build log

> **[Log in - Bitrise](https://app.bitrise.io/users/sign_in)**
>
> Bringing back the joy of iOS & Android development through automating build, testing and support cycles.

---

<div class="post-metadata">

**Author:** ![nminary](https://avatars.discourse-cdn.com/v4/letter/n/8baadc/32.png) [@nminary](https://discuss.bitrise.io/u/nminary)\
**Post date:** [November 8, 2021, 2:25pm UTC](https://discuss.bitrise.io/t/ios-build-fails-on-xcode-archive-codesign-issue/18480/2 "2021-11-08T14:25:12Z")

</div>

Hello, did you solve your issue? Is so, can you tell us how?  
We have the problem and did not find working solution yet

---

<div class="post-metadata">

**Author:** ![cathy.harmon](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/cathy.harmon/32/2674_2.png) [@cathy.harmon](https://discuss.bitrise.io/u/cathy.harmon)\
**Post date:** [November 10, 2021, 1:48pm UTC](https://discuss.bitrise.io/t/ios-build-fails-on-xcode-archive-codesign-issue/18480/3 "2021-11-10T13:48:41Z")

</div>

Typically with an issue like this, we need to be able to view the log and the settings. In order to do this, we need support access enabled. Opening a ticket with support is the best course of action.

I will take a guess here. Please check what version of Xcode Archive you are using. This step was recently updated and a new version, version 4, was released. This new version changed the name of the step input for the export method and set the default to “development”. If this step was updated in your workflow, please check the value for “Distribution method” to see if it is correct.

---

<div class="post-metadata">

**Author:** ![\_ymimura](https://avatars.discourse-cdn.com/v4/letter/_/c5a1d2/32.png) [@\_ymimura](https://discuss.bitrise.io/u/_ymimura)\
**Post date:** [November 11, 2021, 1:55am UTC](https://discuss.bitrise.io/t/ios-build-fails-on-xcode-archive-codesign-issue/18480/4 "2021-11-11T01:55:05Z")

</div>

Hello, I had the same problem, but I solved it by downgrading the version of the xcode-archive step.  
In my case, I downgraded from version 4.0.2 to 3.3.2.

---

<div class="post-metadata">

**Author:** ![lukawski](https://avatars.discourse-cdn.com/v4/letter/l/8edcca/32.png) [@lukawski](https://discuss.bitrise.io/u/lukawski)\
**Post date:** [November 22, 2021, 1:06pm UTC](https://discuss.bitrise.io/t/ios-build-fails-on-xcode-archive-codesign-issue/18480/5 "2021-11-22T13:06:49Z")

</div>

Thank you! It was exactly as you said, I had to add a distribution method to this step inputs. Thank you very much!

@_ymimura @nminary so you just have to check if your workflow uses `xcode-archive` v4. If yes just add `distribution_method` inside its inputs.

---

<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:** [December 22, 2021, 1:07pm UTC](https://discuss.bitrise.io/t/ios-build-fails-on-xcode-archive-codesign-issue/18480/6 "2021-12-22T13:07:42Z")

</div>

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