How can I integrate Firebase for a Swift app using Buck?
I am trying to use Buck to include the Firebase in iOS app I am working on but no luck can you help please?
I don't understand does BUCK can work with the new XCFrameworks packaging format?
I think that XCFrameworks have benefits only to apps that will run in Catalyst too. You can get those frameworks inside of Firebase’s xcframework, delete the catalyst one and merge x84_64 (for simulator) with arm64(and others archs accepted for your app) libraries with lipo and use that framework in buck with prebuilt_apple_framework
I am trying to use Buck to include the Firebase in iOS app I am working on but no luck can you help please?
the simplest solution would be using Carthage prebuilt frameworks and buck rule prebuilt_apple_framework with preferred linkage to static
for example - your Cartfile:
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json" == YOUR_VERSION
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseProtobufBinary.json" == YOUR_VERSION
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebasePerformanceBinary.json" == YOUR_VERSION
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseRemoteConfigBinary.json"
github "google/promises" // compile error without it (in my case)
and BUCK file for carthage deps:
prebuilt_apple_framework(
name = "Firebase",
framework = "Build/iOS/Firebase.framework",
preferred_linkage = "static",
visibility = ["PUBLIC"],
)
// ... and so on for every framework which downloaded for firebase
ps: small tip - frameworks in google/promises should be linked as "shared". btw, I tested with version 6a45969732f74dc0b28015bbba7441b678afe4c2. in earlier version preferred_linkage generate incorrect Xcode project
Hope it helps