Kaynağa Gözat

Replace GIDSignInCallback (#179)

Replace GIDSignInCallback with block
void (^)(GIDUserAuth *_Nullable userAuth, NSError *_Nullable error)
pinlu 3 yıl önce
ebeveyn
işleme
ada320372b
1 değiştirilmiş dosya ile 3 ekleme ve 3 silme
  1. 3 3
      GoogleSignIn/Sources/GIDSignIn.m

+ 3 - 3
GoogleSignIn/Sources/GIDSignIn.m

@@ -191,12 +191,12 @@ static const NSTimeInterval kMinimumRestoredAccessTokenTimeToExpire = 600.0;
 
 
 - (void)restorePreviousSignInWithCompletion:(nullable void (^)(GIDGoogleUser *_Nullable user,
 - (void)restorePreviousSignInWithCompletion:(nullable void (^)(GIDGoogleUser *_Nullable user,
                                                                NSError *_Nullable error))completion {
                                                                NSError *_Nullable error))completion {
-  [self signInWithOptions:[GIDSignInInternalOptions silentOptionsWithCallback:
+  [self signInWithOptions:[GIDSignInInternalOptions silentOptionsWithCompletion:
                            ^(GIDUserAuth *userAuth, NSError *error) {
                            ^(GIDUserAuth *userAuth, NSError *error) {
     if (userAuth) {
     if (userAuth) {
-      callback(userAuth.user, nil);
+      completion(userAuth.user, nil);
     } else {
     } else {
-      callback(nil, error);
+      completion(nil, error);
     }
     }
   }]];
   }]];
 }
 }