Giter VIP home page Giter VIP logo

steps-xcode-archive's Introduction

Xcode Archive & Export for iOS

Step changelog

Automatically manages your code signing assets, archives and exports an .ipa in one Step.

Description

The Step archives your Xcode project by running the xcodebuild archive command and then exports the archive into an .ipa file with the xcodebuild -exportArchive command. This .ipa file can be shared, installed on test devices, or uploaded to the App Store Connect. With this Step, you can use automatic code signing in a CI environment without having to use Xcode. In short, the Step:

  • Logs you into your Apple Developer account based on the Apple service connection you provide on Bitrise.
  • Downloads any provisioning profiles needed for your project based on the Distribution method.
  • Runs your build. It archives your Xcode project by running the xcodebuild archive command and exports the archive into an .ipa file with the xcodebuild -exportArchive command. This .ipa file can be shared and installed on test devices, or uploaded to App Store Connect.

Configuring the Step

Before you start:

  • Make sure you have connected your Apple Service account to Bitrise. Alternatively, you can upload certificates and profiles to Bitrise manually, then use the Certificate and Profile installer step before Xcode Archive
  • Make sure certificates are uploaded to Bitrise's Code Signing tab. The right provisioning profiles are automatically downloaded from Apple as part of the automatic code signing process.

To configure the Step:

  1. Project path: Add the path where the Xcode Project or Workspace is located.
  2. Scheme: Add the scheme name you wish to archive your project later.
  3. Distribution method: Select the method Xcode should sign your project: development, app-store, ad-hoc, or enterprise.

Under xcodebuild configuration:

  1. Build configuration: Specify Xcode Build Configuration. The Step uses the provided Build Configuration's Build Settings to understand your project's code signing configuration. If not provided, the Archive action's default Build Configuration will be used.
  2. Build settings (xcconfig): Build settings to override the project's build settings. Can be the contents, file path or empty.
  3. Perform clean action: If this input is set, a clean xcodebuild action will be performed besides the archive action.

Under Xcode build log formatting:

  1. Log formatter: Defines how xcodebuild command's log is formatted. Available options are xcpretty: The xcodebuild command's output will be prettified by xcpretty. xcodebuild: Only the last 20 lines of raw xcodebuild output will be visible in the build log. The raw xcodebuild log is exported in both cases.

Under Automatic code signing:

  1. Automatic code signing method: Select the Apple service connection you want to use for code signing. Available options: off if you don't do automatic code signing, api-key if you use API key authorization, and apple-id if you use Apple ID authorization.
  2. Register test devices on the Apple Developer Portal: If this input is set, the Step will register the known test devices on Bitrise from team members with the Apple Developer Portal. Note that setting this to yes may cause devices to be registered against your limited quantity of test devices in the Apple Developer Portal, which can only be removed once annually during your renewal window.
  3. The minimum days the Provisioning Profile should be valid: If this input is set to >0, the managed Provisioning Profile will be renewed if it expires within the configured number of days. Otherwise the Step renews the managed Provisioning Profile if it is expired.
  4. The Code signing certificate URL, the Code signing certificate passphrase, the Keychain path, and the Keychain password inputs are automatically populated if certificates are uploaded to Bitrise's Code Signing tab. If you store your files in a private repo, you can manually edit these fields.

If you want to set the Apple service connection credentials on the step-level (instead of using the one configured in the App Settings), use the Step inputs in the App Store Connect connection override category. Note that this only works if Automatic code signing method is set to api-key.

Under IPA export configuration:

  1. Developer Portal team: Add the Developer Portal team's name to use for this export. This input defaults to the team used to build the archive.
  2. Rebuild from bitcode: For non-App Store exports, should Xcode re-compile the app from bitcode?
  3. Include bitcode: For App Store exports, should the package include bitcode?
  4. iCloud container environment: If the app is using CloudKit, this input configures the com.apple.developer.icloud-container-environment entitlement. Available options vary depending on the type of provisioning profile used, but may include: Development and Production.
  5. Export options plist content: Specifies a plist file content that configures archive exporting. If not specified, the Step will auto-generate it.

Under Step Output Export configuration:

  1. Output directory path: This directory will contain the generated artifacts.
  2. Export all dSYMs: Export additional dSYM files besides the app dSYM file for Frameworks.
  3. Override generated artifact names: This name is used as basename for the generated Xcode archive, app, .ipa and dSYM files. If not specified, the Product Name (PRODUCT_NAME) Build settings value will be used. If Product Name is not specified, the Scheme will be used.

Under Caching:

  1. Enable collecting cache content: Defines what cache content should be automatically collected. Available options are none: Disable collecting cache content and swift_packages: Collect Swift PM packages added to the Xcode project

Under Debugging:

  1. Verbose logging*: You can set this input to yes to produce more informative logs.

🧩 Get started

Add this step directly to your workflow in the Bitrise Workflow Editor.

You can also run this step directly with Bitrise CLI.

Examples

Build a development IPA:

- xcode-archive:
    inputs:
    - project_path: ./ios-sample/ios-sample.xcodeproj
    - scheme: ios-sample
    - distribution_method: development

Build a development IPA with custom xcconfig content:

- xcode-archive:
    inputs:
    - project_path: ./ios-sample/ios-sample.xcodeproj
    - scheme: ios-sample
    - distribution_method: development
    - xcconfig_content: |
        CODE_SIGN_IDENTITY = Apple Development

Build a development IPA with overridden code signing setting:

- xcode-archive:
    inputs:
    - project_path: ./ios-sample/ios-sample.xcodeproj
    - scheme: ios-sample
    - distribution_method: development
    - xcconfig_content: |
        DEVELOPMENT_TEAM = XXXXXXXXXX
        CODE_SIGN_IDENTITY = Apple Development
        PROVISIONING_PROFILE_SPECIFIER = 12345678-90ab-cdef-0123-4567890abcde

Build a development IPA with custom xcconfig file path:

- xcode-archive:
    inputs:
    - project_path: ./ios-sample/ios-sample.xcodeproj
    - scheme: ios-sample
    - distribution_method: development
    - xcconfig_content: ./ios-sample/ios-sample/Configurations/Dev.xcconfig

⚙️ Configuration

