I have successfully implemented Google. Log in to the iOS version of my application (Google + Twitter + Facebook in the Android version also works). Now I'm trying to add the FB login, but it looks like it is conflicting with the Google login. After I see the successful FB login screen in WebView and click OK - application crashes.
Error Domain=com.google.GIDSignIn Code=-4 "(null)"
2016-09-01 18:51:55.745 APP_NAME[4574:] <FIRAnalytics/INFO> Firebase Analytics enabled
2016-09-01 18:52:10.039 APP_NAME[4574:3352620] -canOpenURL: failed for URL: "fbauth2:/" - error: "(null)"
2016-09-01 18:52:10.075 APP_NAME[4574:3352620] -canOpenURL: failed for URL: "fbauth2:/" - error: "(null)"
(lldb) bt
* thread
frame
frame
frame
frame
frame
frame
frame
frame
frame
frame
frame
frame
frame
frame
frame
frame
frame
frame
frame
frame
frame
frame
* frame
frame
Code from AppDelegate
@available(iOS 9.0, *)
func application(_ application: UIApplication,
open url: URL, options: [String: Any]) -> Bool {
print(url)
print(options)
return GIDSignIn.sharedInstance().handle(url as URL!,
sourceApplication: options[UIApplicationOpenURLOptionsKey.sourceApplication.rawValue] as? String,
annotation: options[UIApplicationOpenURLOptionsKey.annotation.rawValue])
|| FBSDKApplicationDelegate.sharedInstance().application(application, open: url,
sourceApplication: options[UIApplicationOpenURLOptionsKey.sourceApplication.rawValue] as? String,
annotation: options[UIApplicationOpenURLOptionsKey.annotation.rawValue])
}
func application(_ application: UIApplication,
open url: URL, sourceApplication: String?, annotation: Any) -> Bool {
return GIDSignIn.sharedInstance().handle(url as URL!, sourceApplication: sourceApplication!, annotation: annotation)
|| FBSDKApplicationDelegate.sharedInstance().application(application, open: url, sourceApplication: sourceApplication, annotation: annotation)
}
source
share