2017-01-16 78 views
0

我开始使用iOS中的Firebase,并且在通过Firebase文档并为我的应用程序执行初步设置后,它不会在模拟器中运行。基本Swift 3应用程序与Firebase崩溃

这里的错误:

2017-01-16 10:56:08.058 Thread[18978:1562804] Firebase automatic screen reporting is enabled. Call +[FIRAnalytics setScreenName:setScreenClass:] to set the screen name or override the default screen class name. To disable automatic screen reporting, set the flag FirebaseAutomaticScreenReportingEnabled to NO in the Info.plist 
2017-01-16 10:56:08.062808 Thread[18978:1562850] subsystem: com.apple.UIKit, category: HIDEventFiltered, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0 
2017-01-16 10:56:08.064832 Thread[18978:1562850] subsystem: com.apple.UIKit, category: HIDEventIncoming, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0 
2017-01-16 10:56:08.072334 Thread[18978:1562846] subsystem: com.apple.BaseBoard, category: MachPort, enable_level: 1, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 0, enable_private_data: 0 
2017-01-16 10:56:08.083044 Thread[18978:1562804] subsystem: com.apple.UIKit, category: StatusBar, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0 
(lldb) 

,这里是我的AppDelegate.swift的当前状态(仅由设立火力地堡的变化)

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:. 
    } 


} 

它越来越挂在FIRApp.configure( )

+0

这不是错误 - 它看起来应用程序在断点处暂停 - 您可能需要继续查看正确的错误。 – Estel

+0

我怀疑你的项目可能缺少'GoogleService-Info.plist'文件? – Estel

+0

.plist文件在那里,它似乎不是一个断点。我当然没有(有意)设置一个,断点导航器没有显示任何东西。尽管谢谢你的回应! – user3029918

回答

0

您是否添加到“GoogleService-Info.plist”包中?

您必须捆绑GoogleService-Info.plist,那么只有库可以自动查找位置并使用它。