Last active
January 18, 2017 15:02
-
-
Save ramamilaneh/68aefdb0e44d3eabd3086a54850d11ff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { | |
FIRApp.configure() | |
GIDSignIn.sharedInstance().clientID = FIRApp.defaultApp()?.options.clientID | |
GIDSignIn.sharedInstance().delegate = firebaseManager | |
return true | |
} | |
func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool { | |
let sourceApplication = options[UIApplicationOpenURLOptionsKey.sourceApplication] as? String | |
let annotation = options[UIApplicationOpenURLOptionsKey.annotation] | |
let urlString = url.absoluteString | |
if urlString.contains("com.googleusercontent") { | |
return GIDSignIn.sharedInstance().handle(url, sourceApplication: sourceApplication, annotation: annotation) | |
} | |
return true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment