Skip to main content

Signing an IPA with multiple code signing identities

Abstract

You can create multiple IPA files with different code signing identities within a single Bitrise build. You just need to make sure the required code signing files are available and use the Export iOS and tvOS Xcode archive Step.

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.

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.

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.

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

bitrise.yml

  1. Make sure all the necessary code signing files are available for your build.

  2. Make sure you have the Xcode Archive & Export for iOS Step in your Workflow.

  3. In the list of input variables, navigate to Distribution method and select development from the dropdown menu.

    multipleexport.png
  4. Set the Automatic code signing method input to the Apple service connection you want to use for code signing. The available options are:

  5. Add the Export iOS and tvOS Xcode archive Step to your Workflow. This Step reuses the archive generated by the Xcode Archive and Export for iOS Step and does a second export from the archive.

  6. 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.

  7. In the list of input variables, navigate to Distribution method and select app-store from the dropdown menu.

    exportmethodappstore.png
  1. Make sure all the necessary code signing files are available for your build.

  2. Open the bitrise.yml file of your app.

  3. Make sure you have the xcode-archive Step in your Workflow.

    my-workflow:
      steps:
      - xcode-archive:
          inputs:
    
  4. Set the distribution_method input to development.

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

    my-workflow:
      steps:
      - xcode-archive:
          inputs:
          - automatic_code_signing: api-key
          - distribution_method: development
  6. 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.

    my-workflow:
      steps:
      - xcode-archive:
          inputs:
          - automatic_code_signing: api-key
          - distribution_method: development
      - export-xcarchive:
          inputs:
    
  7. 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.

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

    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.