Inputs
Key Description Flags Default
project_path Xcode Project (.xcodeproj) or Workspace (.xcworkspace) path. The input value sets xcodebuild's -project or -workspace option. required $BITRISE_PROJECT_PATH
scheme Xcode Scheme name. The input value sets xcodebuild's -scheme option. required $BITRISE_SCHEME
distribution_method Describes how Xcode should export the archive. required development
configuration Xcode Build Configuration. If not specified, the default Build Configuration will be used. The input value sets xcodebuild's -configuration option.
xcconfig_content Build settings to override the project's build settings, using xcodebuild's -xcconfig option. You can't define -xcconfig option in Additional options for the xcodebuild command if this input is set. If empty, no setting is changed. When set it can be either: 1. Existing .xcconfig file path. Example: ./ios-sample/ios-sample/Configurations/Dev.xcconfig 2. The contents of a newly created temporary .xcconfig file. (This is the default.) Build settings must be separated by newline character (\n). Example: COMPILER_INDEX_STORE_ENABLE = NO ONLY_ACTIVE_ARCH[config=Debug][sdk=*][arch=*] = YES COMPILER_INDEX_STORE_ENABLE = NO
perform_clean_action If this input is set, clean xcodebuild action will be performed besides the archive action. required no
xcodebuild_options Additional options to be added to the executed xcodebuild command. Prefer using Build settings (xcconfig) input for specifying -xcconfig option. You can't use both. -destination is set automatically, unless specified explicitely.
log_formatter Defines how xcodebuild command's log is formatted. Available options: - xcpretty: The xcodebuild command's output will be prettified by xcpretty. - xcodebuild: Only the last 20 lines of raw xcodebuild output will be visible in the build log. The raw xcodebuild log will be exported in both cases. required xcpretty
automatic_code_signing This input determines which Bitrise Apple service connection should be used for automatic code signing. Available values: - off: Do not do any auto code signing. - api-key: Bitrise Apple Service connection with API Key. - apple-id: Bitrise Apple Service connection with Apple ID. required off
register_test_devices If this input is set, the Step will register the known test devices on Bitrise from team members with the Apple Developer Portal. Note that setting this to yes may cause devices to be registered against your limited quantity of test devices in the Apple Developer Portal, which can only be removed once annually during your renewal window. required no
test_device_list_path If this input is set, the Step will register the listed devices from this file with the Apple Developer Portal. The format of the file is a comma separated list of the identifiers. For example: 00000000–0000000000000001,00000000–0000000000000002,00000000–0000000000000003 And in the above example the registered devices appear with the name of Device 1, Device 2 and Device 3 in the Apple Developer Portal. Note that setting this will have a higher priority than the Bitrise provided devices list.
min_profile_validity If this input is set to >0, the managed Provisioning Profile will be renewed if it expires within the configured number of days. Otherwise the Step renews the managed Provisioning Profile if it is expired. required 0
certificate_url_list URL of the code signing certificate to download. Multiple URLs can be specified, separated by a pipe (|) character. Local file path can be specified, using the file:// URL scheme. required, sensitive $BITRISE_CERTIFICATE_URL
passphrase_list Passphrases for the provided code signing certificates. Specify as many passphrases as many Code signing certificate URL provided, separated by a pipe (|) character. Certificates without a passphrase: for using a single certificate, leave this step input empty. For multiple certificates, use the separator as if there was a passphrase (examples: pass|, |pass|, |) sensitive $BITRISE_CERTIFICATE_PASSPHRASE
keychain_path Path to the Keychain where the code signing certificates will be installed. required $HOME/Library/Keychains/login.keychain
keychain_password Password for the provided Keychain. required, sensitive $BITRISE_KEYCHAIN_PASSWORD
fallback_provisioning_profile_url_list If set, provided provisioning profiles will be used on Automatic code signing error. URL of the provisioning profile to download. Multiple URLs can be specified, separated by a newline or pipe (|) character. You can specify a local path as well, using the file:// scheme. For example: file://./BuildAnything.mobileprovision. Can also provide a local directory that contains files with .mobileprovision extension. For example: ./profilesDirectory/ sensitive
export_development_team The Developer Portal team to use for this export Defaults to the team used to build the archive. Defining this is also required when Automatic Code Signing is set to apple-id and the connected account belongs to multiple teams.
compile_bitcode For non-App Store exports, should Xcode re-compile the app from bitcode? required yes
upload_bitcode For App Store exports, should the package include bitcode? required yes
icloud_container_environment If the app is using CloudKit, this configures the com.apple.developer.icloud-container-environment entitlement. Available options vary depending on the type of provisioning profile used, but may include: Development and Production.
export_options_plist_content Specifies a plist file content that configures archive exporting. If not specified, the Step will auto-generate it.
output_dir This directory will contain the generated artifacts. required $BITRISE_DEPLOY_DIR
export_all_dsyms Export additional dSYM files besides the app dSYM file for Frameworks. required yes
artifact_name This name will be used as basename for the generated Xcode Archive, App, IPA and dSYM files. If not specified, the Product Name (PRODUCT_NAME) Build settings value will be used. If Product Name is not specified, the Scheme will be used.
cache_level Defines what cache content should be automatically collected. Available options: - none: Disable collecting cache content - swift_packages: Collect Swift PM packages added to the Xcode project required swift_packages
api_key_path Local path or remote URL to the private key (p8 file) for App Store Connect API. This overrides the Bitrise-managed API connection, only set this input if you want to control the API connection on a step-level. Most of the time it's easier to set up the connection on the App Settings page on Bitrise. The input value can be a file path (eg. $TMPDIR/private_key.p8) or an HTTPS URL. This input only takes effect if the other two connection override inputs are set too (api_key_id, api_key_issuer_id).
api_key_id Private key ID used for App Store Connect authentication. This overrides the Bitrise-managed API connection, only set this input if you want to control the API connection on a step-level. Most of the time it's easier to set up the connection on the App Settings page on Bitrise. This input only takes effect if the other two connection override inputs are set too (api_key_path, api_key_issuer_id).
api_key_issuer_id Private key issuer ID used for App Store Connect authentication. This overrides the Bitrise-managed API connection, only set this input if you want to control the API connection on a step-level. Most of the time it's easier to set up the connection on the App Settings page on Bitrise. This input only takes effect if the other two connection override inputs are set too (api_key_path, api_key_id).
verbose_log If this input is set, the Step will print additional logs for debugging. required no
Outputs
Environment Variable Description
BITRISE_IPA_PATH Local path of the created .ipa file
BITRISE_APP_DIR_PATH Local path of the generated .app directory
BITRISE_DSYM_DIR_PATH This Environment Variable points to the path of the directory which contains the dSYMs files. If export_all_dsyms is set to yes, the Step will collect every dSYM (app dSYMs and framwork dSYMs).
BITRISE_DSYM_PATH This Environment Variable points to the path of the zip file which contains the dSYM files. If export_all_dsyms is set to yes, the Step will also collect framework dSYMs in addition to app dSYMs.
BITRISE_XCARCHIVE_PATH The created .xcarchive file's path
BITRISE_XCARCHIVE_ZIP_PATH The created .xcarchive.zip file's path.
BITRISE_XCODEBUILD_ARCHIVE_LOG_PATH The file path of the raw xcodebuild archive command log. The log is placed into the Output directory path.
BITRISE_XCODEBUILD_EXPORT_ARCHIVE_LOG_PATH The file path of the raw xcodebuild -exportArchive command log. The log is placed into the Output directory path.
BITRISE_IDEDISTRIBUTION_LOGS_PATH Exported when xcodebuild -exportArchive command fails.

🙋 Contributing

We welcome pull requests and issues against this repository.

For pull requests, work on your changes in a forked repository and use the Bitrise CLI to run step tests locally.

Note: this step's end-to-end tests (defined in e2e/bitrise.yml) are working with secrets which are intentionally not stored in this repo. External contributors won't be able to run those tests. Don't worry, if you open a PR with your contribution, we will help with running tests and make sure that they pass.

Learn more about developing steps:

steps-xcode-archive's People

Contributors

adborbas avatar banyikanna avatar bazscsa avatar bence1001 avatar birmacherakos avatar bitrise-coresteps-bot avatar bitrise-silver avatar godrei avatar istvankovacs-bitrise avatar kdobmayer avatar lpusok avatar lszucs avatar matrangam avatar ofalvai avatar renovate[bot] avatar richard-bogdan-bitrise avatar ryogak avatar shams-ahmed avatar szabadember avatar timsylvester avatar tothszabi avatar trapacska avatar viktorbenei avatar vshah23 avatar zoltan-baba avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

steps-xcode-archive's Issues

exportArchive: The operation couldn’t be completed. (IDEDistributionErrorDomain error 1.)

