I'm trying to use Ci/Cd with circleci for IOS and I'm getting an error for Fastlane, I'm new to this I don't know what I'm doing wrong. Also when trying to get TestFlights and said couldn't locate xCode so no idea what that meant.
Also I searched up the exit status and people said to turn off include_simulator_logs : false using scan(include_simulator_logs: false) but I have no idea how to do that either.
If anyone can help me understand this and what I'm doing wrong.
fastlane file
default_platform :ios
platform :ios do
before_all do
setup_circle_ci
end
desc "Runs all the tests"
lane :test do
scan
snapshot
end
desc "Ad-hoc build"
lane :adhoc do
match(type: "adhoc")
gym(export_method: "ad-hoc")
end
desc "Submit a new Beta Build to Apple TestFlight"
desc "This will also make sure the profile is up to date"
lane :beta do
match(type: "appstore")
gym(export_method: "app-store")
end
desc "Deploy a new version to the App Store"
lane :release do
# match(type: "appstore")
# snapshot
gym # Build your app - more options available
deliver(force: true)
# frameit
end
end
yml file
version: 2
jobs:
build-and-test:
macos:
xcode: "14.0.0"
working_directory: /Users/distiller/project
environment:
FL_OUTPUT_DIR: output
FASTLANE_LANE: test
shell: /bin/bash --login -o pipefail
steps:
- checkout
- run: bundle install
- run:
name: Fastlane
command: bundle exec fastlane $FASTLANE_LANE
- store_artifacts:
path: output
- store_test_results:
path: output/scan
adhoc:
macos:
xcode: "14.0.0"
working_directory: /Users/a.dsswiftcoding/Desktop/CI:CDPractice/CDPractice
environment:
FL_OUTPUT_DIR: output
FASTLANE_LANE: adhoc
shell: /bin/bash --login -o pipefail
steps:
- checkout
- run: bundle install
- run:
name: Fastlane
command: bundle exec fastlane $FASTLANE_LANE
- store_artifacts:
path: output/Game.ipa
beta:
macos:
xcode: "14.0.0"
working_directory: /Users/a.dsswiftcoding/Desktop/CI:CDPractice/CDPractice
environment:
FL_OUTPUT_DIR: output
FASTLANE_LANE: beta
shell: /bin/bash --login -o pipefail
steps:
- checkout
- run: bundle install
- run:
name: Fastlane
command: bundle exec fastlane $FASTLANE_LANE
- store_artifacts:
path: output/Game.ipa
workflows:
version: 2
build-test-adhoc:
jobs:
- build-and-test
- adhoc:
filters:
branches:
only: development
requires:
- build-and-test
#- beta:
#filters:
#branches:
#only: master
#requires:
#- build-and-test
#!/bin/bash --login -eo pipefail
bundle exec fastlane $FASTLANE_LANE
[⠋] [⠙] [⠹] [⠸] [⠼] [⠴] [⠦] [⠧] [⠇] [⠏] [⠋] [✔]
[03:21:40]: Sending anonymous analytics information
[03:21:40]: Learn more at https://docs.fastlane.tools/#metrics
[03:21:40]: No personal or sensitive data is sent.
[03:21:40]: You can disable this by adding `opt_out_usage` at the top of your Fastfile
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
[03:21:40]: ------------------------------
[03:21:40]: --- Step: default_platform ---
[03:21:40]: ------------------------------
[03:21:40]: Driving the lane 'ios test'
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
[03:21:40]: -----------------------------
[03:21:40]: --- Step: setup_circle_ci ---
[03:21:40]: -----------------------------
[03:21:40]: Creating temporary keychain: "fastlane_tmp_keychain".
[03:21:40]: $ security list-keychains -d user
[03:21:40]: ▸ "/Users/distiller/Library/Keychains/fastlane_tmp_keychain-db"
[03:21:40]: Found keychain '/Users/distiller/Library/Keychains/fastlane_tmp_keychain-db' in list-keychains, adding to search list skipped
[03:21:40]: Enabling match readonly mode.
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
[03:21:40]: ------------------
[03:21:40]: --- Step: scan ---
[03:21:40]: ------------------
[03:21:40]: Resolving Swift Package Manager dependencies...
[03:21:40]: $ xcodebuild -resolvePackageDependencies -scheme LargerProject -project ./LargerProject.xcodeproj
[03:21:41]: ▸ Command line invocation:
[03:21:41]: ▸ /Applications/Xcode-14.0.1.app/Contents/Developer/usr/bin/xcodebuild -resolvePackageDependencies -scheme LargerProject -project ./LargerProject.xcodeproj
[03:21:41]: ▸ User defaults from command line:
[03:21:41]: ▸ IDEPackageSupportUseBuiltinSCM = YES
[03:22:07]: ▸ --- xcodebuild: WARNING: Using the first of multiple matching destinations:
[03:22:07]: ▸ { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
[03:22:07]: ▸ { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }
[03:22:07]: ▸ { platform:iOS Simulator, id:ED0388EB-57D2-48A2-923B-6777689AF205, OS:16.0, name:iPad (9th generation) }
[03:22:07]: ▸ { platform:iOS Simulator, id:8AF6641E-544C-4186-AC2A-628F78546F56, OS:16.0, name:iPad Air (5th generation) }
[03:22:07]: ▸ { platform:iOS Simulator, id:C3ED5639-902B-4599-B52F-4059CA4CD87B, OS:16.0, name:iPad Pro (11-inch) (3rd generation) }
[03:22:07]: ▸ { platform:iOS Simulator, id:DFA2EBFD-2E49-4ADE-9282-5C4D29B05047, OS:16.0, name:iPad Pro (12.9-inch) (5th generation) }
[03:22:07]: ▸ { platform:iOS Simulator, id:987725E0-CD1D-42CB-98F5-8334EAE154BA, OS:16.0, name:iPad mini (6th generation) }
[03:22:07]: ▸ { platform:iOS Simulator, id:92A00580-356F-4DB4-8CEC-EE875D922AB3, OS:16.0, name:iPhone 14 }
[03:22:07]: ▸ { platform:iOS Simulator, id:7E568AEA-F439-40C1-AA45-04D99F692876, OS:16.0, name:iPhone 14 Plus }
[03:22:07]: ▸ { platform:iOS Simulator, id:A6A8EE6B-F7F2-463C-A317-077B06E923C8, OS:16.0, name:iPhone 14 Pro }
[03:22:07]: ▸ { platform:iOS Simulator, id:7845B9E6-12A4-4328-9D14-B3F1BBB78A9A, OS:16.0, name:iPhone 14 Pro Max }
[03:22:07]: ▸ { platform:iOS Simulator, id:23D2BEBA-152E-471A-B503-EF719471093D, OS:16.0, name:iPhone SE (3rd generation) }
[03:22:07]: ▸ resolved source packages:
[03:22:07]: $ xcodebuild -showBuildSettings -scheme LargerProject -project ./LargerProject.xcodeproj
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
{ platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }
{ platform:iOS Simulator, id:ED0388EB-57D2-48A2-923B-6777689AF205, OS:16.0, name:iPad (9th generation) }
{ platform:iOS Simulator, id:8AF6641E-544C-4186-AC2A-628F78546F56, OS:16.0, name:iPad Air (5th generation) }
{ platform:iOS Simulator, id:C3ED5639-902B-4599-B52F-4059CA4CD87B, OS:16.0, name:iPad Pro (11-inch) (3rd generation) }
{ platform:iOS Simulator, id:DFA2EBFD-2E49-4ADE-9282-5C4D29B05047, OS:16.0, name:iPad Pro (12.9-inch) (5th generation) }
{ platform:iOS Simulator, id:987725E0-CD1D-42CB-98F5-8334EAE154BA, OS:16.0, name:iPad mini (6th generation) }
{ platform:iOS Simulator, id:92A00580-356F-4DB4-8CEC-EE875D922AB3, OS:16.0, name:iPhone 14 }
{ platform:iOS Simulator, id:7E568AEA-F439-40C1-AA45-04D99F692876, OS:16.0, name:iPhone 14 Plus }
{ platform:iOS Simulator, id:A6A8EE6B-F7F2-463C-A317-077B06E923C8, OS:16.0, name:iPhone 14 Pro }
{ platform:iOS Simulator, id:7845B9E6-12A4-4328-9D14-B3F1BBB78A9A, OS:16.0, name:iPhone 14 Pro Max }
{ platform:iOS Simulator, id:23D2BEBA-152E-471A-B503-EF719471093D, OS:16.0, name:iPhone SE (3rd generation) }
[03:22:10]: Command timed out after 3 seconds on try 1 of 4, trying again with a 6 second timeout...
2022-09-18 03:22:11.314 xcodebuild[2426:16704] Requested but did not find extension point with identifier Xcode.InterfaceBuilderBuildSupport.PlatformDefinition
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
{ platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }
{ platform:iOS Simulator, id:ED0388EB-57D2-48A2-923B-6777689AF205, OS:16.0, name:iPad (9th generation) }
{ platform:iOS Simulator, id:8AF6641E-544C-4186-AC2A-628F78546F56, OS:16.0, name:iPad Air (5th generation) }
{ platform:iOS Simulator, id:C3ED5639-902B-4599-B52F-4059CA4CD87B, OS:16.0, name:iPad Pro (11-inch) (3rd generation) }
{ platform:iOS Simulator, id:DFA2EBFD-2E49-4ADE-9282-5C4D29B05047, OS:16.0, name:iPad Pro (12.9-inch) (5th generation) }
{ platform:iOS Simulator, id:987725E0-CD1D-42CB-98F5-8334EAE154BA, OS:16.0, name:iPad mini (6th generation) }
{ platform:iOS Simulator, id:92A00580-356F-4DB4-8CEC-EE875D922AB3, OS:16.0, name:iPhone 14 }
{ platform:iOS Simulator, id:7E568AEA-F439-40C1-AA45-04D99F692876, OS:16.0, name:iPhone 14 Plus }
{ platform:iOS Simulator, id:A6A8EE6B-F7F2-463C-A317-077B06E923C8, OS:16.0, name:iPhone 14 Pro }
{ platform:iOS Simulator, id:7845B9E6-12A4-4328-9D14-B3F1BBB78A9A, OS:16.0, name:iPhone 14 Pro Max }
{ platform:iOS Simulator, id:23D2BEBA-152E-471A-B503-EF719471093D, OS:16.0, name:iPhone SE (3rd generation) }
2022-09-18 03:22:13.211 xcodebuild[2430:16763] Requested but did not find extension point with identifier Xcode.InterfaceBuilderBuildSupport.PlatformDefinition
[03:22:15]: Found simulator "iPhone SE (3rd generation) (16.0)"
+------------------------------------------------+-------------------------------------------------------------------------------------------------+
| Summary for scan 2.210.0 |
+------------------------------------------------+-------------------------------------------------------------------------------------------------+
| project | ./LargerProject.xcodeproj |
| scheme | LargerProject |
| skip_detect_devices | false |
| ensure_devices_found | false |
| force_quit_simulator | false |
| reset_simulator | false |
| disable_slide_to_type | true |
| reinstall_app | false |
| clean | false |
| open_report | false |
| output_directory | output/scan |
| output_types | html,junit |
| buildlog_path | output/buildlogs/scan |
| include_simulator_logs | true |
| xcodebuild_formatter | xcpretty |
| output_remove_retry_attempts | false |
| derived_data_path | /Users/distiller/Library/Developer/Xcode/DerivedData/LargerProject-aehvuzttkjynnhavttmxeauwgejq |
| should_zip_build_products | false |
| output_xctestrun | false |
| result_bundle | false |
| use_clang_report_name | false |
| disable_concurrent_testing | false |
| skip_build | false |
| slack_use_webhook_configured_username_and_icon | false |
| slack_username | fastlane |
| slack_icon_url | https://fastlane.tools/assets/img/fastlane_icon.png |
| skip_slack | false |
| slack_only_on_failure | false |
| xcodebuild_command | env NSUnbufferedIO=YES xcodebuild |
| skip_package_dependencies_resolution | false |
| disable_package_automatic_updates | false |
| use_system_scm | false |
| number_of_retries | 0 |
| fail_build | true |
| xcode_path | /Applications/Xcode-14.0.1.app |
+------------------------------------------------+-------------------------------------------------------------------------------------------------+
[03:22:15]: Disabling 'Slide to Type' iPhone SE (3rd generation)
[03:22:15]: $ /usr/libexec/PlistBuddy -c "Add :KeyboardContinuousPathEnabled bool false" /Users/distiller/Library/Developer/CoreSimulator/Devices/23D2BEBA-152E-471A-B503-EF719471093D/data/Library/Preferences/com.apple.keyboard.ContinuousPath.plist >/dev/null 2>&1
[03:22:15]: Booting iPhone SE (3rd generation)
[03:22:16]: $ set -o pipefail && env NSUnbufferedIO=YES xcodebuild -scheme LargerProject -project ./LargerProject.xcodeproj -derivedDataPath /Users/distiller/Library/Developer/Xcode/DerivedData/LargerProject-aehvuzttkjynnhavttmxeauwgejq -destination 'platform=iOS Simulator,id=23D2BEBA-152E-471A-B503-EF719471093D' build test | tee '/Users/distiller/project/output/buildlogs/scan/LargerProject-LargerProject.log' | xcpretty --report html --output '/Users/distiller/project/output/scan/report.html' --report junit --output '/Users/distiller/project/output/scan/report.junit' --report junit --output '/var/folders/bl/wbxjgtzx7j5_mjsmfr3ynlc00000gp/T/junit_report20220918-2163-hy0fmt'
[03:22:16]: ▸ Loading...
[03:23:27]: ▸ Compiling Main.storyboard
[03:23:31]: ▸ Compiling LaunchScreen.storyboard
[03:23:37]: ▸ Compiling SceneDelegate.swift
[03:23:43]: ▸ Compiling AppDelegate.swift
[03:23:43]: ▸ Compiling ViewController.swift
[03:23:43]: ▸ Processing Info.plist
[03:23:43]: ▸ Linking LargerProject
[03:23:45]: Running Tests: ▸ Touching LargerProject.app (in target 'LargerProject' from project 'LargerProject')
[03:23:45]: ▸ Build Succeeded
[03:23:46]: ▸ Linking LargerProject
[03:23:54]: ▸ Compiling LargerProjectUITests.swift
[03:23:54]: ▸ Compiling LargerProjectUITestsLaunchTests.swift
[03:23:54]: ▸ Processing empty-LargerProjectTests.plist
[03:23:54]: ▸ Compiling LargerProjectTests.swift
[03:23:54]: ▸ Linking LargerProjectTests
[03:23:55]: Running Tests: ▸ Touching LargerProjectTests.xctest (in target 'LargerProjectTests' from project 'LargerProject')
[03:23:55]: ▸ Linking LargerProjectUITests
[03:23:55]: ▸ Processing empty-LargerProjectUITests.plist
[03:23:55]: Running Tests: ▸ Touching LargerProjectUITests.xctest (in target 'LargerProjectUITests' from project 'LargerProject')
[03:28:10]: ▸ 2022-09-18 03:28:10.670 xcodebuild[2579:17857] [MT] IDETestOperationsObserverDebug: 254.754 elapsed -- Testing started completed.
[03:28:10]: ▸ 2022-09-18 03:28:10.670 xcodebuild[2579:17857] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start
[03:28:10]: ▸ 2022-09-18 03:28:10.670 xcodebuild[2579:17857] [MT] IDETestOperationsObserverDebug: 254.754 sec, +254.754 sec -- end
[03:28:11]: ▸ Test Succeeded
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
[03:28:16]: ------------------------------
[03:28:16]: --- Collecting system logs ---
[03:28:16]: ------------------------------
[03:28:16]: $ xcrun simctl spawn 23D2BEBA-152E-471A-B503-EF719471093D log collect --start '2022-09-18 03:22:15' --output /Users/distiller/project/output/scan/system_logs-iPhone\ SE\ \(3rd\ generation\)_iOS_16.0.logarchive 2>/dev/null
[03:28:16]: Exit status: 149
+------------------------------+-------------------------------------------------------------------------------------------------+
| Lane Context |
+------------------------------+-------------------------------------------------------------------------------------------------+
| DEFAULT_PLATFORM | ios |
| PLATFORM_NAME | ios |
| LANE_NAME | ios test |
| KEYCHAIN_PATH | ~/Library/Keychains/fastlane_tmp_keychain |
| ORIGINAL_DEFAULT_KEYCHAIN | "/Users/distiller/Library/Keychains/login.keychain-db" |
| SCAN_GENERATED_XCRESULT_PATH | |
| SCAN_DERIVED_DATA_PATH | /Users/distiller/Library/Developer/Xcode/DerivedData/LargerProject-aehvuzttkjynnhavttmxeauwgejq |
| SCAN_GENERATED_PLIST_FILES | [] |
| SCAN_GENERATED_PLIST_FILE | |
+------------------------------+-------------------------------------------------------------------------------------------------+
[03:28:16]: Exit status: 149
+------+------------------+-------------+
| fastlane summary |
+------+------------------+-------------+
| Step | Action | Time (in s) |
+------+------------------+-------------+
| 1 | default_platform | 0 |
| 2 | setup_circle_ci | 0 |
| | scan | 396 |
+------+------------------+-------------+
[03:28:16]: fastlane finished with errors
[!] Exit status: 149
[03:28:16]: Shutting down 23D2BEBA-152E-471A-B503-EF719471093D
Exited with code exit status 1
CircleCI received exit code 1