Skip to content

Commit 796b8dc

Browse files
authored
Remove Carthage Protobuf special casing (#7512)
1 parent 00d73a4 commit 796b8dc

File tree

2 files changed

+1
-46
lines changed

2 files changed

+1
-46
lines changed

Carthage.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ more details and additional installation methods.
3131
Firebase components that you want to include in your app. Note that
3232
**FirebaseAnalyticsBinary** must always be included.
3333

34-
- Starting with the 6.23.0 release, if you're using FirebaseMessaging,
35-
FirebasePerformance, FirebaserRemoteConfig,
36-
FirebaseABTesting, FirebaseInAppMessaging, or FirebaseML,
37-
**FirebaseProtobufBinary** must also be included.
3834
```
3935
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseABTestingBinary.json"
4036
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAdMobBinary.json"
@@ -50,7 +46,6 @@ binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseGoogleSignInBinar
5046
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseInAppMessagingBinary.json"
5147
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseMessagingBinary.json"
5248
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebasePerformanceBinary.json"
53-
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseProtobufBinary.json"
5449
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseRemoteConfigBinary.json"
5550
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseStorageBinary.json"
5651
```
@@ -91,8 +86,7 @@ binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseStorageBinary.jso
9186

9287
## Versioning
9388

94-
Unlike the CocoaPods distribution, the Carthage distribution is like the
95-
Firebase zip release in that all the Firebase components share the same version.
89+
All Firebase components share the same version.
9690
Mixing and matching components with different versions may cause linker errors.
9791

9892
## Static Frameworks

ReleaseTooling/Sources/ZipBuilder/CarthageUtils.swift

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ extension CarthageUtils {
9292
artifacts: ZipBuilder.ReleaseArtifacts,
9393
outputDir: URL,
9494
versionCheckEnabled: Bool) {
95-
factorProtobuf(inPackagedDir: packagedDir)
9695
let directories: [String]
9796
do {
9897
directories = try FileManager.default.contentsOfDirectory(atPath: packagedDir.path)
@@ -213,44 +212,6 @@ extension CarthageUtils {
213212
}
214213
}
215214

216-
/// Factor Protobuf into a separate Carthage distribution to avoid Carthage install issues
217-
/// trying to install the same framework from multiple bundles(#5276).
218-
///
219-
/// - Parameters:
220-
/// - packagedDir: The packaged directory assembled for Carthage and Zip distribution.
221-
222-
private static func factorProtobuf(inPackagedDir packagedDir: URL) {
223-
let directories: [String]
224-
let protobufDir = packagedDir.appendingPathComponent("FirebaseProtobuf")
225-
do {
226-
directories = try FileManager.default.contentsOfDirectory(atPath: packagedDir.path)
227-
} catch {
228-
fatalError("Could not get contents of Firebase directory to package Carthage build. \(error)")
229-
}
230-
let fileManager = FileManager.default
231-
var didMove = false
232-
// Loop through each directory to see if it includes Protobuf.framework.
233-
for package in directories {
234-
let fullPath = packagedDir.appendingPathComponent(package)
235-
.appendingPathComponent("Protobuf.framework")
236-
if fileManager.fileExists(atPath: fullPath.path) {
237-
if didMove == false {
238-
didMove = true
239-
do {
240-
try fileManager.createDirectory(at: protobufDir, withIntermediateDirectories: true)
241-
try fileManager
242-
.moveItem(at: fullPath, to: protobufDir.appendingPathComponent("Protobuf.framework"))
243-
} catch {
244-
fatalError("Failed to create Carthage protobuf directory at \(protobufDir) \(error)")
245-
}
246-
247-
} else {
248-
fileManager.removeIfExists(at: fullPath)
249-
}
250-
}
251-
}
252-
}
253-
254215
/// Creates a fake Firebase.framework to use the module for `import Firebase` compatibility.
255216
///
256217
/// - Parameters:

0 commit comments

Comments
 (0)