xcodebuild -exportArchive -archivePath /Users/vagrant/deploy/XyzApp.xcarchive -exportPath /Users/vagrant/deploy -exportOptionsPlist /Users/vagrant/deploy/export_options.plist
2015-10-28 18:06:38.623 xcodebuild[4333:14102] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/4f/945ywsh506g31f58fpcbg0840000gn/T/XzyApp_2015-10-28_18-06-38.621.xcdistributionlogs'.
2015-10-28 18:06:39.237 xcodebuild[4333:14102] [MT] IDEDistribution: Step failed: <IDEDistributionSigningAssetsStep: 0x7fd98176a200>: Error Domain=IDEDistributionErrorDomain Code=1 "The operation couldn’t be completed. (IDEDistributionErrorDomain error 1.)"
error: exportArchive: The operation couldn’t be completed. (IDEDistributionErrorDomain error 1.)

no scheme found with name: XXXXXX in project: build/iOS/Debug/XXXXXX.xcodeproj

Exporting ipa with ExportOptions.plist
No custom export options content provided, generating export options...
export-method specified: development
no scheme found with name: XXXXX in project: build/iOS/Debug/XXXXXX.xcodeproj

Using 2.4.11 in attempt to downgrade and fix, both are not working and failing at this point

line 254: bundle: command not found

  • CLI build 'bitrise run master'
  • Using Xcode 7.2 (7C68)
  • Archive succeds, but extracting IPA from archive fails with this error message
▸ Signing /Users/xxxx/Library/Developer/Xcode/DerivedData/xxxx-hhobqdtgwfytyyfvrwubscaclggk/Build/Intermediates/ArchiveIntermediates/xxxx/InstallationBuildProductsLocation/Applications/xxxx.app
▸ Touching xxxx.app.dSYM
▸ Archive Succeeded

=> Exporting IPA from generated Archive ...

 (i) Using Xcode 7 'exportOptionsPlist' option
/var/folders/kh/4r11f1kd38z1yyj6vm7_5sp40000gp/T/bitrise112534962/step_src/step.sh: line 254: bundle: command not found
ERRO[09:06:10] Step (Xcode: Create Archive) failed, error: (exit status 127) 
|                                                                              |
+----+--------------------------------------------------------------+----------+
| 🚫  | Xcode: Create Archive (exit code: 127)                       | 472 sec  |
+----+--------------------------------------------------------------+----------+

Code=14 "No applicable devices found."

Im getting this error when trying to archive.

Error Domain=IDEDistributionErrorDomain Code=14 "No applicable devices found." UserInfo={NSLocalizedDescription=No applicable devices found.}

I have found the solution to work locally for me was:

rvm system

This seems to resolve the issue, i will create a quick bash step to run before i archive to see if this fixes the issue on bitrise.

Can not archive with Charts

hi,
i built success my prj with command line:

xcodebuild -workspace ios/xxx.xcworkspace -scheme xxx -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build

But i don't built successfully with bitrise xcode-archive. It console to message:

ios/scatter/RNScatterChartView.swift:5:8: error: no such module 'Charts'
import Charts
       ^

** ARCHIVE FAILED **


The following build commands failed:
        CompileSwift normal arm64 /xxx/ios/scatter/RNScatterChartView.swift
        CompileSwift normal arm64 /xxx/ios/bar/RNBarChartViewBase.swift
        CompileSwift normal arm64 /xxx/ios/bar/RNHorizontalBarChartManager.swift
        CompileSwift normal arm64 /xxx/ios/candlestick/RNCandleStickChartView.swift
        CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
(5 failures)
Archive failed, error: exit status 65

Expose location of .app folder.

The .app folder is needed sometimes by other services like Saucelabs to run acceptance tests. It'd be great if this step generated an output variable with the path to it. 😄

xcodebuild ... archive hangs without any output (missing shared scheme)

Hey guys,

I have a problem with my Pro-Test-Account of Bitrise.io.
After I configured a complete workflow I always get a build process of 45 minutes - then the build aborts.
On my local computer it takes no minute to execute the xcodebuild command to complete.
The steps before the xCode command takes around 6 minutes.
So normally it should be possible to finish everything within 10 minutes 👍

Workflow

  1. Preparing the Build Environment
  2. Activate SSH key (RSA private key)
  3. Git Clone Repository
  4. Do anything with Script step
  5. Xcode Archive for iOS
  6. Cleaning up the Virtual Machine

The "do anything" is only for preparing the project. It's a cordova / ionic v2 project. So I must do npm install -g ionic cordova for example before ionic build ios. Then the platforms/ios folder is available with the TestApp.xcodeproj file in it.

Configuration

Version: Always latest
Should this step run even if a previous step failed?: No
Select method for export: auto-detect
Include bitcode: yes
Rebuild from bitcode: yes
The Developer Portal team to use for this export:
Working directory: $BITRISE_SOURCE_DIR/platforms/ios
Project (or Workspace) path: $BITRISE_SOURCE_DIR/platforms/ios/TestApp.xcodeproj
Scheme name: TestApp
Configuration name:
Output directory path: $BITRISE_DEPLOY_DIR
Force Developer Portal team to use during archive: AY2H9C3YC1
Force code signing with Identity:
Force code signing with Provisioning Profile Specifier:
Force code signing with Provisioning Profile: b284373b-9b5f-4e01-9af0-6442b6bb5222
Do a clean Xcode build before the archive?: no
Output tool: xcodebuild (xcpretty tested, too and not working, too!)
Additional options for xcodebuild call:
Export the generated archive?: yes
Use deprecated ipa export method?: no
Export all dsyms: no
Custom export options plist content: ad-hoc

Log

[...]

Touch build/emulator/TestApp.app
    cd /Users/vagrant/git/platforms/ios
    export PATH="/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode-beta.app/Contents/Developer/usr/bin:/Users/vagrant/.bitrise/tools:/usr/local/bin:/usr/local/sbin:~/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/opt/go/libexec/bin:/Users/vagrant/go/bin:/Users/vagrant/bitrise/tools/cmd-bridge/bin/osx"
    /usr/bin/touch -c /Users/vagrant/git/platforms/ios/build/emulator/TestApp.app



CodeSign build/emulator/TestApp.app
    cd /Users/vagrant/git/platforms/ios
    export CODESIGN_ALLOCATE=/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
    export PATH="/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode-beta.app/Contents/Developer/usr/bin:/Users/vagrant/.bitrise/tools:/usr/local/bin:/usr/local/sbin:~/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/opt/go/libexec/bin:/Users/vagrant/go/bin:/Users/vagrant/bitrise/tools/cmd-bridge/bin/osx"

Signing Identity:     "-"

    /usr/bin/codesign --force --sign - --timestamp=none /Users/vagrant/git/platforms/ios/build/emulator/TestApp.app



** BUILD SUCCEEDED **


|                                                                              |
+----+--------------------------------------------------------------+----------+
| ✅  | Do anything with Script step                                 | 286 sec  |
+----+--------------------------------------------------------------+----------+

                                          ▼

+------------------------------------------------------------------------------+
| (3) xcode-archive                                                            |
+------------------------------------------------------------------------------+
| id: xcode-archive                                                            |
| version: 1.10.1                                                              |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: bash                                                                |
| time: 2016-10-15T13:20:03-07:00                                              |
+------------------------------------------------------------------------------+
|                                                                              |
INFO[13:20:03]  * [OK] Step dependency (xcode) installed, available. 

ipa export configs:

Ignoring the following options because custom_export_options_plist_content provided:
  * export_method: auto-detect
  * upload_bitcode: yes
  * compile_bitcode: yes
  * team_id: 
