Skip to content

Commit

Permalink
Enable arm64 for simulator and enable bitcode for all frameworks
Browse files Browse the repository at this point in the history
  • Loading branch information
yury committed Jan 18, 2021
1 parent 2a57c12 commit 153f9a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 24 deletions.
14 changes: 1 addition & 13 deletions createXcFrameworks.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,2 @@
# First, creat all frameworks for both architectures:
xcodebuild -project ios_system.xcodeproj -alltargets -sdk iphoneos -configuration Release -quiet
xcodebuild -project ios_system.xcodeproj -alltargets -sdk iphonesimulator -arch x86_64 -configuration Release -quiet

# then, merge them into XCframeworks:
for framework in awk curl_ios files ios_system shell ssh_cmd tar text
do
rm -rf $framework.xcframework
xcodebuild -create-xcframework -framework build/Release-iphoneos/$framework.framework -framework build/Release-iphonesimulator/$framework.framework -output $framework.xcframework
# while we're at it, let's compute the checksum:
rm -f $framework.xcframework.zip
zip -rq $framework.xcframework.zip $framework.xcframework
swift package compute-checksum $framework.xcframework.zip
done
swift run --package-path xcfs build
12 changes: 1 addition & 11 deletions xcfs/Sources/build/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,6 @@ OutputLevel.default = .error
// TODO: We can add more platforms here
let platforms: [Platform] = [.iPhoneOS, .iPhoneSimulator]

extension Platform {
var excludedArchs: [Platform.Arch] {
switch self {
case .iPhoneSimulator: return [.arm64] // TODO: add arm64 simulator
default: return []
}
}
}

let allSchemes = [
"ios_system",

Expand Down Expand Up @@ -47,8 +38,7 @@ for scheme in schemes {
dirPath: ".build",
project: "ios_system",
scheme: scheme,
platforms: platforms.map { ($0, excludedArchs: $0.excludedArchs) },
enableBitCode: false
platforms: platforms.map { ($0, excludedArchs: []) }
)

try cd(".build") {
Expand Down

0 comments on commit 153f9a7

Please sign in to comment.