Ver código fonte

Revert "Fix Sample App build failure (#195)"

This reverts commit ab782283f8c7ac8266536b4c85b666c417697348.
Matthew Mathias 3 anos atrás
pai
commit
b3e3b6a77e

+ 2 - 2
Samples/ObjC/SignInSample/Source/AppDelegate.m

@@ -30,8 +30,8 @@
   // succeeds, we'll have a currentUser and the view will be able to draw its UI for the signed-in
   // state.  If the restore fails, currentUser will be nil and we'll draw the signed-out state
   // prompting the user to sign in.
-  [GIDSignIn.sharedInstance restorePreviousSignInWithCompletion:^(GIDGoogleUser *user,
-                                                                  NSError *error) {
+  [GIDSignIn.sharedInstance restorePreviousSignInWithCallback:^(GIDGoogleUser * _Nullable user,
+                                                                NSError * _Nullable error) {
     self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
     SignInViewController *masterViewController =
         [[SignInViewController alloc] initWithNibName:@"SignInViewController" bundle:nil];

+ 5 - 3
Samples/ObjC/SignInSample/Source/SignInViewController.m

@@ -259,7 +259,8 @@ static NSString * const kClientID =
 - (IBAction)signIn:(id)sender {
   [GIDSignIn.sharedInstance signInWithConfiguration:_configuration
                            presentingViewController:self
-                                         completion:^(GIDGoogleUser *user, NSError *error) {
+                                           callback:^(GIDGoogleUser * _Nullable user,
+                                                      NSError * _Nullable error) {
     if (error) {
       self->_signInAuthStatus.text =
           [NSString stringWithFormat:@"Status: Authentication error: %@", error];
@@ -277,7 +278,7 @@ static NSString * const kClientID =
 }
 
 - (IBAction)disconnect:(id)sender {
-  [GIDSignIn.sharedInstance disconnectWithCompletion:^(NSError *error) {
+  [GIDSignIn.sharedInstance disconnectWithCallback:^(NSError * _Nullable error) {
     if (error) {
       self->_signInAuthStatus.text = [NSString stringWithFormat:@"Status: Failed to disconnect: %@",
                                       error];
@@ -292,7 +293,8 @@ static NSString * const kClientID =
 - (IBAction)addScopes:(id)sender {
   [GIDSignIn.sharedInstance addScopes:@[ @"https://www.googleapis.com/auth/user.birthday.read" ]
              presentingViewController:self
-                           completion:^(GIDGoogleUser *user, NSError *error) {
+                             callback:^(GIDGoogleUser * _Nullable user,
+                                        NSError * _Nullable error) {
     if (error) {
       self->_signInAuthStatus.text = [NSString stringWithFormat:@"Status: Failed to add scopes: %@",
                                       error];