----------
  * use_deprecated_export: no
  * force_team_id: AY2H9C3YC1
  * force_provisioning_profile_specifier: 
  * force_provisioning_profile: b284373b-9b5f-4e01-9af0-6442b6bb5222
  * force_code_sign_identity: 
  * custom_export_options_plist_content: 
ad-hoc

xcodebuild configs:
  * output_tool: xcpretty
  * workdir: /Users/vagrant/git/platforms/ios
  * project_path: /Users/vagrant/git/platforms/ios/TestApp.xcodeproj
  * scheme: TestApp
  * configuration: 
  * output_dir: /Users/vagrant/deploy
  * is_clean_build: no
  * xcodebuild_options: 

step output configs:
  * is_export_xcarchive_zip: yes
  * export_all_dsyms: no

step determined configs:
  * xcodebuild_version: Xcode 8.1 (Build version 8T47)
  * xcpretty_version: 0.2.4
  * CONFIG_xcode_project_action: -project

/Users/vagrant/git
  * archive_path: /var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/tmp.Zkoye11M/TestApp.xcarchive
  * ipa_path: /Users/vagrant/deploy/TestApp.ipa
  * dsym_zip_path: /Users/vagrant/deploy/TestApp.dSYM.zip

Switching to working directory: /Users/vagrant/git/platforms/ios

Create the Archive ...
  Forcing Team ID: AY2H9C3YC1
  Forcing Provisioning Profile: b284373b-9b5f-4e01-9af0-6442b6bb5222
  $ set -o pipefail && xcodebuild -project "/Users/vagrant/git/platforms/ios/TestApp.xcodeproj" -scheme "TestApp" archive -archivePath "/var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/tmp.Zkoye11M/TestApp.xcarchive" DEVELOPMENT_TEAM="AY2H9C3YC1" PROVISIONING_PROFILE="b284373b-9b5f-4e01-9af0-6442b6bb5222" | tee /var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/tmp.GS4184ue/raw-xcodebuild-output.log | xcpretty

Use dot instead of slash in app ID

Currently, to determine which provisioning profile to use the team ID and the bundle ID are concatenated using a /, e.g. HTUG78SA74/com.example.myapp. Is it possible to use a . instead as a separator? All of our provisioning profiles use a dot in the App ID property.

No scheme found

When archiving, it is not generating the IPA files, it is always saying that the scheme could not be found within the workspace.

No custom export options content provided, generating export options...
export-method specified: app-store
no scheme found with name: APP_SCHEME in workspace:APP_WORKSPACE.xcworkspace
|                                                                              |
+---+---------------------------------------------------------------+----------+
| x | [email protected] (exit code: 1)                           | 184 sec  |
+---+---------------------------------------------------------------+----------+
| Issue tracker: https://github.com/bitrise-io/steps-xcode-archive/issues      |
| Source: https://github.com/bitrise-io/steps-xcode-archive                    |
+---+---------------------------------------------------------------+----------+

I have downgraded to 2.4.10 and now it works. What may caused the problem with the latest build?

force_code_sign_identity applied to linked librarires

Using the following parameters :

  • force_team_id
  • force_code_sign_identity
  • force_provisioning_profile_specifier
  • force_provisioning_profile

the build fails because these parameters are used as well for the linked librairies, which are usually automatically signed.

Fails for Xcode 7+ if used with a Development Prov Profile with: exportArchive: No applicable devices found.

Error:

2015-09-19 21:32:23.165 xcodebuild[57578:7303917] [MT] IDEDistribution: Step failed: <IDEDistributionThinningStep: 0x7f9ca021ff40>: Error Domain=IDEDistributionErrorDomain Code=14 "No applicable devices found." UserInfo={NSLocalizedDescription=No applicable devices found.}
error: exportArchive: No applicable devices found.

Error Domain=IDEDistributionErrorDomain Code=14 "No applicable devices found." UserInfo={NSLocalizedDescription=No applicable devices found.}

** EXPORT FAILED **

Unable to sign tvOS project

Hi,

I have 2 individual projects for iOS and tvOS. Both have the same bundle ID.

Recently iOS auto provision step had some issue with adhoc and been fixed in v1.2.3 and my iOS project works fine after updates.
However, after updating the step in tvOS project, it's no longer build anymore.

I have tried several things:

  1. Set generate_profiles: yes in auto provision step
  2. Do not generate profile in auto provision step and upload profiles manually
  3. Same as step 2 but set -allowProvisioningUpdates in archive step

Actual results are:

  1. Generated 4 profiles in apple developer portal, but archive step failed with error error: exportArchive: "xxxx.appex" requires a provisioning profile with the App Groups feature..
    Please find the log for auto generate profile.log

  2. Uploaded 4 profiles manually (Development, Development Topshelf, Adhoc, Adhoc Topshelf) but build failed with error: No profiles for 'co.massive.axis.qa2' were found: Xcode couldn't find any tvOS App Development provisioning profiles matching 'co.massive.axis.qa2'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. (in target 'Axis_tvOS')
    Please find the log for manually upload profiles.log

  3. Failed with error: There are no accounts registered with Xcode. Add your developer account to Xcode (in target 'TARGET_topshelf') (2 errors in total, the second one is in target itself). However, account is connected via project -> Team -> Connected Apple Developer Portal Account
    Please find log for allowProvisioningUpdates.log

Any suggestions how should I fix this issue?

Many thanks!

[2.3.5] Umlauts in company = error: exportArchive: No certificate for team '1A234BCD56' matching 'iPhone Distribution: A&B CD EF (haftungsbeschr\xC3\xA4nkt)' found

Before I'm going back to 2.1.1 I got this problem here with newest 2.3.5. In 2.1.1 everything works fine.
Certificate step here version 1.9.1. (on the working one it was 1.8.8) #86

Log:

Installed profiles:
BitriseBot-Wildcard (548cd560-c511-4540-8b6b-cbec4a22f49d)
exportType: development
teamID: 72SA8V3WYL
bundleID: *
expirationDate: 2018-02-17 09:33:57 +0000 UTC
certificates:
- iPhone Developer: Bitrise Bot (VV2J4SV8V4)
  serial: 5DA2A94D5F7D931E
  teamID: 72SA8V3WYL
App
exportType: app-store
teamID: 1A234BCD56
bundleID: de.app
expirationDate: 2018-04-16 21:41:49 +0000 UTC
certificates:
- iPhone Distribution: A&B CD EF (haftungsbeschr\xC3\xA4nkt) (1A234BCD56)
  serial: 12A3BCDE4FGH56IJ
  teamID: 1A234BCD56
Resolving CodeSignGroups:
Creating certificate profiles mapping
certificate: iPhone Developer: Bitrise Bot (VV2J4SV8V4) [5DA2A94D5F7D931E] is installed
certificate: iPhone Distribution: A&B CD EF (haftungsbeschr\xC3\xA4nkt) (1A234BCD56) [12A3BCDE4FGH56IJ] is installed

[...]

checking certificate (12A3BCDE4FGH56IJ) group:
profile (App) MATCHES for bundle id (de.app) and export method (app-store)
matching profiles: 1 should be: 1

Resolved CodeSignGroups:
codeSignIdentity: subject= /UID=1A234BCD56/CN=iPhone Distribution: A&B CD EF (haftungsbeschr\xC3\xA4nkt) (1A234BCD56)/OU=1A234BCD56/O=A&B CD EF (haftungsbeschr\xC3\xA4nkt)/C=US
bundle ID: de.app is provisioned by: App


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

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>app-store</string>
		<key>provisioningProfiles</key>
		<dict>
			<key>de.app</key>
			<string>31d60604-6d1b-44e9-b6ce-a0ba0f752ba2</string>
		</dict>
		<key>signingCertificate</key>
		<string>iPhone Distribution: A&B CD EF (haftungsbeschr\xC3\xA4nkt) (1A234BCD56)</string>
		<key>teamID</key>
		<string>1A234BCD56</string>
	</dict>
