diff --git a/GoogleSignIn.podspec b/GoogleSignIn.podspec index 8dc255a9..8c7d93b7 100644 --- a/GoogleSignIn.podspec +++ b/GoogleSignIn.podspec @@ -33,7 +33,7 @@ The Google Sign-In SDK allows users to sign in with their Google account from th ] s.ios.framework = 'UIKit' s.osx.framework = 'AppKit' - s.dependency 'AppCheckCore', '~> 0.1.0-alpha' + s.dependency 'AppCheckCore', '~> 0.1.0-alpha.4' s.dependency 'AppAuth', '~> 1.6' s.dependency 'GTMAppAuth', '~> 4.0' s.dependency 'GTMSessionFetcher/Core', '>= 1.1', '< 4.0' diff --git a/GoogleSignIn/Sources/GIDAppCheck/Implementations/Fake/GIDAppCheckProviderFake.m b/GoogleSignIn/Sources/GIDAppCheck/Implementations/Fake/GIDAppCheckProviderFake.m index 8dc61095..0a3dfb1a 100644 --- a/GoogleSignIn/Sources/GIDAppCheck/Implementations/Fake/GIDAppCheckProviderFake.m +++ b/GoogleSignIn/Sources/GIDAppCheck/Implementations/Fake/GIDAppCheckProviderFake.m @@ -38,13 +38,20 @@ - (instancetype)initWithAppCheckToken:(nullable id)tok return self; } -- (void)getTokenWithCompletion:(nonnull void (^)(GACAppCheckToken * _Nullable, +- (void)getTokenWithCompletion:(nonnull void (^)(id _Nullable, NSError * _Nullable))handler { dispatch_async(dispatch_get_main_queue(), ^{ handler(self.token, self.error); }); } +- (void)getLimitedUseTokenWithCompletion:(void (^)(id _Nullable, + NSError * _Nullable))handler { + dispatch_async(dispatch_get_main_queue(), ^{ + handler(self.token, self.error); + }); +} + @end #endif // TARGET_OS_IOS && !TARGET_OS_MACCATALYST diff --git a/GoogleSignIn/Sources/GIDAppCheck/Implementations/GIDAppCheck.m b/GoogleSignIn/Sources/GIDAppCheck/Implementations/GIDAppCheck.m index 3ef6e05b..97a74241 100644 --- a/GoogleSignIn/Sources/GIDAppCheck/Implementations/GIDAppCheck.m +++ b/GoogleSignIn/Sources/GIDAppCheck/Implementations/GIDAppCheck.m @@ -110,8 +110,8 @@ - (void)prepareForAppCheckWithCompletion:(nullable GIDAppCheckPrepareCompletion) return; } - [self.appCheck getLimitedUseTokenWithCompletion:^(id _Nullable token, - NSError * _Nullable error) { + [self.appCheck limitedUseTokenWithCompletion:^(id _Nullable token, + NSError * _Nullable error) { NSError * __block maybeError = error; @synchronized (self) { if (!token && !error) { @@ -139,8 +139,8 @@ - (void)prepareForAppCheckWithCompletion:(nullable GIDAppCheckPrepareCompletion) - (void)getLimitedUseTokenWithCompletion:(nullable GIDAppCheckTokenCompletion)completion { dispatch_async(self.workerQueue, ^{ - [self.appCheck getLimitedUseTokenWithCompletion:^(id _Nullable token, - NSError * _Nullable error) { + [self.appCheck limitedUseTokenWithCompletion:^(id _Nullable token, + NSError * _Nullable error) { if (token) { [self.userDefaults setBool:YES forKey:kGIDAppCheckPreparedKey]; } @@ -162,7 +162,6 @@ + (NSString *)appAttestResourceName { baseURL:kGIDAppAttestBaseURL APIKey:nil keychainAccessGroup:nil - limitedUse:YES requestHooks:nil]; }