Skip to content

Instantly share code, notes, and snippets.

@ianbarber
Created March 17, 2015 20:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ianbarber/94244c62216cd66f19a2 to your computer and use it in GitHub Desktop.
Save ianbarber/94244c62216cd66f19a2 to your computer and use it in GitHub Desktop.
Simple app delegate for Swift and GIDSignIn
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
GIDSignIn.sharedInstance().clientID = "366667191730-38onttdkl2cpqstheip1ek3r5tb8s5ds.apps.googleusercontent.com";
return true
}
func application(application: UIApplication,
openURL url: NSURL, sourceApplication: String?, annotation: AnyObject?) -> Bool {
return GIDSignIn.sharedInstance().handleURL(url, sourceApplication: sourceApplication, annotation: annotation)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment