Skip to content

Commit ea7b1e1

Browse files
authored
Continue iOS 11 zip builder fix (#7997)
1 parent f68ced2 commit ea7b1e1

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

.github/workflows/zip.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ jobs:
7979
- name: Setup quickstart
8080
run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \
8181
"${HOME}"/ios_frameworks/Firebase/FirebaseRemoteConfig/* \
82-
"${HOME}"/ios_frameworks/Firebase/FirebaseMessaging/FirebaseInstanceID.xcframework \
8382
"${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseCore.xcframework \
8483
"${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/PromisesObjC.xcframework \
8584
"${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseInstallations.xcframework \

ReleaseTooling/Sources/ZipBuilder/FrameworkBuilder.swift

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,13 +821,25 @@ struct FrameworkBuilder {
821821
var slices: [Architecture: URL] = [:]
822822
for (platform, binary) in builtSlices {
823823
var archs = platform.archs
824+
var forceLipoOnOneArch = false
824825
if platform == .iOSSimulator {
825826
// Exclude the arm64 slice for simulator since Carthage can't package as an XCFramework.
826827
archs.removeAll(where: { $0 == .arm64 })
828+
if binary.lastPathComponent == "FirebaseAppCheck" {
829+
// Exclude i386 slice for iOS 11+ frameworks.
830+
archs.removeAll(where: { $0 == .i386 })
831+
forceLipoOnOneArch = true // Still need to run lipo because .x86_64 and arm64 were built.
832+
}
833+
}
834+
if platform == .iOSDevice {
835+
if binary.lastPathComponent == "FirebaseAppCheck" {
836+
// Exclude armv7 slice for iOS 11+ frameworks.
837+
archs.removeAll(where: { $0 == .armv7 })
838+
}
827839
}
828840

829841
// lipo doesn't work if only one architecture.
830-
if archs.count == 1 {
842+
if archs.count == 1, !forceLipoOnOneArch {
831843
slices[archs.first!] = binary
832844
continue
833845
}

0 commit comments

Comments
 (0)