</plist> <nil>

error: exportArchive: No certificate for team '1A234BCD56' matching 'iPhone Distribution: A&B CD EF (haftungsbeschr\xC3\xA4nkt) (1A234BCD56)' found

I think it's because of this \xC3\xA4. Because in 2.1.1 it was working great - except missing push notifications feature 😢

Here I will not spend more time because I'm stay on 2.1.1 in the meanwhile.
Its bad that I haven't the time to check this issue and fix it. I would like to help. But the App needs to be built 😔

Error Domain=IDEDistributionErrorDomain Code=14 "No applicable devices found."

I was completed be able to Xcode -> Product -> Archive and Export .ipa with no error in Mac(OS X 10.11.5).
but getting this error in Bitrise workflow.

Exporting IPA from generated Archive...
  $ set -o pipefail && xcodebuild -exportArchive -archivePath "/var/folders/lb/8n5bn9k975qgw662jpqdy7mm0000gn/T/bitrise-xcarchive.2XeBFtsX/ProjectName.xcarchive" -exportPath "/var/folders/lb/8n5bn9k975qgw662jpqdy7mm0000gn/T/bitrise-xcarchive.5gP61qY6" -exportOptionsPlist "/Users/vagrant/deploy/export_options.plist" | xcpretty

2016-06-12 20:45:30.711 xcodebuild[3717:12709] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/lb/8n5bn9k975qgw662jpqdy7mm0000gn/T/ProjectName_2016-06-12_20-45-30.706.xcdistributionlogs'.
2016-06-12 20:45:31.000 xcodebuild[3717:12709] [MT] DeveloperPortal: Using store at URL (file:///Users/vagrant/Library/Developer/Xcode/DeveloperPortal%207.3.1.db).
2016-06-12 20:45:40.494 xcodebuild[3717:12709] [MT] IDEDistribution: Step failed: <IDEDistributionThinningStep: 0x7f8989c2a750>: Error Domain=IDEDistributionErrorDomain Code=14 "No applicable devices found." UserInfo={NSLocalizedDescription=No applicable devices found.}
error: exportArchive: No applicable devices found.

Error Domain=IDEDistributionErrorDomain Code=14 "No applicable devices found." UserInfo={NSLocalizedDescription=No applicable devices found.}

|                                                                              |
+----+--------------------------------------------------------------+----------+
| 🚫  | [email protected] (exit code: 70)                          | 406 sec  |
+----+--------------------------------------------------------------+----------+
| Issue tracker: https://github.com/bitrise-io/steps-new-xcode-archive/issues  |
| Source: https://github.com/bitrise-io/steps-new-xcode-archive                |
+----+--------------------------------------------------------------+----------+

already tried the following links.

http://stackoverflow.com/questions/33041109/xcodebuild-no-applicable-devices-found-when-exporting-archive
http://stackoverflow.com/questions/33901132/export-failed-error-using-xcodebuild-command-line-tool
https://forums.developer.apple.com/message/75096#75096

Archive failed, error: exit status 65

Last lines of the Xcode's build log:
Code Signing Error: No profile for team 'XXXXXXXXXX' matching 'ABC' found: Xcode couldn't find any provisioning profiles matching 'XXXXXXXXXX/ABC'. Install the profile (by dragging and dropping it onto Xcode's dock item) or select a different one in the General tab of the target editor.
Warning: The Copy Bundle Resources build phase contains this target's Info.plist file 'ABC/Info.plist'.

Wrong BundleIdentifier being used during “generating provisioningProfiles node”

See https://discuss.bitrise.io/t/xcode-archive-export-for-ios-failing-with-name-app-requires-a-provisioning-profile-add-a-profile-to-the-provisioningprofiles-dictionary-in-your-export-options-property-list/6821 for an introduction.

In short: the generated export_options.plist file which is used for exporting the .ipa contained the wrong Bundle Identifier. This is most likely due to one of my earlier build steps, in which I manipulate the CFBundleIdentifier inside the app's Info.plist file (using PlistBuddy).

I don't know why exactly the “old” identifier is being used (is it injected from somewhere?) but a possible fix could be for the xcode-archive to (re-)read the CFBundleIdentifier from the Info.plist file just before the “generating provisioningProfiles node” part is being ran.

iOS Archive failed with exit status code 65

Hi !

I sent you 2 emails 2 days ago about a very annoying issue. Indeed, we don't succeed in solving this issue.

** ARCHIVE FAILED **
You can find the last couple of lines of Xcode's build log above, but the full log is also available in the raw-xcodebuild-output.log
The log file is stored in $BITRISE_DEPLOY_DIR, and its full path is available in the $BITRISE_XCODE_RAW_RESULT_TEXT_PATH environment variable
(value: /Users/vagrant/deploy/raw-xcodebuild-output.log)
Archive failed, error: exit status 65

By reading my archive logs, something went wrong while validating project but I don't know why and how to find the cause. This is the first time we have a such issue and Google results have not helped me yet.

Option to pass in export options plist file

I know I can specify an custom export options plist as a string, but it would be useful if I could pass in a filename. I have some options checked into version control and would like to use those.

Add iCloudContainerEnvironment Step Option

Would it be acceptable to add an iCloudContainerEnvironment step option?

Currently, for non app store builds this export options plist key is left out by default (when set to default) in the hash method of bitrise-tools/go-xcode/exportoptions/non_appstore_options.go. The only workaround is to use the custom export options plist which has become cumbersome because we have many schemes and targets. If a step option were to be introduced it could work in a similar fashion to the other export option overrides such as compile bitcode, or team ID.

If there's no opposition, I'm happy to attempt a PR to add this, although I've never used Go before so I might not get it right the first time around.

Automatic code signing not working for cordova generated projects

After I read the answer of @viktorbenei I tested around some settings. #53 (comment)

The problem here is that the automatic signing does not work and so my build process fails each time. http://blog.bitrise.io/2016/09/21/xcode-8-and-automatic-code-signing.html

Here are the error messages with the xcode-archive configuration.

If I build something via xCode I'm disabling the "automatically manage signing" and selecting an AdHoc provisioning profile.

Because I'm using a cordova generated xCode project the default settings of the project are the default development profile.

Thanks in Advance for ideas.

TestApp has conflicting provisioning settings. TestApp is automatically signed for development, but a conflicting code signing identity iPhone Distribution has been manually specified. Set the code signing identity value to "iPhone Developer" in the build settings editor, or switch to manual signing in the project editor. Code signing is required for product type 'Application' in SDK 'iOS 10.1'

- xcode-archive:
    title: TestApp xCode Archive for iOS
    inputs:
    - workdir: "$BITRISE_SOURCE_DIR/platforms/ios"
    - project_path: "$BITRISE_SOURCE_DIR/platforms/ios/TestApp.xcodeproj"
    - scheme: TestApp
    - force_team_id: AY2H9C3YC1
    - force_code_sign_identity: ''
    - output_tool: xcodebuild
    - is_export_xcarchive_zip: 'yes'
    - custom_export_options_plist_content: ad-hoc

Signing for "TestApp" requires a development team. Select a development team in the project editor. Code signing is required for product type 'Application' in SDK 'iOS 10.1'

