简体   繁体   中英

GeneratedPluginConstraint , Fatal error: module 'firebase_auth' not found @import firebase_auth;

so I've got this error in my last project while trying to link it with firebase for my flutter app.

So for this project, I downloaded it from my github which I uploaded it from my pc, I tried flutter run but then it shows me this error:

Desktop/app_with_firebase-main/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

Could not build the application for the simulator.
Error launching application on iPhone 12 Pro Max.

I tried doing flutter clean and then deleting the pod files , but it won't work. But in my windows, I run the project on the android device and it is working perfectly fine.

Any help is appreciated, and please explain what does that error means because everytime i use firebase/flutter in my ios emulator, I 95% of the time will get this error.

Thank you.

Do not add the firebase_auth packages to the podfile. Add them to your pubspec.yaml file. The instructions on the FIrebase website to integrate firebase into your apps is specifically for Android and iOS, but not for flutter.

Remove your podfile and try to run it again.

I tried Everything on stackoverflow but the problem was with my googleService-Info.plist file. I opened.xcworkspace file and tried creating build and it was showing error of file not found though it was present there. I added the file again through xcode with runner target selected and everything started working.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM