I added the step Xcode Build for iOS Simulator to my workflow in a Ionic build workflow.
The apps build successful…
+------------------------------------------------------------------------------+
| (8) xcode-build-for-simulator |
+------------------------------------------------------------------------------+
| id: xcode-build-for-simulator |
| version: 0.9.0 |
| collection: https://github.com/bitrise-io/bitrise-steplib.git |
| toolkit: go |
| time: 2018-08-23T11:49:12-07:00 |
+------------------------------------------------------------------------------+
| |
INFO[11:49:12] * [OK] Step dependency (xcode) installed, available.
INFO[11:49:12] * [OK] Step dependency (go) installed, available.
Config:
- ProjectPath: /Users/vagrant/git/platforms/ios/[REDACTED].xcworkspace
- Scheme: [REDACTED]
- Configuration: Debug
- ArtifactName:
- XcodebuildOptions:
- Workdir: /Users/vagrant/git
- OutputDir: /Users/vagrant/deploy
- IsCleanBuild: false
- OutputTool: xcpretty
- SimulatorDevice: iPhone 6s Plus
- SimulatorOsVersion: latest
- SimulatorPlatform: iOS
- VerboseLog: false
Step determined configs:
- xcodebuildVersion: Xcode 9.4.1 (Build version 9F2000)
Checking if output tool (xcpretty) is installed
- xcprettyVersion: 0.2.8
Simulator info
Latest simulator for iPhone 6s Plus = 89D46AC4-62B0-432A-8693-90249E49DE07
Running build
[11:49:20] $ set -o pipefail && xcodebuild "-workspace" "/Users/vagrant/git/platforms/ios/[REDACTED].xcworkspace" "-scheme" "[REDACTED]" "-configuration" "Debug" "build" "-destination" "id=89D46AC4-62B0-432A-8693-90249E49DE07" "PROVISIONING_PROFILE_SPECIFIER=" | xcpretty
â–¸ Building CordovaLib/CordovaLib [Debug]
…
but raise this error when trying to export:
â–¸ Linking [REDACTED]
â–¸ Generating '[REDACTED].app.dSYM'
â–¸ Touching [REDACTED].app
â–¸ Signing /Users/vagrant/Library/Developer/Xcode/DerivedData/[REDACTED]-faqxtamjokzupbfcgmzixsylfopt/Build/Products/Debug-iphonesimulator/[REDACTED].app
â–¸ Build Succeeded
Copy artifacts from Derived Data to /Users/vagrant/deploy
Failed to export the artifacts, error: failed to fetch project's targets, error: Failed to found scheme ([REDACTED]) in project
| |
+---+---------------------------------------------------------------+----------+
| x | xcode-build-for-simulator (exit code: 1) | 34 sec |
+---+---------------------------------------------------------------+----------+
| Issue tracker: ...com/bitrise-steplib/steps-xcode-build-for-simulator/issues |
| Source: https://github.com/bitrise-steplib/steps-xcode-build-for-simulator |
+---+---------------------------------------------------------------+----------+
That’s my bitryse.yml file:
---
format_version: '5'
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: ionic
trigger_map:
- push_branch: "*"
workflow: primary
- pull_request_source_branch: "*"
workflow: primary
workflows:
iOS:
steps:
- nvm:
inputs:
- node_version: 8.11.4
- nvm_version: 0.33.8
- activate-ssh-key:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
inputs:
- verbose: 'false'
- git-clone: {}
- script:
title: Do anything with Script step
- certificate-and-profile-installer: {}
- npm:
inputs:
- command: install
- generate-cordova-build-configuration: {}
- ionic-archive:
inputs:
- options: "--prod"
- cordova_android_version: 7.1.0
- cordova_ios_version: 4.5.5
- target: emulator
- configuration: debug
- platform: ios
- xcode-build-for-simulator:
inputs:
- project_path: "$BITRISE_SOURCE_DIR/$BITRISE_PROJECT_PATH"
- deploy-to-bitrise-io: {}
app:
envs:
- opts:
is_expand: false
IONIC_PLATFORM: ios,android
- opts:
is_expand: false
BITRISE_SCHEME: Algarve
- opts:
is_expand: false
BITRISE_PROJECT_PATH: platforms/ios/Algarve.xcworkspace
What I’m. doing wrong?