Created
October 12, 2016 04:40
-
-
Save Jerry0420/18f5afd0bfa514d2fd441d196a8c3324 to your computer and use it in GitHub Desktop.
將以下程式碼加入AppDelegate內
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 { | |
// Override point for customization after application launch. | |
var error : NSError? | |
GGLContext.sharedInstance().configureWithError(&error) | |
if error != nil{ | |
print(error) | |
} | |
return true | |
} | |
//按下登入鈕後,畫面會跳轉到網頁,進行帳號密碼確認,此方法實作確認完帳號密碼後,畫面跳轉回原ViewController | |
func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool { | |
return GIDSignIn.sharedInstance().handle(url, sourceApplication: options[UIApplicationOpenURLOptionsKey.sourceApplication] as? String, annotation: options[UIApplicationOpenURLOptionsKey.annotation]) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment