2017-01-16 41 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,那麼只有庫可以自動查找位置並使用它。