'fatal error: module 'firebase_auth' not found @import firebase_auth

I am trying to use Firebase Authentication for my iOS Flutter.

I have tried all of the procedures laid out in this link but I still receive the same error. https://github.com/FirebaseExtended/flutterfire/issues/1929

This is the error I receive when I run the iOS app.

/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: Building targets in parallel
    note: Planning build
    note: Constructing build description

This is my Podfile

# add pods for desired Firebase products
# https://firebase.google.com/docs/ios/setup#available-pods

# 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!
  pod 'Firebase/Analytics'
  pod 'Firebase/Core'
  pod 'Firebase/Auth'
  pod 'Firebase/Firestore'
  pod 'Firebase/Storage'

end


post_install do |pi|
    pi.pods_project.targets.each do |t|
      t.build_configurations.each do |config|
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
      end
    end
end

XCode Error Message



Solution 1:[1]

You may be interested in this thread here: https://github.com/FirebaseExtended/flutterfire/issues/192

Essentially its recommendation is to delete Podfile and Podfile.lock. Once you've done this re-run and flutter should automatically create the correct Podfiles for you.

Hopefully that helps.

DB

Solution 2:[2]

When it happens remove the "^" on the dependency. So firebase_auth: ^1.0.0 -> firebase_auth: 1.0.0.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 DBacon
Solution 2 ouflak