Ral*_*uez 7 xcode cocoapods firebase firebase-storage
因此,每次在我的pod文件中,我决定使用pod'Firebase/Core'添加类似pod'Firebase/Storage'之类的内容,在我的应用FirebaseApp.configure()中,使用未解析的标识符'FirebaseApp'我的pod文件是错误的
https://docs.google.com/document/d/1U7s5StRuNrI_2WtpHSvHhwhA1TMCsQ255dnjDAEhhcE/edit?usp=sharing
小智 75
我通过使用 FirebaseCore 而不是 Firebase 库解决了这个问题:
import FirebaseCore
Run Code Online (Sandbox Code Playgroud)
Kin*_*r11 11
您的appdelegate类应如下所示:
import UIKit
import Firebase
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
FIRApp.configure()
return true
}
func applicationWillResignActive(_ application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
}
func applicationDidEnterBackground(_ application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
func applicationWillEnterForeground(_ application: UIApplication) {
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
}
func applicationDidBecomeActive(_ application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}
func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
}
Run Code Online (Sandbox Code Playgroud)
我假设您正在使用xcode 8和swift 3.
就我而言,是因为我使用的是旧版本的 Firebase (3.11.1)
pod repo update
pod update
Run Code Online (Sandbox Code Playgroud)
使用 Firebase (4.2.0) 更新我的存储库和本地规范存储库后,Xcode 解决了 FirebaseApp 问题!
pod update至少运行到 Firebase 6.31.1。
Firebase 在 6.28.0 中进行了更改,暴露了 Xcode 构建竞争条件。该更改在 6.31.1 中恢复。详情见https://github.com/firebase/firebase-ios-sdk/issues/6341
| 归档时间: |
|
| 查看次数: |
6375 次 |
| 最近记录: |