Closed dinesh-thiyagarajan closed 3 months ago
@dinesh-thiyagarajan how did you solve this? I just ran into same error
Hi @timhuang1018 Open the iosApp (which is under the root directory) folder in xcode.
`import SwiftUI import Firebase
class AppDelegate: NSObject, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { FirebaseApp.configure()
return true
}
}
@main struct iOSApp: App {
@UIApplicationDelegateAdaptor(AppDelegate.self) var delegate
var body: some Scene {
WindowGroup {
ContentView()
}
}
}`
Paste the above code in iOSApp.swift file (not able to render the code here properly, but copy paste the code it should work fine), here we are initializing the firebase. also make sure you have added the GoogleService-Info.plist file inside the root/iosApp/iosApp/GoogleService-Info.plist
ohh I could work now! @dinesh-thiyagarajan appreciate for all these details!
ld: warning: Could not find or use auto-linked framework 'FirebaseAuth': framework 'FirebaseAuth' not found ld: warning: Could not find or use auto-linked framework 'FirebaseCore': framework 'FirebaseCore' not found Undefined symbols for architecture arm64: "_OBJCCLASS$_FIRAuth", referenced from: in ComposeApp2724 ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
On adding Firebase Auth as a separate module in compose multi platform app, was not able to build the app for iOS, but was able to do so in Android