Module 'cloud_firestore' not found - firebase

I am coding an app that is made on Flutter. I use Firebase Firestore as a database. I added cloud_firestore as a dependency in pubspec.yaml. When I build the apk for android it works perfectly fine, but in Xcode when I'm trying to build the app for iOS I have an error ( attached image ) 'Module cloud_firestore' not found, all the other dependencies are working. I've tried everything: pod install, pod update, remove Podfile, remove Podfile.lock, I even created a blank app and added cloud_firestore as dependency and it still happens.

inxcode, clean build folder.
In terminal, flutter clean
flutter pub get in terminal.
Don't touch the pods, build your file.

Related

Flutter.h not found

Hello all: I am working on a Flutter App with a team, and the App uses Firebase. When I try to run the App in Xcode, I get an error: Flutter/Flutter.h file not found from FLTFirebaseCorePlugin.h (error messages pasted at the bottom of this post). The steps I followed to bring the project over to the Mac from the PC are:
Copied the entire directory for the project
Open the project on the Mac in Android Studio
Run flutter pub get
Open a terminal, cd to the iOS folder
run pod install
but no joy. Can anyone offer any advice? I did have to set the paths to the Dart and Flutter SDKs on the Mac explicitly, and flutter doctor says all is OK, so stuck.
Thanks for any and all input.
/Users/johnstraumann/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_crashlytics-1.0.0/ios/Classes/FLTFirebaseCrashlyticsPlugin.h:8:9: 'Flutter/Flutter.h' file not found
/Users/johnstraumann/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_crashlytics-1.0.0/ios/Classes/FLTFirebaseCrashlyticsPlugin.m:5:9: In file included from /Users/johnstraumann/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_crashlytics-1.0.0/ios/Classes/FLTFirebaseCrashlyticsPlugin.m:5:
/Users/johnstraumann/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-1.0.3/ios/Classes/FLTFirebaseCorePlugin.h:8:9: 'Flutter/Flutter.h' file not found
/Users/johnstraumann/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_crashlytics-1.0.0/ios/Classes/FLTFirebaseCrashlyticsPlugin.h:12:9: While building module 'firebase_core' imported from /Users/johnstraumann/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_crashlytics-1.0.0/ios/Classes/FLTFirebaseCrashlyticsPlugin.h:12:
I got this error when I update flutter 1.0 to flutter 2.0;
I find just remove next line in Podfile, then pod install again, it got fixed;
:generate_multiple_pod_projects => true;
I had the same issue a week ago.
Updating Firebase Crashlytics to the latest version fixed the issue for me.
After upgrading in pubspec.yaml to the latest version, don't forget to run
flutter clean
flutter pub get
pod install
pod update

Remove Firebase dependencies on iOS in React Native 0.61

I have read a lot of articles similar my title. But they are not working for me.
I am working on React Native iOS project and need to delete firebase dependencies from iOS project.
So I have removed firebase core import line in ios/Podfile and then pod clean and pod install. But it is not working for me.
Firebase is installed so on. Please help me with correct solution.
Remove the line from the Podfile
pod deintegrate
pod install
Go through with these steps:
1.Remove the line pod/firebase from your pod file
2.run command npm uninstall react-native-firebase in your project root folder
3.Run pod install in ios folder.

Flutter build failed stuck in 'pod install’ while trying to implement cloud firestore

After completing https://codelabs.developers.google.com/codelabs/flutter-firebase/#5 these code lab steps successfully. I tried to run the app. But it is stuck in the ‘pod install’ command. When I try to find the error opening the workspace in Xcode and attempted to run from there and I found a error message. It says the Cloud Firestore Plugin.h missing?
pls See the attached screenshot.
Remove Podfile.lock open command line tool and navigate to iOS folder of your flutter app.
Run pod install from command line tool. Verify all the pods are installed successfully.
Hope this helps!

Firestore is failed to build with Flutter for iOS

I want to add Firestore to Flutter app, and I have problems running it on iOS.
I already added this line to pubspec.yaml
cloud_firestore: ^0.6.3
Flutter is updated. Flutter doctor says that I have v0.3.1.
While compiling app for iOS simulator I got this build error
Xcode's output: ↳ /
Users/*********/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.2.3/ios/Classes/FirebaseCorePlugin.m:7:9:
fatal error: 'Firebase/Firebase.h' file not found
#import <Firebase/Firebase.h>
^~~~~~~~~~~~~~~~~~~~~
1 error generated
I also run pod update to make sure that it is not issue with cocoapods.
UPDATE
After another research I found that deleting #use_frameworks! from Podfile in iOS folder let's project to compile. But what should be done in case when this can't be deleted?
The update to this gives me enough information to diagnose (hopefully). Flutter wasn't very good at supporting #use_frameworks & swift, but that was fixed fairly recently (mid-april 2018). However, it may not have made it to the beta channel yet at time of writing.
What was going on when #use_frameworks was set previously is that it wasn't linking everything into the right libraries, and a cocoapods bug was stopping it from finding certain files. The newest version of everything uses dynamic linking but has static_framework=true in the podfile for dependencies with static dependencies so that everything they need actually get linked into the right place.
This is fixed & tested on the master branch/channel, but should probably have made it to the dev branch/channel by now.
Here's the steps to makes sure your environment will support the fix, from this other github issue:
make sure you have Cocoapods 1.5.0 installed (pod --version should
say >= 1.5.0)
change any dependencies you have on the firebase_xxx, google_sign_in, or cloud_firestore plugins to the newest versions
(look for changelog entries referring to Cocoapods 1.5.0)
change your ios/Podfile to the newest version on Flutter master branch
(https://github.com/flutter/flutter/tree/master/packages/flutter_tools/templates/cocoapods)
delete ios/Podfile.lock and ios/Pods
switch to Flutter master (or dev) branch using flutter channel <branch>
flutter clean ; flutter run

`firebase deploy` just hangs

I'm trying to deploy a site to firebase.
firebase init worked fine. I then ran firebase bootstrap and chose the tetris template. So far so good. But when I run firebase deploy I get Preparing to deploy Public Directory... and then it just hangs forever.
How can I figure out what's going wrong?
Random info in case it helps:
My firebase-tools is version 1.0.1; node is version 0.8.20; npm is version 1.4.23. I ran sudo npm install -g firebase-tools to get the CLI. I'm running on a debian chroot on Android 4.4.3 device. My wifi works fine. On a lark I even tried running sudo firebase deploy in case it depends on ICMP packets or something, but there was no difference.
Firstly, the main reason it's not working is that Node.js version 0.10 or greater is required.
However, even once you've upgraded Node (and I'd recommend getting the latest of firebase-tools too) you're likely to be attempting to deploy the directory that you ran the initial firebase init command from, or at least the folder you specified in the setup (which defaults to the folder you ran the command from).
You should change directory and run the firebase deploy command from the folder that was created by the bootstrap command - which would have been named after the name of the Firebase it was created with, and you can delete the firebase.json file created in the parent directory.
The reason is that firebase init and firebase bootstrap are two different ways of doing the same thing - getting a folder in a deployable state. firebase init is for existing projects with files that will eventually be deployed, and firebase bootstrap is for creating a project from one of the existing templates. By running both, the initial firebase init would have created a firebase.json file containing the settings specified by the prompts, and then the firebase bootstrap command would have created a whole new sub-folder with its own firebase.json for the different settings.

Resources