相关疑难解决方法(0)

错误:无法构建Objective-C模块'Firebase'

当我编译应用程序时,我得到一个等于这个错误:

无法构建Objective-C模块'Firebase'

import Firebase我的文件swift中出现此错误.

firebase swift3 ios10 xcode8

68
推荐指数
9
解决办法
5万
查看次数

Firestore.firestore() 失败并显示“类型‘Firestore’没有成员‘firestore’”

我正在尝试为我的 Firestore 设置数据库,但是我尝试重新安装 Pod 和许多其他东西,但我仍然无法让它工作,因为它显示了以下错误:

Type 'Firestore' has no member 'firebase'
Run Code Online (Sandbox Code Playgroud)

我不知道为什么会这样,因为 Firebase 文档表明这应该是正确的。消息传递部分可以工作,只是以防万一它以某种方式导致错误,请帮助我解决这个问题。

链接到 Firebase > Firestore 文档

这是我的 pod 文件代码:

project 'Pocket Games.xcodeproj'
platform :ios, '10.0'

target 'Pocket Games' do
  use_frameworks!

  pod 'Google-Mobile-Ads-SDK'

  pod 'Firebase/Core'

  pod 'Firebase/Messaging'

  pod 'Firebase/Auth'

  pod 'Firebase/Firestore'

  pod 'Canvas'
end
Run Code Online (Sandbox Code Playgroud)

这是我的 AppDelegate 代码:

//
//  AppDelegate.swift

import UIKit
import CoreData
import UserNotifications
import Firebase

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?



    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { …
Run Code Online (Sandbox Code Playgroud)

ios firebase swift google-cloud-firestore

5
推荐指数
2
解决办法
6548
查看次数

标签 统计

firebase ×2

google-cloud-firestore ×1

ios ×1

ios10 ×1

swift ×1

swift3 ×1

xcode8 ×1