Home > Software engineering >  Why am I getting this Firebase error message for my macOS app?
Why am I getting this Firebase error message for my macOS app?

Time:11-14

I am new to Swift and Firebase. I am trying to make a macOS app and am using Firebase. I followed the steps to add Firebase to my app using Swift Packet Manager. I got this error message:

While building for macOS, no library for this platform was found in '/Users/(myUsername)/Library/Developer/Xcode/DerivedData/testagain-ddvpxsjlhmusrqciawyrnbhdxigl/SourcePackages/artifacts/GoogleAppMeasurement/GoogleAppMeasurementOnDeviceConversion.xcframework'.

Does this mean Firebase is not compatible creating macOS apps? Where do I found this GoogleAppMeasurementOnDeviceConversion.xcframework file?

Because I am new to this, I am not sure what to try. I've found it difficult to find information online pertaining to Firebase for macOS apps. If anyone is curious here is my code:

import SwiftUI
import FirebaseCore


class AppDelegate: NSObject, NSApplicationDelegate {
    func applicationDidFinishLaunching(_ notification: Notification) {
        FirebaseApp.configure()
    }
}

@main
struct testagainApp: App {
    @NSApplicationDelegateAdaptor(AppDelegate.self) var delegate
    var body: some Scene {
        WindowGroup {
            ContentView()
        }
        .windowStyle(HiddenTitleBarWindowStyle())
    }
}

CodePudding user response:

GoogleAppMeasurementOnDeviceConversion is not available for macOS apps. See https://firebase.google.com/docs/ios/learn-more#firebase_library_support_by_platform. It should be removed from the configuration.

  • Related