- xcode-archive:
    title: TestApp xCode Archive for iOS
    inputs:
    - workdir: "$BITRISE_SOURCE_DIR/platforms/ios"
    - project_path: "$BITRISE_SOURCE_DIR/platforms/ios/TestApp.xcodeproj"
    - scheme: TestApp
    - force_team_id: ''
    - force_code_sign_identity: ''
    - output_tool: xcodebuild
    - is_export_xcarchive_zip: 'yes'
    - custom_export_options_plist_content: ad-hoc

Signing for "TestApp" requires a development team. Select a development team in the project editor. Code signing is required for product type 'Application' in SDK 'iOS 10.1'

- xcode-archive:
    title: TestApp xCode Archive for iOS
    inputs:
    - workdir: "$BITRISE_SOURCE_DIR/platforms/ios"
    - project_path: "$BITRISE_SOURCE_DIR/platforms/ios/TestApp.xcodeproj"
    - scheme: TestApp
    - force_team_id: ''
    - force_code_sign_identity: ''
    - force_provisioning_profile: b284373b-9b5f-4e01-9af0-6442b6bb5222
    - output_tool: xcodebuild
    - is_export_xcarchive_zip: 'yes'
    - custom_export_options_plist_content: ad-hoc

Signing for "TestApp" requires a development team. Select a development team in the project editor. Code signing is required for product type 'Application' in SDK 'iOS 10.1'

- xcode-archive:
    title: TestApp xCode Archive for iOS
    inputs:
    - workdir: "$BITRISE_SOURCE_DIR/platforms/ios"
    - project_path: "$BITRISE_SOURCE_DIR/platforms/ios/TestApp.xcodeproj"
    - output_tool: xcodebuild
    - is_export_xcarchive_zip: 'yes'
    - custom_export_options_plist_content: ad-hoc

Xcode Archive failed : could not build Objective-C module 'PSPDFKit'

Hello,

I have an issue with a working project when trying to build the project:

The project is a library project, with a application target in it.
So the application target implement the library code.

My library use PSPDFkit cocoapod dependency and it's seems to failed when trying to build my application project.

My podfile

target 'LibTarget' do
  use_frameworks!

  pod 'PSPDFKit', podspec:'XXXX'
  pod 'Zip'

end

target 'AppTarget' do
  use_frameworks!
  pod 'EasyPeasy'
end

The zip and EasyPeasy pod is installed and compiled during the Cocoapod Step, but I don't see any log about the PSPDFkit.

Then during the Xcode step I have the following error :

❌  /Users/vagrant/git/Pods/PSPDFKit/PSPDFKit.framework/Headers/PSPDFKit.h:26:9: 'PSPDFKit/PSPDFRotation.h' file not found
#import <PSPDFKit/PSPDFRotation.h>
        ^
❌  /Users/vagrant/git/PDFViewer/Managers/Prepare/PreparePdfDataManager.swift:10:8: could not build Objective-C module 'PSPDFKit'
import PSPDFKit

In local, everything works perfectly.

Thanks for your help,
Kinds regards,

Jonas Freres

Cannot run xcode-archive locally

getting error:

step determined configs:
- xcodebuildVersion: 9.2.0 (9C40b)
xcpretty is not installed
For xcpretty installation see: 'https://github.com/supermarin/xcpretty',
or use 'xcodebuild' as 'output_tool'.
|                                                                              |
+---+---------------------------------------------------------------+----------+
| x | [email protected] (exit code: 1)                            | 5.67 sec |
+---+---------------------------------------------------------------+----------+
| Issue tracker: https://github.com/bitrise-io/steps-xcode-archive/issues      |
| Source: https://github.com/bitrise-io/steps-xcode-archive                    |
+---+---------------------------------------------------------------+----------+

I don't think I should have to install the xcpretty gem to run this locally. I'm not actively developing in ruby so I don't have RVM installed and I don't like installing gems to my system ruby

Step fails with "no scheme found with name" on version 2.4.15

Hello,

I'm trying to use xcode-archive 2.4.15 but I am getting a failure for "no scheme found". This looks similar to #120 and #121. Version 2.4.13 was reported to fix this issue but downgrading to this version did not work for me. Downgrading to 2.4.10 fixes this issue.

** ARCHIVE SUCCEEDED **

Archive infos:
team: <redacted>
profile: iOS Team Provisioning Profile: * (<redacted>)
export: development
xcode managed profile: true

Exporting ipa from the archive...

Exporting ipa with ExportOptions.plist
No custom export options content provided, generating export options...
export-method specified: ad-hoc
no scheme found with name: TestAppObjC in workspace: TestAppObjC/TestAppObjC.xcworkspace

Archive failed, error: exit status 65

If you can't find the reason of the error in the log, please check the raw-xcodebuild-output.log
The log file is stored in $BITRISE_DEPLOY_DIR, and its full path
is available in the $BITRISE_XCODE_RAW_RESULT_TEXT_PATH environment variable
Archive failed, error: exit status 65
| |
+---+---------------------------------------------------------------+----------+
| x | [email protected] (exit code: 1) | 41 sec |
+---+---------------------------------------------------------------+----------+
| Update available: 2.2.0 -> 2.2.1 |
| Issue tracker: https://github.com/bitrise-io/steps-xcode-archive/issues |
| Source: https://github.com/bitrise-io/steps-xcode-archive |
+---+---------------------------------------------------------------+----------+

Step Option UI is incorrect from yaml

The field for bitcode is being displayed as force development team

This is what I see in the step options:
image

If I delete the value for Force codesigning with Development team, I get an error when running the step: Issue with input: issue with input UploadBitcode: parameter not specified

This is what it actually is in the yaml

    - xcode-archive:
        inputs:
        - export_method: app-store
        - is_export_xcarchive_zip: 'yes'
        - configuration: Release
        - artifact_name: "$BITRISE_SCHEME"
        - xcodebuild_options: "-sdk iphoneos"
        - is_clean_build: 'yes'
        - upload_bitcode: 'yes'
        - team_id: BAUE6Z43LF

Export fails with Xcode3Core crash

I'm using Xcode Archive & Export for iOS version 2.4.4. Archiving succeeds, then export fails with signal: error trap. My current stack is: Xcode 9.1.x, on macOS 10.12 (Sierra).

Here is the output from raw-xcodebuild-output.log (and that's where things start to be interesting):

** INTERNAL ERROR: Uncaught exception **
Uncaught Exception: *** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0]
Stack:
  0   __exceptionPreprocess (in CoreFoundation)
  1   objc_exception_throw (in libobjc.A.dylib)
  2   -[__NSPlaceholderArray initWithObjects:count:] (in CoreFoundation)
  3   +[NSArray arrayWithObjects:count:] (in CoreFoundation)
  4   __55-[Xcode3CommandLineBuildTool _distributeArchiveAndExit]_block_invoke (in Xcode3Core)
  5   -[Xcode3CommandLineBuildTool _distributeArchiveAndExit] (in Xcode3Core)
  6   -[Xcode3CommandLineBuildTool run] (in Xcode3Core)
  7  0x00000001063512af (in xcodebuild)
  8   start (in libdyld.dylib)

Any idea what could go wrong and how to fix that?

v1.3.0: `security: unable to open... for reading: No such file or directory`

