Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion GoogleSignIn.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,20 @@ - (instancetype)initWithAppCheckToken:(nullable id<GACAppCheckTokenProtocol>)tok
return self;
}

- (void)getTokenWithCompletion:(nonnull void (^)(GACAppCheckToken * _Nullable,
- (void)getTokenWithCompletion:(nonnull void (^)(id<GACAppCheckTokenProtocol> _Nullable,
NSError * _Nullable))handler {
dispatch_async(dispatch_get_main_queue(), ^{
handler(self.token, self.error);
});
}

- (void)getLimitedUseTokenWithCompletion:(void (^)(id<GACAppCheckTokenProtocol> _Nullable,
NSError * _Nullable))handler {
dispatch_async(dispatch_get_main_queue(), ^{
handler(self.token, self.error);
});
}

@end

#endif // TARGET_OS_IOS && !TARGET_OS_MACCATALYST
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ - (void)prepareForAppCheckWithCompletion:(nullable GIDAppCheckPrepareCompletion)
return;
}

[self.appCheck getLimitedUseTokenWithCompletion:^(id<GACAppCheckTokenProtocol> _Nullable token,
NSError * _Nullable error) {
[self.appCheck limitedUseTokenWithCompletion:^(id<GACAppCheckTokenProtocol> _Nullable token,
NSError * _Nullable error) {
NSError * __block maybeError = error;
@synchronized (self) {
if (!token && !error) {
Expand Down Expand Up @@ -139,8 +139,8 @@ - (void)prepareForAppCheckWithCompletion:(nullable GIDAppCheckPrepareCompletion)

- (void)getLimitedUseTokenWithCompletion:(nullable GIDAppCheckTokenCompletion)completion {
dispatch_async(self.workerQueue, ^{
[self.appCheck getLimitedUseTokenWithCompletion:^(id<GACAppCheckTokenProtocol> _Nullable token,
NSError * _Nullable error) {
[self.appCheck limitedUseTokenWithCompletion:^(id<GACAppCheckTokenProtocol> _Nullable token,
NSError * _Nullable error) {
if (token) {
[self.userDefaults setBool:YES forKey:kGIDAppCheckPreparedKey];
}
Expand All @@ -162,7 +162,6 @@ + (NSString *)appAttestResourceName {
baseURL:kGIDAppAttestBaseURL
APIKey:nil
keychainAccessGroup:nil
limitedUse:YES
requestHooks:nil];
}

Expand Down