Error: Getter not found: 'Firebase'. await Firebase.initializeApp(); - dart

Why I am getting error for that Firebase keyword

Try to import firebase
import 'package:firebase_core/firebase_core.dart';

You forgot to import firebase.
Try adding this to the beginning of your code,
import 'package:firebase_core/firebase_core.dart';
This library contains the keyword Firebase.
If it shows an error in this line, open root/pubspec.yaml and add this code after dependencies.
dependencies:
# ...
firebase_core: ^0.6.0
This will create a folder firebase_core.
If that doesn't work, then try watching a tutorial on youtube

Related

Swift google firebase VisionTextDetector showing Use of undeclared type

My scenario, I am trying to implement Google Firebase CoreML for text detection. Here, I installed a list of pods into my project but I still get Use of undeclared type 'VisionTextDetector'. How to fix this?
pod 'Firebase/Core'
pod 'Firebase/MLVision'
pod 'Firebase/MLVisionTextModel'
pod 'Firebase/MLVisionFaceModel'
pod 'Firebase/MLVisionBarcodeModel'
pod 'Firebase/MLVision'
pod 'Firebase/MLVisionLabelModel'
Below is my class file:
import UIKit
import Firebase
class TextViewController: UIViewController {
lazy var vision = Vision.vision()
var textDetector: VisionTextDetector? // Error: Use of undeclared type 'VisionTextDetector'
}
As the documentation didn't mentioned about the actual framework to be imported which is FirebaseMLVision, so with or without "Firebase", you much import actual "MLVision" framework. Just add below line on the top of your class file.
import FirebaseMLVision
Let me know, if you still face that error!
VisionTextDetector is no more supported so you have to use VisionTextRecognizer. no need to import FirebaseMLVision

Initialization error with CDYelpFusionKit

Trying to use the CDYelpFusionKit api for an app, and I'm getting an error on the first step:
let yelpAPIClient = CDYelpAPIClient(apiKey: "myapikeyhere")
It's saying that it's an
Use of unresolved identifier 'CDYelpAPIClient'
but I have already installed the dependencies with cocoapods.
You also need to import the framework
import CDYelpFusionKit

Error - No such module CCXGoogleSDK

I have to fetch all nearby ATM and for this I am using CCXGoogleNearbyPlaces framework using cocoapods (Reference: https://cocoapods.org/pods/CCXGoogleNearbyPlaces)
But I am not able to use CCXGoogleSDK class. I am getting this error:
you should need to import CCXGoogleNearbyPlaces.
import CCXGoogleNearbyPlaces instead of import CCXGoogleSDK

failed to import bridging header file in swift

I am getting this error while running this project.
failed to import bridging header '/Users/OdysseyApps/Desktop/ashraf/onedrive-sample-sync-ios-master/OneAPI Sync/OneAPI Sync-Bridging-Header.h'
I think the problem is the space in project name OneAPI Sync.
please give me some suggestion.
Probably You have imported some class in bridge file.
That is not a part of your bundle.(or didn't accidentally imported .m file)
Try to find that class and remove that class import statement.

(Swift) 'use of unresolved identifier 'FIRStorage'

I am using firebase and I have the following line of code:
let storageRef = FIRStorage.storage().reference()
which gives me the error 'use of unresolved identifier 'FIRStorage'.
These are my imports in my file:
import UIKit
import Firebase
In the video tutorial I am following the person in the video only has these two imports and gets no error. 'FIRStorage' also seems to be an actual class in the Firebase documentation. Is there an import I am missing? Is there something wrong with my frameworks or podfile?
Here are my pods:
Any help is greatly appreciated!
You need install FirebaseStorage to use it
Follow this instruction: https://firebase.google.com/docs/storage/ios/start
You need to the following steps:
import FirebaseStorage
FIRStorage has been renamed to Storage
Hopefully you find it helpful.

Resources