** ARCHIVE SUCCEEDED **
set +v
(i) export_options_path: /Users/vagrant/deploy/export_options.plist
(i) archive_path: /Users/vagrant/deploy/Shoproll Release.xcarchive
==> Collect infos from mobileprovision
security: unable to open "/Users/vagrant/deploy/Shoproll" for reading: No such file or directory
/var/folders/4f/945ywsh506g31f58fpcbg0840000gn/T/bitrise908374675/step_src/generate_export_options.rb:23:in `collect_provision_info': undefined method `each' for nil:NilClass (NoMethodError)
from /var/folders/4f/945ywsh506g31f58fpcbg0840000gn/T/bitrise908374675/step_src/generate_export_options.rb:85:in `'

Export Failed: target not found: XXXXXXXXXXXXXXXXX

How do I deal with this error here?

Below is a snippet of the log.

The archive seems to be successful, but it somehow ended up with this error here.

▸ Generating 'MyTarget\ Prod\ CI.app.dSYM'
▸ Running script '[CP] Copy Pods Resources'
▸ Touching MyTarget\ Prod\ CI.app (in target: MyTarget Prod CI)
▸ Archive Succeeded

�[34;1mArchive infos:�[0m
team: My Inc (XXXXXX)
profile: My Profile Prod (xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx)
export: app-store
xcode managed profile: false

�[34;1mExporting ipa from the archive...�[0m

Exporting ipa with ExportOptions.plist
No custom export options content provided, generating export options...
export-method specified: app-store
�[31;1mtarget not found: XXXXXXXXXXXXXXXXX�[0m
|                                                                              |

2.2.0 - failed to get provisioning profile

Using the recently released 2.2.0 with Xcode 9.0.x, on macOS 10.12 (Sierra), I'm getting the following build error:

Exporting ipa from the archive...
Using export options
Generating export options
using export-method input: app-store
Failed to create target code sign properties mapping, error: failed to get provisioning profile - bundle id mapping, error: undefined method `end_with?' for ["airdray.xcodeproj"]:Array

Dropping back down to 2.1.1 works perfectly.

no scheme found with name: X in workspace: X in version 2.4.16

Hi,

i use the xcode-archive 2.4.16 with the following setting:

- xcode-archive:
        inputs:
        - project_path: "$BITRISE_PROJECT_PATH"
        - xcodebuild_options: "-allowProvisioningUpdates -UseModernBuildSystem=NO"
        - configuration: Beta
        - export_method: ad-hoc

the step automatically throws the following error:

Exporting ipa from the archive...

Exporting ipa with ExportOptions.plist
No custom export options content provided, generating export options...
export-method specified: ad-hoc
no scheme found with name: XX in workspace: XX.xcworkspace

However, if i use version 2.4.15 the step is properly executed. Is it a bug or am i missing some configuration?

IPA export fails in step version 2.4.11+

Hello,
After updating to xcode-archive version 2.4.11 and then 2.4.12, I am getting a failure on one of my closed-source builds. I'm hesitant to include the full log on a public issue tracker in case it contains any sensitive information, but the failure is here in the following log excerpt:

Exporting ipa from the archive...

