'No such module 'FirebaseFirestore'
Trying to build my app but can't it always gives me problems with FirebaseFirestore.
It seems to recognize FirebaseStorage and Firebase fine but not FireStore.
Here are the images with problems and some code:
Code:
import UIKit
import FirebaseFirestore //No such module 'FirebaseFirestore'
var docRefIm: DocumentReference!
var docRefImC: CollectionReference!
class carregar: UIViewController,UINavigationControllerDelegate, UIImagePickerControllerDelegate {
@IBOutlet weak var upload: UIButton!
@IBOutlet weak var myImage: UIImageView!
@IBAction func uploadBt(_ sender: Any) {
let image = UIImagePickerController()
image.delegate = self
image.allowsEditing = true
image.sourceType = UIImagePickerControllerSourceType.photoLibrary
self.present(image, animated: true){
}
}
I tried deleting and reinstalling the pods, deleting the modules, adding the schemes, and nothing seems to work.
Here is the pod file:
# Uncomment the next line to define a global platform for your project
# platform :ios, ’8.0’
target 'MarisaeRui' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for MarisaeRui
pod 'Firebase/Core'
pod 'Firebase/Firestore'
pod 'Firebase/Storage'
target 'MarisaeRuiTests' do
inherit! :search_paths
# Pods for testing
end
target 'MarisaeRuiUITests' do
inherit! :search_paths
# Pods for testing
end
end
Solution 1:[1]
This is an issue with using Firestore on Xcode 8.3.3.
The easiest workaround would be to move to Xcode 9 - which will be required this month for submissions to the App Store.
Alternatively, you could fix the build error in the Firestore sources. Follow this issue for more details.
Solution 2:[2]
Add or uncomment this command
use_frameworks!
This should be below project name like this
target 'Project-Name' do
use_frameworks!
Solution 3:[3]
Just add this to your PODs...
pod 'FirebaseCore', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :branch => 'master' pod 'FirebaseFirestore', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :branch => 'master'
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 | Paul Beusterien |
Solution 2 | Asad Mehmood |
Solution 3 | Mwangi Gituathi |