# Signing an IPA with multiple code signing identities

:::note

Overview on iOS code signing asset management

For a comprehensive overview on what Steps are available for code signing asset management, visit the [iOS code signing page](/bitrise-ci/code-signing/ios-code-signing/creating-a-signed-ipa-for-xcode-projects).

:::

You can create multiple IPA files with different code signing identities within a single Bitrise build.

During the development of your iOS app you will need multiple types of distributions for different purposes, such as internal testing or deployment to the App Store. The good news is that this does not require setting up two separate workflows on [bitrise.io](https://www.bitrise.io).

In this example we'll be setting up a Workflow to create two signed IPA files: one with the `development` and one with the `app-store` export method.

:::tip[Advanced configuration options]

The procedure lists the bare minimum requirements to configure these Steps to export Xcode archives. Check out the Step in the Workflow Editor or the Step's `step.yml` in GitHub to see all potential configuration options, including but not limited to overriding the Bitrise-managed automatic code signing options, recompiling from and including bitcode, or using a specific `.plist` file to configure exporting.

:::

**Workflow Editor**

1. Make sure all the [necessary code signing files](/bitrise-ci/code-signing/ios-code-signing/creating-a-signed-ipa-for-xcode-projects) are available for your build.
1. Make sure you have the **[Xcode Archive & Export for iOS](https://www.bitrise.io/integrations/steps/xcode-archive)** Step in your Workflow.
1. In the list of input variables, navigate to **Distribution method** and select **development** from the dropdown menu.
1. Set the **Automatic code signing method** input to the Apple service connection you want to use for code signing. The available options are:

   - `off` if you don't do automatic code signing.
   - `api-key` [if you use API key authorization](/bitrise-platform/integrations/apple-services-connection/about-connecting-to-apple-services).
   - `apple-id` [if you use Apple ID authorization](/bitrise-platform/integrations/apple-services-connection/about-connecting-to-apple-services).
1. Add the **[Export iOS and tvOS Xcode archive](https://www.bitrise.io/integrations/steps/export-xcarchive)** Step to your Workflow. This Step reuses the archive generated by the **Xcode Archive & Export for iOS** Step and does a second export from the archive.
1. Set the **Automatic code signing method** input to the Apple service connection you want to use for code signing. The available options are:

   - `off` if you don't do automatic code signing.
   - `api-key` if you use API key authorization.
   - `apple-id` if you use Apple ID authorization.
1. In the list of input variables, navigate to **Distribution method** and select **app-store** from the dropdown menu.

**Configuration YAML**

1. Make sure all the [necessary code signing files](/bitrise-ci/code-signing/ios-code-signing/creating-a-signed-ipa-for-xcode-projects) are available for your build.
1. Open the Configuration YAML of your app.
1. Make sure you have the `xcode-archive` Step in your Workflow.

   ```yaml
   my-workflow:
     steps:
     - xcode-archive:
         inputs:
   ```
1. Set the `distribution_method` input to `development`.

   ```yaml
   my-workflow:
     steps:
     - xcode-archive:
         inputs:
         - distribution_method: development
   ```
1. Set the `automatic_code_signing` input to the Apple service connection you want to use for code signing. The available options are:

   - `off` if you don't do automatic code signing.
   - `api-key` [if you use API key authorization](/bitrise-platform/integrations/apple-services-connection/about-connecting-to-apple-services).
   - `apple-id` [if you use Apple ID authorization](/bitrise-platform/integrations/apple-services-connection/about-connecting-to-apple-services).

   ```yaml
   my-workflow:
     steps:
     - xcode-archive:
         inputs:
         - automatic_code_signing: api-key
         - distribution_method: development
   ```
1. Add the `export-xcarchive` Step to your Workflow. This Step reuses the archive generated by the `xcode-archive` Step and does a second export from the archive.

   ```yaml
   my-workflow:
     steps:
     - xcode-archive:
         inputs:
         - automatic_code_signing: api-key
         - distribution_method: development
     - export-xcarchive:
         inputs:
   ```
1. Set the `automatic_code_signing` input to the Apple service connection you want to use for code signing. The available options are:

   - `off` if you don't do automatic code signing.
   - `api-key` if you use API key authorization.
   - `apple-id` if you use Apple ID authorization.

   ```yaml
   my-workflow:
     steps:
     - xcode-archive:
         inputs:
         - automatic_code_signing: api-key
         - distribution_method: development
     - export-xcarchive:
         inputs:
         - automatic_code_signing: api-key
   ```
1. Set the `distribution_method` input to `app-store`.

   ```yaml
   my-workflow:
     steps:
     - xcode-archive:
         inputs:
         - automatic_code_signing: api-key
         - distribution_method: development
     - export-xcarchive:
         inputs:
         - automatic_code_signing: api-key
         - distribution_method: app-store
   ```

And you're done! Feel free to add multiple **Export iOS and tvOS Xcode archive** Steps to your Workflows to create multiple different signed .ipa files if necessary.
