没有这样的模块“ FirebaseFirestore”

时间:2018-07-10 20:06:11

标签: ios swift firebase google-cloud-firestore

尝试构建我的应用程序,但不能总是给我FirebaseFirestore问题。

似乎可以识别FirebaseStorage和Firebase,但不能识别FireStore。

以下是有问题的图片和一些代码:

error

代码:

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){

        }
    }

我尝试删除并重新安装Pod,删除模块,添加方案,但似乎无济于事。

这是pod文件:

# 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

pod install

1 个答案:

答案 0 :(得分:1)

这是在Xcode 8.3.3上使用Firestore的问题。

最简单的解决方法是移至Xcode 9-即required this month for submissions to the App Store

或者,您可以在Firestore源中修复构建错误。遵循this issue了解更多详细信息。