GIDSign in Delegate未在真实设备上调用

时间:2015-09-01 06:45:28

标签: ios delegates

我集成了Google + SDK最新版本,并且它在模拟器中运行良好,但在真实设备委托上运行却没有被调用。请协助我解决此问题。这是我在模拟器上使用的代码没有问题,但在真实设备上委托方法没有被调用。

- (IBAction)googlePlusSinInW2R:(id)sender {
    [MBProgressHUD showHUDAddedTo:self.view animated:YES];
    [[GIDSignIn sharedInstance] setDelegate:self];
    [[GIDSignIn sharedInstance] setUiDelegate:self];
    [GIDSignIn sharedInstance].shouldFetchBasicProfile = YES;
    [GIDSignIn sharedInstance].clientID = @"931697643692-7ns75vnf7gai.apps.googleusercontent.com";
    [GIDSignIn sharedInstance].scopes = @[@"https://www.googleapis.com/auth/plus.login",@"https://www.googleapis.com/auth/userinfo.email",@"https://www.googleapis.com/auth/userinfo.profile"];
    userEmail.text=@"";
    confirmEmail.text=@"";
    userPassword.text=@"";
    confirmPassword.text=@"";
    userFirstname.text=@"";
    userLastname.text=@"";
    userGender.text=@"";
    dateofBirth.text=@"";
    [[GIDSignIn sharedInstance] signIn];
}

1 个答案:

答案 0 :(得分:0)

你错过了这个:

  

[GIDSignIn sharedInstance] .allowsSignInWithWebView = YES;