iosxcodemacosfluttercocoapods

Xcode Build failed,fatal error: module 'firebase_auth' not found @import firebase_auth;


    Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.17.4, on Mac OS X 10.15.5 19F101, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.5)
[✓] Android Studio (version 4.0)
[✓] VS Code (version 1.46.1)
[!] Connected device
    ! No devices available

! Doctor found issues in 1 category.

\\\Error Message

     ** BUILD FAILED **
Xcode's output:
↳
    /Users/Razi/Desktop/projects/Sayy/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

I have tried deleting Podfile/Podlock and running pod init/ pod install without success. Also have reviewed the GitHub repo for ios folder. Why is firebase_auth not found?


Solution

  • Update: I was able to eventually find a workaround by executing the following:

    1. Running flutter clean (in ios folder of project)
    2. Deleting both Podlock & Pod Folder
    3. Running pod init followed by pod install

    Seems to be an issue with the runner.xcworkspace folder and the build files needed to run builds.