2017-05-07 93 views
0

您好, 我最近開始不得不使用Firebase,特別是他的通知系統。當我建立我的項目的問題到了,這裏是錯誤使用Google Firebase通知生成錯誤

Error: URL scheme needed for Google Sign-In not included in your app's Info.plist. Please refer to the Google Sign-In SDK documentation for more information.' 
    *** First throw call stack: 
    (0x1877c2fe0 0x186224538 0x1877c2f28 0x10017c694 0x10017c114 0x18775d5f4 0x18775cd08 0x18775ca84 0x1877cb7a8 0x1876a095c 0x1881b2930 0x100089078 0x100087dac 0x100087aa4 0x100025f64 0x1000265b8 0x18d9654dc 0x18db71678 0x18db77120 0x18db8bc58 0x18db743b4 0x18936b884 0x18936b6f0 0x18936baa0 0x18777142c 0x187770d9c 0x18776e9a8 0x18769eda4 0x18d95e65c 0x18d959330 0x100027fd0 0x1866ad59c) 
    libc++abi.dylib: terminating with uncaught exception of type NSException 
    (lldb) 

AppDelegate.swift

https://pastebin.com/z3v3FHc5

謝謝你提前爲您的幫助!

回答

0

OK,這麼多對我來說,在Appdelagate我導入的文件,它是沒有必要的:/ 謝謝您的幫助:d

BEFORE:

import UIKit 
    import CoreData 

    import UserNotifications 
    import Firebase 
    import FirebaseInstanceID 
    import FirebaseMessaging 

AFTER :

import UIKit 
    import CoreData 

    import UserNotifications 
    import Firebase 
    //import FirebaseInstanceID 
    import FirebaseMessaging 

現在,它的工作,謝謝:)

0

The documentation

谷歌登入需要自定義URL方案被添加到您的項目。要添加自定義方案:

  1. 打開您的項目配置:雙擊左樹視圖中的項目名稱。從TARGETS部分選擇您的應用,然後選擇 選擇Info選項卡,然後展開URL Types部分
  2. 單擊+按鈕,併爲您的反向客戶端ID添加URL方案。要找到此值,請打開Goog​​leService-Info.plist 配置文件,然後查找REVERSED_CLIENT_ID鍵。複製該密鑰的 值,並將其粘貼到 配置頁面上的URL方案框中。將其他字段留空。
+0

謝謝,但我不希望Google登錄... – POL