2017-01-16 8 views
0

FirebaseをiOSで使い始めていて、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の現在の状態です(のみFirebaseを設定するための変更を行った)

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ファイルがあり、ブレークポイントではないようです。私は確かに(意図的に)1つを設定せず、ブレークポイントナビゲータは何も表示していません。回答ありがとう! – user3029918

答えて

0

"GoogleService-Info.plist"バンドルに追加しましたか?

GoogleService-Info.plistをバンドルする必要があります。ライブラリのみが場所を自動認識して使用できます。

関連する問題