FIRApp.Configure Crashing App(FIRApp.Configure Crashing App)

编程入门 行业动态 更新时间:2024-10-28 04:29:55
FIRApp.Configure Crashing App(FIRApp.Configure Crashing App)

我正在使用Xcode和Swift。 我的应用程序一直崩溃并说“尚未配置默认应用程序”。 但我确实在我的appDelegate中进行了配置。 有没有人遇到过这个问题?

I am using Xcode and Swift. My application keeps crashing and saying "The default app has not been configured yet." But I do have it configuring in my appDelegate. Has anyone encountered this issue?

最满意答案

我在AppDelegate中使用override init()方法来配置Firebase。 Firebase文档显示了didFinishLaunchingWithOptions方法中的配置,但我还没有在我的应用程序中使用该方法。

import UIKit import Firebase @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? override init() { FIRApp.configure() } func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { return true } }

I use the override init() method in the AppDelegate to configure Firebase. The Firebase documentation shows the configuration in the didFinishLaunchingWithOptions method but I haven't gotten that approach to work in my apps.

import UIKit import Firebase @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? override init() { FIRApp.configure() } func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { return true } }

更多推荐

appDelegate,配置,Swift,应用,电脑培训,计算机培训,IT培训"/> <meta name="descr

本文发布于:2023-07-16 10:03:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1126904.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Configure   FIRApp   App   Crashing

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!