I got the error on CI:
Error: Command failed: cd ./ios && RCT_NO_LAUNCH_PACKAGER=true xcodebuild build build-for-testing
-scheme "MyReactModule-Unit-MyReactModuleTests"
-workspace MyReactModule.xcworkspace
-sdk iphonesimulator
-configuration Debug
-derivedDataPath ./DerivedData/MyReactModule
-quiet
-UseModernBuildSystem=NO ONLY_ACTIVE_ARCH=YES
Additional logs:
xcodebuild: error: Failed to build workspace MyReactModule with scheme MyReactModule-Unit-MyReactModuleTests.
Reason: The scheme 'MyReactModule-Unit-MyReactModuleTests (MyReactModule Workspace)' is not configured for Running.
How to fix it?
Related
When I try to build from the command line:
xcodebuild clean archive PRODUCT_BUNDLE_IDENTIFIER=${IOS_APP_ID} -workspace $cur_dir/../ios/${PROJECT_NAME}.xcworkspace -scheme $IOS_SCHEME -configuration $IOS_CONFIGURATION -derivedDataPath $cur_dir/../ios/build -archivePath $cur_dir/../ios/build/Products/${PROJECT_NAME}.xcarchive
I'm getting the error below:
Integrating client project
[!] AFNetworking has been deprecated in favor of Alamofire
Pod installation complete! There are 91 dependencies from the Podfile and 95 total pods installed.
Archiving the project
Command line invocation:
/Applications/Xcode_13.2.1.app/Contents/Developer/usr/bin/xcodebuild clean archive PRODUCT_BUNDLE_IDENTIFIER=com.company.us.qa.test -workspace ./../ios/Testhouse.xcworkspace -scheme Testhouse QA Managed -configuration RELEASE -derivedDataPath ./../ios/build -archivePath ./../ios/build/Products/Testhouse.xcarchive
User defaults from command line:
IDEArchivePathOverride = /Users/runner/work/Testhouse-Mobile/Testhouse-Mobile/ios/build/Products/Testhouse.xcarchive
IDEDerivedDataPathOverride = /Users/runner/work/Testhouse-Mobile/Testhouse-Mobile/ios/build
IDEPackageSupportUseBuiltinSCM = YES
Build settings from command line:
PRODUCT_BUNDLE_IDENTIFIER = com.company.us.qa.test
xcodebuild: error: Unknown build action 'QA'.
Error: Process completed with exit code 65.
I tried hard coding the scheme and tested the xcodebuild. Still getting the same error.
I'm having an issue when I try to carthage update
Build Failed
Task failed with exit code 65:
/usr/bin/xcrun xcodebuild -project /Users/Shared/projectLocation/source/Carthage/Checkouts/ActiveLabel.swift/ActiveLabel.xcodeproj -scheme ActiveLabel -configuration Release -derivedDataPath /Users/main/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/ActiveLabel.swift/1.0.1 -sdk iphoneos ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/nx/tqnzdw9x5_d73x7tjcmvrv2r0000gn/T/ActiveLabel.swift SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/Shared/projectLocation/source/Carthage/Checkouts/ActiveLabel.swift)
This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/nx/tqnzdw9x5_d73x7tjcmvrv2r0000gn/T/carthage-xcodebuild.LEmVYA.log
I had the same issue, but I resolved.
ActiveLabel.swift was updated on 10/9.
If you use Xcode9, please try to use the tag/0.9.0.
It's written in the below release note.
https://github.com/optonaut/ActiveLabel.swift/releases/tag/1.0.1
I can able to run the code local machine. But running on Jenkins slave is failing with following error:
xcodebuild[3082:4342631] [MT] iPhoneSimulator: Could not launch simulator: -600
xcodebuild: error: Failed to build workspace Myproject with scheme Myproject.
Reason: The operation couldn’t be completed. (OSStatus error -600.)
Build step 'Execute shell' marked build as failure.
-----------------script-------------------
xcodebuild \
-workspace Myproject.xcworkspace \
-scheme Myproject \
-sdk iphonesimulator \
-destination 'platform=iOS Simulator,name=iPad Air 2,OS=9.2' \
test
I am resolved it bu using "Force Quit" for simulator and building project again.
I'm running command in Travis CI:
set -o pipefail && xcodebuild -verbose -workspace APP_NAME.xcworkspace -scheme app_name -sdk iphoneos -configuration Release OBJROOT=$PWD/build SYMROOT=$PWD/build clean build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | xcpretty
After compiling all files Travis writes:
▸ Running script 'Rollout.io post-build'
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution Rollout.io\ post-build build/APP_NAME.build/Release-iphoneos/APP_NAME.build/Script-FBFA10E57CD7495E8662D829.sh
(1 failure)
Can someone help me with this?
I'm having some trouble with my cocoapods running Travis CI. Everything seems to install correctly, but the xcodebuild script fails
$ set -o pipefail && xcodebuild test -workspace Example/UIKitPlus.xcworkspace -scheme UIKitPlus-Example -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty -c
xcodebuild: error: Failed to build workspace UIKitPlus with scheme UIKitPlus-Example.
Reason: The run destination iPad 2 is not valid for Testing the scheme 'UIKitPlus-Example'.
The command "set -o pipefail && xcodebuild test -workspace Example/UIKitPlus.xcworkspace -scheme UIKitPlus-Example -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty -c" exited with 70.
https://travis-ci.org/JamieREvans/UIKitPlus/builds/54649639
I'm not sure why this is failing, because I can run my tests on the iPad 2 simulator, using that scheme, without any issues.
Is this a Travis issue or is my Travis script wrong?
I've managed to get it build by adding a destination to the xcodebuild command line, e.g. -destination "platform=iOS Simulator,name=iPhone 6"