I am building XCFramework, while archive from terminal facing below issue.
** ARCHIVE FAILED **
The following build commands failed:
CompileSwift normal x86_64
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
CompileSwift normal arm64
(3 failures)
Below script using for archive
xcodebuild archive \
-scheme SampleSDK \
-archivePath ~/Desktop/SampleSDK-iphonesimulator.xcarchive \
-sdk iphonesimulator \
SKIP_INSTALL=NO
Related
Im' facing this issue
normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
When i tried to make a framework only for architecture simulators arm 64
xcodebuild archive \
-workspace Project.xcworkspace\
-scheme "myFramework" \
-sdk iphonesimulator \
-archivePath "$BUILD_PATH/myFramework/ios_simulators64.xcarchive" \
-arch arm64
BUILD_LIBRARY_FOR_DISTRIBUTION=YES\
BITCODE_GENERATION_MODE=bitcode 2>&1\
SKIP_INSTALL=NO
this is the error :
The following build commands failed:
CompileC /Users/Blabla/Library/Developer/Xcode/DerivedData/BlueStackSDK-cjunsfsbsoawxlbizlbpxpqzfknv/Build/Intermediates.noindex/ArchiveIntermediates/BlueStackLocationAdapter/IntermediateBuildFilesPath/BlueStackSDK.build/Release-iphonesimulator/BlueStackLocationAdapter.build/Objects-normal/arm64/MAdvertiseLocationAdapter.o /Users/Blabla/Documents/Projects/MAdvertise/Blue\ Stack\ New\ Hope/BlueStackSDK/Adapters/BlueStackLocationAdapter/MAdvertiseLocationAdapter.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Also ,
error:
unsupported Swift architecture
#error unsupported Swift architecture
any help?
thank you
I have created a framework with few cocoapod dependencies
.The archive for the framework is failing when i do 'xcodebuild archive' after adding the pod files (Did pod install).
In the normal build, it is working fine. There is no error and the build is successful but when I do 'xcodebuild archive' on my terminal got this below issue.
error: no such module 'Lottie'
import Lottie
^
** ARCHIVE FAILED **
The following build commands failed:
CompileSwift normal arm64 /Users/surya/Documents/Projects/Sampe\ lottie\ test/TestFramework/TestFramework/ViewController.swift
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
(2 failures)
Below is my xcode build archive command
xcodebuild archive \
-scheme TestFramework \
-destination "generic/platform=iOS" \
-archivePath ../Output/TestFramework.framework-iphoneos.xcarchive \
SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES
Found the answer - we need to add - workspace ProjectName.xcworkspace, if our framework uses pods. Check the below command
xcodebuild archive -workspace projectName.xcworkspace \
-scheme projectName \
-sdk iphonesimulator \
-archivePath "./archives/ios_Simulators.xcarchive" \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
SKIP_INSTALL=NO
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.
I'm trying to build a framework that will work with iphonesimulator on both 64-32x.
The command i'm executing is:
xcodebuild -target mypack -sdk iphonesimulator8.1 -configuration Release -arch i386
For some reason it's threw me an error when i'm trying to run this framework on a 64x project ipa using iphonesimulator.
can someone tell me what i'm doing wrong?
I added a new arch called x86_64 into my framework project and then what fix for me the problem is the following command:
xcodebuild -target MobileCore -sdk iphonesimulator8.1 -configuration Release -arch i386 -arch x86_64
I want to build an iOS app from command line with iOS simulator.
The build settings are:
1. Architectures - armv7
2. Base SDK - Latest IOS(6.1)
3. Build Active Architecture only - yes
4. Valid architectures - armv7 (also tried adding i386)
5. IOS deployment target - IOS 4.3
I am executing the following command:
xcodebuild -target splistapp2 -sdk iphonesimulator6.1 -configuration Release (also tried with -arch "i836")
But this command gives following error:
invalid architecture 'arm' for deployment target '-mios-simulator-version-min=4.2'
What could be the problem?
In case anyone running into the same annoying problem again, I will share my script here: Remember to run this command under the directory that has the xcodeproj file.
xcodebuild \
-project "full-path-to-your-xcodeproj-file" \
-target YOUR_TARGET \
-sdk iphonesimulator6.1 \
-arch i386 \
-configuration Debug \
VALID_ARCHS="armv6 armv7 i386" \
ONLY_ACTIVE_ARCH=NO \
TARGETED_DEVICE_FAMILY="1" \
clean install
I modified the TARGETED_DEVICE_FAMILY because I only build for iPhone. If you want to build for both iPhone and iPad, delete this line or replace with TARGETED_DEVICE_FAMILY="1, 2".
The device uses ARM; while the simulator uses i386. Pick one or the other:
iphonesimulator6.1 and arch i386
iphoneos and arch armv7 (or armv7s)
Implement using arch1386 architecture.
xcodebuild -project splistapp2 -target TEST_TARGET -sdk iphonesimulator -configuration "Debug" -arch i386