Issue: getting the following error in terminal when archiving
The following build commands failed:
CompileSwift normal arm64
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
Steps to reproduce:
xcodebuild -workspace playmule.xcworkspace -scheme playmule -sdk iphoneos -archivePath ~/Desktop/playmule.xcarchive -configuration playmule archive
The following are a bunch of lines before ** ARCHIVE FAILED ** : (see below)
/Users/ss/Desktop/playmule-ios/playmule/Utility/NetworkManager.swift:174:25: error: type 'Constants.Api' has no member 'BaseUrl'; did you mean 'resetUrl'?
let urlString = Constants.Api.BaseUrl + Constants.Api.currentVersion + Constants.Api.resendSMSEndpoint
^~~~~~~~~~~~~ ~~~~~~~
resetUrl
This same error is repeated for the same static variable.
The variable is confirmed to be present in the struct as below:
struct Constants {
struct Api {
static let BaseUrl = "https://some-valid-url.com/dev/"
}
}
EDIT: I am able to run this project on a device and a simulator. So the issue is unrelated to code semantics
I made a small tweak to my xcodebuild command with -parallelizeTargets to resolve build errors for projects with frameworks/linked dependency targets:
xcodebuild -workspace playmule.xcworkspace -scheme playmule -sdk iphoneos -archivePath ~/Desktop/playmule.xcarchive -parallelizeTargets archive
Note that the above flag also helps compile other actions with xcodebuild such as build or docbuild.
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 have many projects embedded in single main project, i am trying to automate the build process. but issue is that i cant make build using command line.
Clean project
xcodebuild clean -project TestingCommandLine.xcodeproj -configuration Debug -alltargets
Make Archive
xcodebuild archive -project TestingCommandLine.xcodeproj -scheme "TestingCommandLine" -configuration Debug -archivePath myApp.xcarchive
Build IPA
xcodebuild -exportArchive -archivePath myApp.xcarchive -exportPath myApp.ipa -exportOptionsPlist exportOptions.plist
the same process works with simple project which does not have any dependencies.
The following build commands failed:
Ld watchos/Watch\ Extension.appex/iskanWatch\ Extension normal armv7k
(1 failure)
This is the actual failure error comes when i try to build.
Any help will be appreciated.
I'm trying to release a Simulator build for Facebook review of my app.
When I run this command I see a scheme called "Roomify":
xcodebuild -list
Information about project "Roomify":
Targets:
Roomify
RoomifyTests
Build Configurations:
Debug
Release
If no build configuration is specified and -scheme is not passed then "Release" is used.
Schemes:
Roomify
RoomApp
However, when I try to build it fails telling me the scheme doesn't exist, why so?
>xcodebuild -arch i386 -sdk iphonesimulator8.3 -workspace Roomify.xcworkspace/ -scheme Roomify
Build settings from command line:
ARCHS = i386
SDKROOT = iphonesimulator8.3
xcodebuild: error: The workspace 'Roomify' does not contain a scheme named 'Roomify'.
Turns out I used the wrong command to list the schemes in my workspace.
Instead of:
xcodebuild -list
Do:
xcodebuild -workspace Roomify.xcworkspace -list
I'm having an issue with xcodebuild. I use the xcodebuild archive command from a build server to create an archive. At the moment, it seems that it will not respect the build configuration I have set. Has anyone come across this, or have any idea how to alter it?
To give a bit more background, within the project I have my build location set as Legacy so that I can build multiple libraries into a single iOS app (similar to how three20 do it), and so I have my build directories set within an xcconfig file as so:
BUILD_DIR = ../Build
SYMROOT = ${BUILD_DIR}/Products
OBJROOT = ${BUILD_DIR}/Intermediates
TEMP_ROOT = ${BUILD_DIR}/Temp
If I run
xcodebuild -workspace ${WORKSPACE} -scheme ${SCHEME} -configuration ${CONFIGURATION} -sdk ${SDK}
It all works swimmingly, and the compilation command I get compiles into the common ../Build folder as you can see in the sample output here:
CompileC ../Build/Intermediates/Core.build/Release-iphoneos/Core.build/Objects-normal/armv7s/NumberUtils.o Source/NumberUtils.m normal armv7s objective-c com.apple.compilers.llvm.clang.1_0.compiler
However if I add archive on the end, and run:
xcodebuild -workspace ${WORKSPACE} -scheme ${SCHEME} -configuration ${CONFIGURATION} -sdk ${SDK} archive
It ignores my build settings, and just uses the DerivedData location:
CompileC /Users/user/Library/Developer/Xcode/DerivedData/workspace-bmancqbwwpbxuzbdtxezsoptpyur/ArchiveIntermediates/Release/IntermediateBuildFilesPath/Core.build/Release-iphoneos/Core.build/Objects-normal/armv7/NumberUtils.o Source/NumberUtils.m
Is there something else I need to set? I've set all the environment variables I can think of. Strangely archiving from within xcode itself also works fine. Any advice?