user in my app can login using 2 services : Facebook or Google
everything works fine, however, in the :
- (BOOL)application:(UIApplication *)applicat
You can just let either Google SDK or Facebook SDK attempt handling and if the SDK does not handle then allow the other SDK to try:
@available(iOS 9.0, *)
private func application(_ application: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any])
-> Bool {
let handled: Bool = SDKApplicationDelegate.shared.application(application, open: url, options: options)
if handled { return handled }
return GIDSignIn.sharedInstance().handle(url,
sourceApplication:options[UIApplication.OpenURLOptionsKey.sourceApplication] as? String,
annotation: [:])
}
//deprecated method iOS 8 and older
func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool {
let handled: Bool = SDKApplicationDelegate.shared.application(application,
open: url,
sourceApplication: sourceApplication,
annotation: annotation)
if handled { return handled }
return GIDSignIn.sharedInstance().handle(url,
sourceApplication: sourceApplication,
annotation: annotation)
}