Skip to content

Instantly share code, notes, and snippets.

@ramamilaneh
Last active January 18, 2017 15:02
Show Gist options
  • Save ramamilaneh/68aefdb0e44d3eabd3086a54850d11ff to your computer and use it in GitHub Desktop.
Save ramamilaneh/68aefdb0e44d3eabd3086a54850d11ff to your computer and use it in GitHub Desktop.
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