Hi;
I want use user login with email and pass with flutter and firebase_auth.
I can use andorid and its works fine but I take error in ios simulator.
My error :
ios/Runner/GeneratedPluginRegistrant.m:10:9: fatal error: module 'firebase_auth' not found
@import firebase_auth;
~~~~~~~^~~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Planning build
note: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone 8 Plus.
flutter doctor
`Flutter (Channel stable, v1.12.13+hotfix.7, on Mac OS X 10.15.3 19D76, locale tr-TR)
• Flutter version 1.12.13+hotfix.7 at /Volumes/Depo/development/flutter
• Framework revision 9f5ff2306b (7 days ago), 2020-01-26 22:38:26 -0800
• Engine revision a67792536c
• Dart version 2.7.0
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Users/drglsvr/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.2.1)
• Xcode at /Volumes/Depo/Xcode.app/Contents/Developer
• Xcode 11.2.1, Build version 11B53
• CocoaPods version 1.8.4
[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 43.0.1
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
[✓] Connected device (2 available)
• AOSP on IA Emulator • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)
• iPhone 8 Plus • 017DC72C-D104-4B60-81AD-88E4E7DEFC40 • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-2 (simulator)
• No issues found!
`
I use everything what i can find in internet but i cannot solve this.
I clean and delete my project and files in firebase and flutter tree times and remake but it's not work for ios.
What can I do_ Thanks
This solution works for me. Sorry https://stackoverflow.com/a/52007795
I have the same problem.
Can you share a solution?
I don't understand the link you shared up there....
I solved it, too. https://github.com/flutter/flutter/issues/41383#issuecomment-549432413
I only delete pod folder
Podfile
Podfile.lock
Hi @Gslvr
I'm glad that you solved the issue
thank you for letting us know
I just meet this problem too much, and I still cannot solved it. thanks
Could everyone who still has this problem please file a new issue with the exact descriptions what happens, logs and the output of 'flutter doctor -v' please.
All system setups can be slightly different so it's always better to open new issues and reference related issues.
I have the same issue
[✓] Flutter (Channel stable, v1.17.1, on Mac OS X 10.15.4 19E287, locale en-US)
• Flutter version 1.17.1 at /Users/sergeyroyz/dev/flutter
• Framework revision f7a6a7906b (10 days ago), 2020-05-12 18:39:00 -0700
• Engine revision 6bc433c6b6
• Dart version 2.8.2
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at /Users/sergeyroyz/Library/Android/sdk
• Platform android-29, build-tools 29.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.5)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.5, Build version 11E608c
• CocoaPods version 1.9.1
[✓] Android Studio (version 3.6)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 44.0.2
• Dart plugin version 192.7761
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
[!] IntelliJ IDEA Ultimate Edition (version 2019.2.4)
• IntelliJ at /Applications/IntelliJ IDEA.app
✗ Flutter plugin not installed; this adds Flutter specific functionality.
• Dart plugin version 192.7402
• For information about installing plugins, see
https://flutter.dev/intellij-setup/#installing-the-plugins
[!] VS Code (version 1.45.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
✗ Flutter extension not installed; install from
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[✓] Connected device (1 available)
• iPhone 11 • E177F584-0715-498E-A503-ACA4A77968CE • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-5 (simulator)
Remove any firebase pod from you pod file. you must only add firebase pubs in you pubspec.yaml.
it will fix the issue
But instructions were to add into Podfile these two:
pod 'Firebase/Core'
pod 'Firebase/Analytics'
now remove again???
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'Runner' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for Runner
pod 'Firebase/Core'
pod 'Firebase/Analytics'
end
You should not modify podfile. just modify podspec.yaml and add the dependencies here. because you want to use those dependencies in Flutter environment.
Thanks @hashemp206
So instructions from Firebase installation for iOS to add
pod 'Firebase/Analytics'
etc
are incorrect for Flutter?
so now best to delete Podfile.lock ?
For me it was actually working the opposite way yesterday (well, the success confirmation message from Firebase dashboard) when I had
pod 'Firebase/Core'
pod 'Firebase/Analytics'
cd ios
$ios> pod install
WITHOUT even adding anything in pubspec.yaml
and in
import UIKit
import Flutter
import FirebaseCore
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
FirebaseApp.configure()
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
I initially assumed as you but later I found Im wrong.
The instruction on Firebase docs on how to integrate Firebase is specific to iOS and Android, not Flutter! they have not mentioned it and its root of the problem.
Remove your podfile and let the flutter generate a new one for you. remove any reference of firebase from you iOS app.
Just add dependencies in pub spec.yaml and let the Flutter handle the rest for you.
ok I followed it and got SUCCESS message on their dashboard with their instructions so why do I need to remove
pod 'Firebase/Core'
pod 'Firebase/Analytics'
and
pubspec.yaml:
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.3
google_fonts: ^1.1.0
firebase_auth: ^0.16.1
and now it is breaking ?
EDIT:
Got the same result as you mentioned, but removing pods and
$ios> pod install
then
add pubspec.yaml
as you mentioned but now with these changes, I am not sure if Firebase connection is still successful as that message only appears first time when I ran, how to check that the connection is still valid after these changes without writing actual code?
you only add dependency to podfile if you want to use those dependency in iOS and in Swift files. otherwise don't modify podfile. its complete managed by Flutter.
There are instructions on how to integrate firebase to flutter on web. but here:
1- delete podfile and podfile.lock from Runner folder. (because you have modified it manually) Flutter will regenerate a new one.
2- add GoogleService-Info.plist to Xcode workspace . you need to open Xcode workspace and drag and drop it Runner folder.
3- add these dependencies to pub spec.yaml file:
firebase_core: ^0.4.5
firebase_auth: ^0.16.1
now you can import firebase package in your dart files and use it.
Hi @hashemp206 so is this correct?
in AppDelegate.swift:
import UIKit
import Flutter
import FirebaseCore <--- ?
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
FirebaseApp.configure()
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
because now flutter run:
$HOME/frontend/ios/Runner/AppDelegate.swift:3:8: error: no such module
'FirebaseCore'
import FirebaseCore
^
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
no, remove FirebaseApp.configure() from AppDelegate. don't modify app delegate
Working now, but Android Studio icon keeps saying Loading...
even though iOS is running?

I guess related to this:
Most helpful comment
I solved it, too. https://github.com/flutter/flutter/issues/41383#issuecomment-549432413