当我编译应用程序时,我得到一个等于这个错误:
无法构建Objective-C模块'Firebase'
import Firebase我的文件swift中出现此错误.
我正在尝试为我的 Firestore 设置数据库,但是我尝试重新安装 Pod 和许多其他东西,但我仍然无法让它工作,因为它显示了以下错误:
Type 'Firestore' has no member 'firebase'
Run Code Online (Sandbox Code Playgroud)
我不知道为什么会这样,因为 Firebase 文档表明这应该是正确的。消息传递部分可以工作,只是以防万一它以某种方式导致错误,请帮助我解决这个问题。
这是我的 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)