Skip to content

Commit ca77625

Browse files
authored
Revert "[Release Tooling] Stop including 'Info.plist's in static xcframeworks (#12243)" (#12396)
1 parent ab0d085 commit ca77625

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

FirebaseCore/CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Unreleased
22
- [Swift Package Manager] Firebase now enforces a Swift 5.7.1 minimum version,
33
which is aligned with the Xcode 14.1 minimum. (#12350)
4+
- Revert Firebase 10.20.0 change that removed `Info.plist` files from
5+
static xcframeworks (#12390).
46

57
# Firebase 10.21.0
68
- Firebase now requires at least CocoaPods version 1.12.0 to enable privacy
@@ -9,7 +11,7 @@
911
# Firebase 10.20.0
1012
- The following change only applies to those using a binary distribution of
1113
a Firebase SDK(s): In preparation for supporting Privacy Manifests, each
12-
platform framework directory within a static xcframewok no longer contains
14+
platform framework directory within a static xcframework no longer contains
1315
an `Info.plist` file (#12243).
1416

1517
# Firebase 10.14.0

ReleaseTooling/Sources/ZipBuilder/CarthageUtils.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,9 @@ extension CarthageUtils {
241241
} catch {
242242
fatalError("Couldn't copy dummy library for Firebase framework in Carthage. \(error)")
243243
}
244+
245+
// Write the Info.plist.
246+
generatePlistContents(forName: "Firebase", withVersion: version, to: frameworkDir)
244247
}
245248

246249
static func generatePlistContents(forName name: String,

ReleaseTooling/Sources/ZipBuilder/FrameworkBuilder.swift

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,10 @@ struct FrameworkBuilder {
380380
}
381381
umbrellaHeader = umbrellaHeaderURL.lastPathComponent
382382
}
383+
// Add an Info.plist. Required by Carthage and SPM binary xcframeworks.
384+
CarthageUtils.generatePlistContents(forName: frameworkName,
385+
withVersion: podInfo.version,
386+
to: frameworkDir)
383387

384388
// TODO: copy PrivateHeaders directory as well if it exists. SDWebImage is an example pod.
385389

@@ -590,8 +594,8 @@ struct FrameworkBuilder {
590594
/// Groups slices for each platform into a minimal set of frameworks.
591595
/// - Parameter withName: The framework name.
592596
/// - Parameter isCarthage: Name the temp directory differently for Carthage.
593-
/// - Parameter fromFolder: The almost complete framework folder. Includes
594-
/// Headers, and Resources.
597+
/// - Parameter fromFolder: The almost complete framework folder. Includes Headers, Info.plist,
598+
/// and Resources.
595599
/// - Parameter slicedFrameworks: All the frameworks sliced by platform.
596600
/// - Parameter moduleMapContents: Module map contents for all frameworks in this pod.
597601
private func groupFrameworks(withName framework: String,
@@ -684,6 +688,15 @@ struct FrameworkBuilder {
684688
fatalError("Could not create framework directory needed to build \(framework): \(error)")
685689
}
686690

691+
// Info.plist from `fromFolder`
692+
do {
693+
let infoPlistSrc = fromFolder.appendingPathComponent("Info.plist").resolvingSymlinksInPath()
694+
let infoPlistDst = platformFrameworkDir.appendingPathComponent("Info.plist")
695+
try fileManager.copyItem(at: infoPlistSrc, to: infoPlistDst)
696+
} catch {
697+
fatalError("Could not create framework directory needed to build \(framework): \(error)")
698+
}
699+
687700
// Copy the binary to the right location.
688701
let binaryName = frameworkPath.lastPathComponent.replacingOccurrences(of: ".framework",
689702
with: "")

0 commit comments

Comments
 (0)