ios - Why Google login does not work on a device? -
when use code in simulator - works perfectly:
// present view prompts user sign in google func signin(signin: gidsignin!, presentviewcontroller viewcontroller: uiviewcontroller!) { self.presentviewcontroller(viewcontroller, animated: true, completion: nil) } // dismiss "sign in google" view func signin(signin: gidsignin!, dismissviewcontroller viewcontroller: uiviewcontroller!) { self.dismissviewcontrolleranimated(true, completion: nil) } func signin(signin: gidsignin!, didsigninforuser user: gidgoogleuser!, witherror error: nserror!) { if (error == nil) { // perform operations on signed in user here. let accesstoken = user.serverauthcode // safe send server print("aaa \(accesstoken)") } else { print("\(error.localizeddescription)") } }
but not work in real device. when tap "allow" button, refreshes page , forwards me google.com website.
what problem?
Comments
Post a Comment