Exporting ipa with ExportOptions.plist
No custom export options content provided, generating export options...
auto-detect export method specified
using the archive profile's (Thrive Distribution) export method: app-store
Failed to get target (React) bundle id: key: string("INFOPLIST_FILE") not found in: serialized.Object(serialized.Object{"GCC_WARN_ABOUT_MISSING_PROTOTYPES":"YES", "VERSION_INFO_FILE":"React_vers.c", "CODESIGNING_FOLDER_PATH":"/Users/vagrant/Library/Developer/Xcode/DerivedData/React-ffwqlnokchpmutajnemgqrgnryey/Build/Products/Release-iphoneos/libReact.a",

Downgrading to xcode-archive 2.4.10 fixes the issue.

We are on the latest osx-vs4mac-stable stack.

Swift project: the generated IPA works but can't be sent to Apple TestFlight

How to reproduce

  • Create a new Swift project with the latest stable Xcode (7.0.1) - no CococaPods, nothing, just a default Swift Xcode project.
  • Add the required App Icons (or else the TestFlight submission will fail)
  • archive it with this (xcode-archive) step
  • try to send it for TestFlight

It'll be accepted, but will remain in "processing" state, and you'll get an email with the content:

Dear developer,

We have discovered one or more issues with your recent delivery for "XXX". To process your delivery, the following issues must be corrected:

Invalid Swift Support - The SwiftSupport folder is missing. Rebuild your app using the current public (GM) version of Xcode and resubmit it.

Once these issues have been corrected, you can then redeliver the corrected binary.

Regards,

The App Store team

Related links / pointers:

Solution

Make dSYM generation optional

My app is hybrid. Since updating tool version, I see this:

screen shot 2017-07-18 at 5 52 08 pm

I have to switch on dSYM generation again as a workaround. It's a pain and slows down build/deploy cycles that some of us simply don't need

Add the ability to persist (download) the generated archive.

It would be great to have this functionality. There is lots of issues with bitcode enabled apps and dSyms. Only having the xcarchive accessible gives you the full assurance you have the correct dSyms. Fabric doesn't retrieve them automatically for bitcode enabled apps.

Archive failed, error: exit status 65

I presume this has been answered a couple of times but I seem to have this error repeatedly although my certificate and provisioning profile are valid (green marks on both), and my workflow step uses "always latest". It builds it successfully with production profile, but won't with development. I've checked multiple times for the validity of my certificates and profiles, even made new ones.

[2.1.1] App requires a provisioning profile with the Push Notifications feature

Hello,

I'm getting problems with version 2.1.1 of this step.

This is the mobileprovision file. (censored important details)

<?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>AppIDName</key>
	<string>App</string>
	<key>ApplicationIdentifierPrefix</key>
	<array>
	<string>1A234BCD56</string>
	</array>
	<key>CreationDate</key>
	<date>2017-10-15T21:57:36Z</date>
	<key>Platform</key>
	<array>
		<string>iOS</string>
	</array>
	<key>DeveloperCertificates</key>
	<array>
		<data>MIIFwTCCBKmgAwSZS/P+C5zc1/jAu+OAw==</data>
	</array>
	<key>Entitlements</key>
	<dict>
		<key>keychain-access-groups</key>
		<array>
			<string>1A234BCD56.*</string>		
		</array>
		<key>get-task-allow</key>
		<false/>
		<key>application-identifier</key>
		<string>1A234BCD56.de.app</string>
		<key>com.apple.developer.associated-domains</key>
		<string>*</string>
		<key>com.apple.developer.team-identifier</key>
		<string>1A234BCD56</string>
		<key>aps-environment</key>
		<string>production</string>
		<key>beta-reports-active</key>
		<true/>
	</dict>
	<key>ExpirationDate</key>
	<date>2018-04-16T21:41:49Z</date>
	<key>Name</key>
	<string>App</string>
	<key>TeamIdentifier</key>
	<array>
		<string>9T424JFK46</string>
	</array>
	<key>TeamName</key>
	<string>Company</string>
	<key>TimeToLive</key>
	<integer>182</integer>
	<key>UUID</key>
	<string>31d60604-6d1b-44e9-b6ce-a0ba0f752ba2</string>
	<key>Version</key>
	<integer>1</integer>
</dict>
</plist>

The important thing is:

<key>aps-environment</key>
<string>production</string>

So I think push notification feature is set.

The error message is:

error: exportArchive: "APP.app" requires a provisioning profile with the Push Notifications feature.

The log says:

** ARCHIVE SUCCEEDED **


Exporting ipa from the archive...

Using export options
Generating export options
auto-detect export method, based on embedded profile
detected export method: app-store
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>app-store</string>
	</dict>
</plist> <nil>

The project is an Ionic / Cordova one. But I think this doesn't matter. Or?

Thanks in Advance!

P.S. Normally I will investigate the problem by myself. But maybe someone have more informations about this. Maybe this is a wellknown problem. Maybe I must generate new certificate with provisioning profile.

I will test it tomorrow on my Macbook with Bitrise CLI. 👍

Thanks in Advance!

[2.3.5] Codesign grouping bug

It looks like there is a bug with the CodeSign grouping code recently introduced to fix exporting an archive in Xcode 9.

We're trying to sign an app using the app-store method with both a main target and a push notification extension. It seems like there's a bug in picking out the correct code signing group, but I'm not entirely sure what it's being caused by:

Log:

certificate: 446FE307C20B96B8 included in profiles:

- O2 Touch Notification App Store
- iOS Team Store Provisioning Profile: com.englandrugby.o2touch
- iOS Team Store Provisioning Profile: com.englandrugby.o2touch.EventNotification
- O2 Touch App Store

certificate: 1B184E542FC908A3 included in profiles:

- iOS Team Store Provisioning Profile: com.rugbyfootballunion.o2touch
- O2 Touch App Store
- O2 Touch Notification App Store
- iOS Team Store Provisioning Profile: com.rugbyfootballunion.o2touch.EventNotification

certificate: 249F9F17BCC3055E included in profiles:

- iOS Team Provisioning Profile: com.rugbyfootballunion.o2touch
- iOS Team Provisioning Profile: com.rugbyfootballunion.o2touch.EventNotification

certificate: 5DA2A94D5F7D931E included in profiles:

- BitriseBot-Wildcard

Creating CodeSignGroups

checking certificate (446FE307C20B96B8) group:
profile (O2 Touch Notification App Store) does not provision bundle id: com.englandrugby.o2touch.EventNotification
profile (iOS Team Store Provisioning Profile: com.englandrugby.o2touch.EventNotification) does not provision bundle id: com.englandrugby.o2touch.EventNotification
profile (iOS Team Store Provisioning Profile: com.englandrugby.o2touch) MATCHES for bundle id (com.englandrugby.o2touch) and export method (app-store)
profile (O2 Touch Notification App Store) MATCHES for bundle id (com.englandrugby.o2touch.EventNotification) and export method (app-store)
matching profiles: 2 should be: 2

The correct certificate to be used here should be the 446FE307C20B96B8 group. As you can see at the top, this is included in the O2 Touch Notification App Store profile (com.englandrugby.o2touch.EventNotification), and the O2 Touch App Store profile (com.englandrugby.o2touch). However when the Creating CodeSignGroups part of the process happens it seems to only have the O2 Touch Notification App Store profile, and so it falls back to the Xcode generated provisioning profile, which then fails because of:

Export TeamID specified: 25H7BM6YWK, filtering CodeSignInfo groups...
Both xcode managed and NON xcode managed profiles in code singing group

And then:

error: exportArchive: Provisioning profile "iOS Team Store Provisioning Profile: com.englandrugby.o2touch" is Xcode managed, but signing settings require a manually managed profile.
Error Domain=IDEProfileQualificationErrorDomain Code=12 "Provisioning profile "iOS Team Store Provisioning Profile: com.englandrugby.o2touch" is Xcode managed, but signing settings require a manually managed profile." UserInfo={IDEProfileQualificationError_Profile=<DTDKProvisioningProfile 0x7fc374b0b700: UUID: 9fd2e6fd-ad39-4ebb-9407-0f5d23a965a8, name: iOS Team Store Provisioning Profile: com.englandrugby.o2touch, team: 25H7BM6YWK (3 SIDED CUBE DESIGN LTD), platform: iOS>, NSLocalizedDescription=Provisioning profile "iOS Team Store Provisioning Profile: com.englandrugby.o2touch" is Xcode managed, but signing settings require a manually managed profile.}
** EXPORT FAILED **

archivable entry not found

`
▸ Compiling ActivityCell.xib
▸ Processing timerush-dev.plist
▸ Generating 'timerush-dev.app.dSYM'
▸ Running script '[CP] Embed Pods Frameworks'
▸ Running script '[CP] Copy Pods Resources'
▸ Running script 'Run Script'
▸ Copying /Users/tr/Library/Developer/Xcode/DerivedData/timerush-gbxepiamopovhfhixqrcfwtzybfg/Build/Intermediates.noindex/ArchiveIntermediates/timerush-dev/BuildProductsPath/Release-watchos/watch-dev.app
▸ Touching timerush-dev.app (in target: timerush-dev)
▸ Archive Succeeded

Archive infos:
team: Micro Manager Apps Ltd (5KR985NTQ5)
profile: iOS Team Provisioning Profile: app.bullrush.timerush (ca913e22-440d-4c5c-95a3-b355d54d6681)
export: development
xcode managed profile: true

Exporting ipa from the archive...

Exporting ipa with ExportOptions.plist
No custom export options content provided, generating export options...
export-method specified: ad-hoc
archivable entry not found
| |
+---+---------------------------------------------------------------+----------+
| x | [email protected] (exit code: 1) | 271 sec |
+---+---------------------------------------------------------------+----------+
| Issue tracker: https://github.com/bitrise-io/steps-xcode-archive/issues |
| Source: https://github.com/bitrise-io/steps-xcode-archive |
+---+---------------------------------------------------------------+----------+
`

Error building with 2.3.1

Not sure what other information I need to provide here. Please let me know.

+------------------------------------------------------------------------------+

| (6) xcode-archive                                                            |
+------------------------------------------------------------------------------+
| id: xcode-archive                                                            |
| version: 2.3.1                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: go                                                                  |
| time: 2017-09-25T10:37:32-07:00                                              |
+------------------------------------------------------------------------------+
|                                                                              |
INFO[10:37:32]  * [OK] Step dependency (xcode) installed, available. 
INFO[10:37:32]  * [OK] Step dependency (go) installed, available. 
ipa export configs:
- ExportMethod: auto-detect
- UploadBitcode: yes
- CompileBitcode: yes
- TeamID: 
- UseDeprecatedExport: no
- CustomExportOptionsPlistContent:
xcodebuild configs:
- OutputTool: xcpretty
- Workdir: /Users/vagrant/git
- ProjectPath: /Users/vagrant/git/ios/Poe.xcodeproj
- Scheme: Poe
- Configuration: 
- OutputDir: /Users/vagrant/deploy
- IsCleanBuild: no
- XcodebuildOptions: -configuration Release
- ForceTeamID: 
- ForceProvisioningProfileSpecifier: 
- ForceProvisioningProfile: 
- ForceCodeSignIdentity: 
step output configs:
- IsExportXcarchiveZip: no
- ExportAllDsyms: yes
- ArtifactName: Poe
step determined configs:
- xcodebuildVersion: 9.0.0 (9A235)
- xcprettyVersion: 0.2.8

...

xcode major version > 9, generating exportOptions with provisioningProfiles node
Failed to create target code sign properties mapping, error: failed to run ruby script, output: {"error":"scheme does not contain buildable target\n/var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/__ruby-script-runner__871297540/script.rb:219:in `read_code_sign_infos'\n/var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/__ruby-script-runner__871297540/script.rb:275:in `<main>'"}, error: exit status 1
|                                                                              |
+---+---------------------------------------------------------------+----------+
| x | xcode-archive (exit code: 1)                                  | 235 sec  |
+---+---------------------------------------------------------------+----------+
| Issue tracker: https://github.com/bitrise-io/steps-xcode-archive/issues      |
| Source: https://github.com/bitrise-io/steps-xcode-archive                    |
+---+---------------------------------------------------------------+----------+

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.