Skip to content

Commit 1de0529

Browse files
authored
[Release Tooling] Copy over macOS/macCatalyst plists (#12517)
1 parent b40cc24 commit 1de0529

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

FirebaseCore/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Unreleased
2+
- Fix validation issue for macOS and macCatalyst XCFrameworks. (#12505)
3+
14
# Firebase 10.22.1
25
- [Swift Package Manager / CocoaPods] Fix app validation issues on Xcode 15.3
36
for those using the `FirebaseAnalyticsOnDeviceConversion` SDK. This issue was

ReleaseTooling/Sources/ZipBuilder/FrameworkBuilder.swift

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,18 @@ struct FrameworkBuilder {
674674
let binaryName = frameworkPath.lastPathComponent.replacingOccurrences(of: ".framework",
675675
with: "")
676676
let fatBinary = frameworkPath.appendingPathComponent(binaryName).resolvingSymlinksInPath()
677-
let infoPlist = frameworkPath.appendingPathComponent("Info.plist").resolvingSymlinksInPath()
677+
let plistPathComponents = {
678+
if platform == .catalyst || platform == .macOS {
679+
// Frameworks for macOS and macCatalyst have a different directory
680+
// structure so the framework-level `Info.plist` is found in a
681+
// different spot.
682+
return ["Versions", "A", "Resources", "Info.plist"]
683+
} else {
684+
return ["Info.plist"]
685+
}
686+
}()
687+
let infoPlist = frameworkPath.appendingPathComponents(plistPathComponents)
688+
.resolvingSymlinksInPath()
678689
let infoPlistDestination = platformFrameworkDir.appendingPathComponent("Info.plist")
679690
let fatBinaryDestination = platformFrameworkDir.appendingPathComponent(framework)
680691
do {
@@ -698,7 +709,9 @@ struct FrameworkBuilder {
698709

699710
try updatedPlistData.write(to: infoPlistDestination)
700711
} catch {
701-
// The Catalyst and macos Info.plist's are in another location. Ignore failure.
712+
fatalError(
713+
"Could not copy framework-level plist to framework directory for \(framework): \(error)"
714+
)
702715
}
703716

704717
// Use the appropriate moduleMaps

0 commit comments

Comments
 (0)