Carthage
Last updated
Was this helpful?
Last updated
Was this helpful?
依照需求 build 出需要的指令集的方法
首先在 Xcode 專案的 Build Settings 設定 Architectures
再執行 Carthage build --archive,Carthage 就會按照該專案的架構設定來建置出需要的指令集
以下的例子是去除 i386 指令集的做法
原本架構是這樣
xcodebuild -showBuildSettings -scheme CathayCoreSDK -sdk iphonesimulator | grep ARCHS```shell
ARCHS = x86_64
ARCHS_STANDARD = i386 x86_64
ARCHS_STANDARD_32_64_BIT = i386 x86_64
ARCHS_STANDARD_32_BIT = i386
ARCHS_STANDARD_64_BIT = x86_64
ARCHS_STANDARD_INCLUDING_64_BIT = i386 x86_64
ARCHS_UNIVERSAL_IPHONE_OS = i386 x86_64
VALID_ARCHS = i386 x86_64
lipo -info CathayCoreSDK.framework/CathayCoreSDK
Architectures in the fat file: CathayCoreSDK.framework/CathayCoreSDK are: i386 x86_64 armv7 arm64
經過以下處理
xcodebuild -showBuildSettings -scheme CathayCoreSDK -sdk iphonesimulator | grep ARCHS```shell
ARCHS = x86_64
ARCHS_STANDARD = i386 x86_64
ARCHS_STANDARD_32_64_BIT = i386 x86_64
ARCHS_STANDARD_32_BIT = i386
ARCHS_STANDARD_64_BIT = x86_64
ARCHS_STANDARD_INCLUDING_64_BIT = i386 x86_64
ARCHS_UNIVERSAL_IPHONE_OS = i386 x86_64
VALID_ARCHS = x86_64
carthage build --archive
lipo -info CathayCoreSDK.framework/CathayCoreSDK
Architectures in the fat file: CathayCoreSDK.framework/CathayCoreSDK are: x86_64 armv7 arm64