Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
6154bfb
WIP: Creates new targets AppCheckCoreProvider and RecaptchaEnterprise…
hiteshmaurya56 Apr 22, 2026
01170d0
moves
ncooke3 Apr 22, 2026
0f548c2
todos
ncooke3 Apr 27, 2026
eb4effd
fixes
ncooke3 Apr 27, 2026
bfb35e3
fix custom action name
ncooke3 Apr 27, 2026
157bd6d
umbrella header fixes
ncooke3 Apr 27, 2026
a3ee169
Add agents workflow guide
ncooke3 Apr 28, 2026
5ac8a38
fix(recaptcha): improve safety and fix compilation issues in Recaptch…
ncooke3 Apr 29, 2026
4c6523e
fix(recaptcha): improve safety and fix compilation issues in Recaptch…
ncooke3 Apr 29, 2026
95bc4c5
docs(agent-workflow): enforce highly scannable communication style an…
ncooke3 Apr 29, 2026
83e6937
test(recaptcha): add comprehensive unit tests for Recaptcha Enterpris…
ncooke3 Apr 29, 2026
71a5698
docs(agent-workflow): add Swift/Obj-C bridging best practices and TDD…
ncooke3 Apr 29, 2026
0d638f2
refactor: remove forwarding headers and update imports to public headers
ncooke3 Apr 30, 2026
99b009e
docs: update agents.md with workflow refinements and troubleshooting
ncooke3 Apr 30, 2026
1eecc52
docs: refine agents.md with explicit steps and line wrapping
ncooke3 Apr 30, 2026
e242784
add tests and expose target in existing lib
ncooke3 May 1, 2026
a5c0fd9
add temp files for discussion
ncooke3 May 1, 2026
1847721
feat(AppCheck): depend on RecaptchaEnterpriseProvider product from ap…
ncooke3 May 1, 2026
02dc75c
rework initializers, make var a let, remove dup name
ncooke3 May 5, 2026
df9a664
feat: add assertion for missing Recaptcha SDK and update TODOs
ncooke3 May 5, 2026
9d503b9
feat(recaptcha): improve assertion for missing SDK and refactor const…
ncooke3 May 5, 2026
eb4cb4a
add clarifying comment, future todo
ncooke3 May 5, 2026
5cbadaf
refactor: prefer swift shorthand binding
ncooke3 May 6, 2026
f457a41
refactor(recaptcha): apply idiomatic Swift renames to properties and …
ncooke3 May 6, 2026
652e9f2
fixes?
ncooke3 May 7, 2026
3770f8b
feat: Implement exponential backoff for reCAPTCHA Enterprise provider
ncooke3 May 7, 2026
0f1f47b
bump podspec and changelog
ncooke3 May 7, 2026
7719b2d
fixes, new error message
ncooke3 May 7, 2026
8f511c4
remove unneeded file
ncooke3 May 7, 2026
eb8379c
refactor: address code review feedback for RecaptchaEnterpriseProvider
ncooke3 May 11, 2026
8886e93
endpoint comment
ncooke3 May 11, 2026
dd72cd4
refactor: address RecaptchaEnterprise code review feedback
ncooke3 May 11, 2026
82989b9
fixes
ncooke3 May 11, 2026
21b66e1
remove
ncooke3 May 11, 2026
3242ef9
promise fixes
ncooke3 May 11, 2026
032ceef
docs
ncooke3 May 11, 2026
f89584d
moves
ncooke3 May 11, 2026
f54e763
Apply suggestions from code review
ncooke3 May 12, 2026
356fdc7
prefer non-shorthand
ncooke3 May 12, 2026
b5ff78d
back to shorthand
ncooke3 May 12, 2026
a280438
shorthand
ncooke3 May 12, 2026
62c864e
fixes
ncooke3 May 12, 2026
2f3eddf
Adds a comment explaining the safety of the force cast in `RecaptchaE…
ncooke3 May 12, 2026
16434e8
consolidate error messaging
ncooke3 May 12, 2026
66858f1
restore comment
ncooke3 May 12, 2026
03fb421
Test cleanup
ncooke3 May 12, 2026
f8d4016
fixes
ncooke3 May 12, 2026
42270e4
fixes
ncooke3 May 12, 2026
d6a65fb
cleanup
ncooke3 May 12, 2026
b812295
refactor: remove test-specific code path in RecaptchaEnterpriseCoreTo…
ncooke3 May 12, 2026
eab77db
refactor names
ncooke3 May 13, 2026
046b206
add availability checks that mirro RecaptchaEnterprise
ncooke3 May 21, 2026
d03149e
add availability attributes to test suites
ncooke3 May 21, 2026
4ddab29
remove unneeded dep
ncooke3 May 22, 2026
5db821c
remove unneeded target stuff
ncooke3 May 22, 2026
23bd67d
refactor: Rename RecaptchaEnterprise to Recaptcha
ncooke3 May 28, 2026
edc0083
fix(ci): install simulators for requested platforms, skipping macOS
ncooke3 May 28, 2026
26c88aa
review #3
ncooke3 May 28, 2026
aff324c
review 1
ncooke3 May 28, 2026
11b09cf
refactor(recaptcha): rename RecaptchaSDK to RecaptchaEnterpriseSDKLoader
ncooke3 May 28, 2026
065572a
refactor, move out exception handling
ncooke3 May 29, 2026
f67b54f
deletes
ncooke3 May 29, 2026
5e15847
finish moves
ncooke3 May 29, 2026
7a5798b
refactor: optimize recaptcha sdk loader and linking check
ncooke3 May 29, 2026
3e8e012
refactor(recaptcha): avoid NSNull in NSError userInfo during bridging
ncooke3 May 29, 2026
cc573d4
sitekey prop removal
ncooke3 May 29, 2026
1bdf7a9
chore: add clarifying comment for fetchClient
ncooke3 May 29, 2026
a27a56c
feat: add env var to toggle staging backend
ncooke3 Jun 8, 2026
e44765d
feat: replace isRecaptchaEnterpriseSDKLinked with isSupported
ncooke3 Jun 8, 2026
15fa108
Update AppCheckRecaptchaProvider/Sources/Public/AppCheckRecaptchaProv…
ncooke3 Jun 9, 2026
c115953
Update AppCheckRecaptchaProvider/Sources/Public/AppCheckRecaptchaProv…
ncooke3 Jun 9, 2026
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
9 changes: 9 additions & 0 deletions .github/workflows/app_check_core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ jobs:
run: ./scripts/setup_bundler.sh
- name: Select Xcode version
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
- name: Install simulators in case they are missing.
if: contains(matrix.target, 'macos') == false
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
with:
timeout_minutes: 15
max_attempts: 5
retry_wait_seconds: 120
continue_on_error: true
command: xcodebuild -downloadPlatform ${{ matrix.target }}
- name: Build and test
run: |
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb AppCheckCore.podspec \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/spm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
- name: Initialize xcodebuild
run: xcodebuild -list
- name: iOS Unit Tests
run: scripts/third_party/travis/retry.sh scripts/build.sh AppCheck ${{ matrix.platform }} spm
run: scripts/third_party/travis/retry.sh scripts/build.sh AppCheck-Package ${{ matrix.platform }} spm
7 changes: 6 additions & 1 deletion AppCheckCore.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'AppCheckCore'
s.version = '11.2.0'
s.version = '11.3.0'

@ncooke3 ncooke3 May 7, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: Swift was added (very likely non-breaking at this point). RecaptchaInterop and PromisesSwift deps were added (likely not breaking, esp. for SPM). Internal ObjC headers were made public (non-breaking).

s.summary = 'App Check Core SDK.'

s.description = <<-DESC
Expand Down Expand Up @@ -37,15 +37,20 @@ Pod::Spec.new do |s|
s.source_files = [
base_dir + 'Sources/**/*.[mh]',
]
s.ios.source_files = [
'AppCheckRecaptchaProvider/Sources/**/*.swift',
]
s.public_header_files = base_dir + 'Sources/Public/AppCheckCore/*.h'

s.ios.weak_framework = 'DeviceCheck'
s.osx.weak_framework = 'DeviceCheck'
s.tvos.weak_framework = 'DeviceCheck'

s.dependency 'PromisesObjC', '~> 2.4'
s.dependency 'PromisesSwift', '~> 2.4'
s.dependency 'GoogleUtilities/Environment', '~> 8.0'
s.dependency 'GoogleUtilities/UserDefaults', '~> 8.0'
s.ios.dependency 'RecaptchaInterop', '~> 101.0'

s.pod_target_xcconfig = {
'GCC_C_LANGUAGE_STANDARD' => 'c99',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
@class FBLPromise<Result>;
@class GACAppAttestAttestationResponse;
@class GACAppCheckToken;
@protocol GACAppCheckAPIServiceProtocol;
@protocol _GACAppCheckAPIServiceProtocol;

NS_ASSUME_NONNULL_BEGIN

Expand Down Expand Up @@ -55,11 +55,11 @@ NS_ASSUME_NONNULL_BEGIN

/// Default initializer.
///
/// @param APIService An instance implementing `GACAppCheckAPIServiceProtocol` to be used to send
/// @param APIService An instance implementing `_GACAppCheckAPIServiceProtocol` to be used to send
/// network requests to the App Check backend.
/// @param resourceName The name of the resource protected by App Check; for a Firebase App this is
/// "projects/{project_id}/apps/{app_id}".
- (instancetype)initWithAPIService:(id<GACAppCheckAPIServiceProtocol>)APIService
- (instancetype)initWithAPIService:(id<_GACAppCheckAPIServiceProtocol>)APIService
resourceName:(NSString *)resourceName NS_DESIGNATED_INITIALIZER;

- (instancetype)init NS_UNAVAILABLE;
Expand Down
35 changes: 18 additions & 17 deletions AppCheckCore/Sources/AppAttestProvider/API/GACAppAttestAPIService.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
#endif

#import "AppCheckCore/Sources/AppAttestProvider/API/GACAppAttestAttestationResponse.h"
#import "AppCheckCore/Sources/Core/APIService/GACAppCheckAPIService.h"
#import "AppCheckCore/Sources/Core/APIService/GACURLSessionDataResponse.h"
#import "AppCheckCore/Sources/Core/Errors/GACAppCheckErrorUtil.h"
#import "AppCheckCore/Sources/Public/AppCheckCore/_GACAppCheckAPIService.h"
#import "AppCheckCore/Sources/Public/AppCheckCore/_GACAppCheckErrorUtil.h"
#import "AppCheckCore/Sources/Public/AppCheckCore/_GACURLSessionDataResponse.h"

NS_ASSUME_NONNULL_BEGIN

Expand All @@ -46,15 +46,15 @@

@interface GACAppAttestAPIService ()

@property(nonatomic, readonly) id<GACAppCheckAPIServiceProtocol> APIService;
@property(nonatomic, readonly) id<_GACAppCheckAPIServiceProtocol> APIService;

@property(nonatomic, readonly) NSString *resourceName;

@end

@implementation GACAppAttestAPIService

- (instancetype)initWithAPIService:(id<GACAppCheckAPIServiceProtocol>)APIService
- (instancetype)initWithAPIService:(id<_GACAppCheckAPIServiceProtocol>)APIService
resourceName:(NSString *)resourceName {
self = [super init];
if (self) {
Expand All @@ -76,13 +76,13 @@ - (instancetype)initWithAPIService:(id<GACAppCheckAPIServiceProtocol>)APIService
challenge:challenge
assertion:assertion
limitedUse:limitedUse]
.then(^FBLPromise<GACURLSessionDataResponse *> *(NSData *HTTPBody) {
.then(^FBLPromise<_GACURLSessionDataResponse *> *(NSData *HTTPBody) {
return [self.APIService sendRequestWithURL:URL
HTTPMethod:kHTTPMethodPost
body:HTTPBody
additionalHeaders:@{kContentTypeKey : kJSONContentType}];
})
.then(^id _Nullable(GACURLSessionDataResponse *_Nullable response) {
.then(^id _Nullable(_GACURLSessionDataResponse *_Nullable response) {
return [self.APIService appCheckTokenWithAPIResponse:response];
});
}
Expand All @@ -99,14 +99,14 @@ - (instancetype)initWithAPIService:(id<GACAppCheckAPIServiceProtocol>)APIService
body:nil
additionalHeaders:nil];
}]
.then(^id _Nullable(GACURLSessionDataResponse *_Nullable response) {
.then(^id _Nullable(_GACURLSessionDataResponse *_Nullable response) {
return [self randomChallengeWithAPIResponse:response];
});
}

#pragma mark - Challenge response parsing

- (FBLPromise<NSData *> *)randomChallengeWithAPIResponse:(GACURLSessionDataResponse *)response {
- (FBLPromise<NSData *> *)randomChallengeWithAPIResponse:(_GACURLSessionDataResponse *)response {
return [FBLPromise onQueue:[self backgroundQueue]
do:^id _Nullable {
NSError *error;
Expand All @@ -122,7 +122,7 @@ - (instancetype)initWithAPIService:(id<GACAppCheckAPIServiceProtocol>)APIService
- (nullable NSData *)randomChallengeFromResponseBody:(NSData *)response error:(NSError **)outError {
if (response.length <= 0) {
GACAppCheckSetErrorToPointer(
[GACAppCheckErrorUtil errorWithFailureReason:@"Empty server response body."], outError);
[_GACAppCheckErrorUtil errorWithFailureReason:@"Empty server response body."], outError);
return nil;
}

Expand All @@ -132,14 +132,15 @@ - (nullable NSData *)randomChallengeFromResponseBody:(NSData *)response error:(N
error:&JSONError];

if (![responseDict isKindOfClass:[NSDictionary class]]) {
GACAppCheckSetErrorToPointer([GACAppCheckErrorUtil JSONSerializationError:JSONError], outError);
GACAppCheckSetErrorToPointer([_GACAppCheckErrorUtil JSONSerializationError:JSONError],
outError);
return nil;
}

NSString *challenge = responseDict[@"challenge"];
if (![challenge isKindOfClass:[NSString class]]) {
GACAppCheckSetErrorToPointer(
[GACAppCheckErrorUtil appCheckTokenResponseErrorWithMissingField:@"challenge"], outError);
[_GACAppCheckErrorUtil appCheckTokenResponseErrorWithMissingField:@"challenge"], outError);
return nil;
}

Expand All @@ -159,14 +160,14 @@ - (nullable NSData *)randomChallengeFromResponseBody:(NSData *)response error:(N
keyID:keyID
challenge:challenge
limitedUse:limitedUse]
.then(^FBLPromise<GACURLSessionDataResponse *> *(NSData *HTTPBody) {
.then(^FBLPromise<_GACURLSessionDataResponse *> *(NSData *HTTPBody) {
return [self.APIService sendRequestWithURL:URL
HTTPMethod:kHTTPMethodPost
body:HTTPBody
additionalHeaders:@{kContentTypeKey : kJSONContentType}];
})
.thenOn(
[self backgroundQueue], ^id _Nullable(GACURLSessionDataResponse *_Nullable URLResponse) {
[self backgroundQueue], ^id _Nullable(_GACURLSessionDataResponse *_Nullable URLResponse) {
NSError *error;

__auto_type response =
Expand All @@ -186,7 +187,7 @@ - (nullable NSData *)randomChallengeFromResponseBody:(NSData *)response error:(N
limitedUse:(BOOL)limitedUse {
if (artifact.length <= 0 || challenge.length <= 0 || assertion.length <= 0) {
FBLPromise *rejectedPromise = [FBLPromise pendingPromise];
[rejectedPromise reject:[GACAppCheckErrorUtil
[rejectedPromise reject:[_GACAppCheckErrorUtil
errorWithFailureReason:@"Missing or empty request parameter."]];
return rejectedPromise;
}
Expand All @@ -210,7 +211,7 @@ - (nullable NSData *)randomChallengeFromResponseBody:(NSData *)response error:(N
limitedUse:(BOOL)limitedUse {
if (attestation.length <= 0 || keyID.length <= 0 || challenge.length <= 0) {
FBLPromise *rejectedPromise = [FBLPromise pendingPromise];
[rejectedPromise reject:[GACAppCheckErrorUtil
[rejectedPromise reject:[_GACAppCheckErrorUtil
errorWithFailureReason:@"Missing or empty request parameter."]];
return rejectedPromise;
}
Expand All @@ -237,7 +238,7 @@ - (nullable NSData *)randomChallengeFromResponseBody:(NSData *)response error:(N
if (payloadJSON) {
[HTTPBodyPromise fulfill:payloadJSON];
} else {
[HTTPBodyPromise reject:[GACAppCheckErrorUtil JSONSerializationError:encodingError]];
[HTTPBodyPromise reject:[_GACAppCheckErrorUtil JSONSerializationError:encodingError]];
}
return HTTPBodyPromise;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#import "AppCheckCore/Sources/AppAttestProvider/API/GACAppAttestAttestationResponse.h"

#import "AppCheckCore/Sources/Core/APIService/GACAppCheckToken+APIResponse.h"
#import "AppCheckCore/Sources/Core/Errors/GACAppCheckErrorUtil.h"
#import "AppCheckCore/Sources/Public/AppCheckCore/_GACAppCheckErrorUtil.h"

static NSString *const kResponseFieldAppCheckTokenDict = @"appCheckToken";
static NSString *const kResponseFieldArtifact = @"artifact";
Expand All @@ -38,7 +38,7 @@ - (nullable instancetype)initWithResponseData:(NSData *)response
error:(NSError **)outError {
if (response.length <= 0) {
GACAppCheckSetErrorToPointer(
[GACAppCheckErrorUtil
[_GACAppCheckErrorUtil
errorWithFailureReason:
@"Failed to parse the initial handshake response. Empty server response body."],
outError);
Expand All @@ -51,14 +51,15 @@ - (nullable instancetype)initWithResponseData:(NSData *)response
error:&JSONError];

if (![responseDict isKindOfClass:[NSDictionary class]]) {
GACAppCheckSetErrorToPointer([GACAppCheckErrorUtil JSONSerializationError:JSONError], outError);
GACAppCheckSetErrorToPointer([_GACAppCheckErrorUtil JSONSerializationError:JSONError],
outError);
return nil;
}

NSString *artifactBase64String = responseDict[kResponseFieldArtifact];
if (![artifactBase64String isKindOfClass:[NSString class]]) {
GACAppCheckSetErrorToPointer(
[GACAppCheckErrorUtil
[_GACAppCheckErrorUtil
appAttestAttestationResponseErrorWithMissingField:kResponseFieldArtifact],
outError);
return nil;
Expand All @@ -67,7 +68,7 @@ - (nullable instancetype)initWithResponseData:(NSData *)response
options:0];
if (artifactData == nil) {
GACAppCheckSetErrorToPointer(
[GACAppCheckErrorUtil
[_GACAppCheckErrorUtil
appAttestAttestationResponseErrorWithMissingField:kResponseFieldArtifact],
outError);
return nil;
Expand All @@ -76,7 +77,7 @@ - (nullable instancetype)initWithResponseData:(NSData *)response
NSDictionary *appCheckTokenDict = responseDict[kResponseFieldAppCheckTokenDict];
if (![appCheckTokenDict isKindOfClass:[NSDictionary class]]) {
GACAppCheckSetErrorToPointer(
[GACAppCheckErrorUtil
[_GACAppCheckErrorUtil
appAttestAttestationResponseErrorWithMissingField:kResponseFieldAppCheckTokenDict],
outError);
return nil;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#import "AppCheckCore/Sources/AppAttestProvider/Errors/GACAppAttestRejectionError.h"

#import "AppCheckCore/Sources/Core/Errors/GACAppCheckErrorUtil.h"
#import "AppCheckCore/Sources/Public/AppCheckCore/_GACAppCheckErrorUtil.h"

@implementation GACAppAttestRejectionError

Expand Down
35 changes: 18 additions & 17 deletions AppCheckCore/Sources/AppAttestProvider/GACAppAttestProvider.m
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@
#import "AppCheckCore/Sources/AppAttestProvider/GACAppAttestService.h"
#import "AppCheckCore/Sources/AppAttestProvider/Storage/GACAppAttestArtifactStorage.h"
#import "AppCheckCore/Sources/AppAttestProvider/Storage/GACAppAttestKeyIDStorage.h"
#import "AppCheckCore/Sources/Core/APIService/GACAppCheckAPIService.h"
#import "AppCheckCore/Sources/Core/Backoff/GACAppCheckBackoffWrapper.h"
#import "AppCheckCore/Sources/Core/GACAppCheckLogger+Internal.h"
#import "AppCheckCore/Sources/Public/AppCheckCore/GACAppCheckToken.h"
#import "AppCheckCore/Sources/Public/AppCheckCore/_GACAppCheckAPIService.h"
#import "AppCheckCore/Sources/Public/AppCheckCore/_GACAppCheckBackoffWrapper.h"

#import "AppCheckCore/Sources/Core/Utils/GACAppCheckCryptoUtils.h"

#import "AppCheckCore/Sources/AppAttestProvider/Errors/GACAppAttestRejectionError.h"
#import "AppCheckCore/Sources/Core/Errors/GACAppCheckErrorUtil.h"
#import "AppCheckCore/Sources/Core/Errors/GACAppCheckHTTPError.h"
#import "AppCheckCore/Sources/Public/AppCheckCore/GACAppCheckErrors.h"
#import "AppCheckCore/Sources/Public/AppCheckCore/_GACAppCheckErrorUtil.h"

NS_ASSUME_NONNULL_BEGIN

Expand Down Expand Up @@ -108,7 +108,7 @@ @interface GACAppAttestProvider ()
@property(nonatomic, readonly) id<GACAppAttestService> appAttestService;
@property(nonatomic, readonly) id<GACAppAttestKeyIDStorageProtocol> keyIDStorage;
@property(nonatomic, readonly) id<GACAppAttestArtifactStorageProtocol> artifactStorage;
@property(nonatomic, readonly) id<GACAppCheckBackoffWrapperProtocol> backoffWrapper;
@property(nonatomic, readonly) id<_GACAppCheckBackoffWrapperProtocol> backoffWrapper;

@property(nonatomic, nullable) FBLPromise<GACAppCheckToken *> *ongoingGetTokenOperation;
@property(nonatomic, assign) BOOL ongoingGetTokenOperationLimitedUse;
Expand All @@ -123,7 +123,7 @@ - (instancetype)initWithAppAttestService:(id<GACAppAttestService>)appAttestServi
APIService:(id<GACAppAttestAPIServiceProtocol>)APIService
keyIDStorage:(id<GACAppAttestKeyIDStorageProtocol>)keyIDStorage
artifactStorage:(id<GACAppAttestArtifactStorageProtocol>)artifactStorage
backoffWrapper:(id<GACAppCheckBackoffWrapperProtocol>)backoffWrapper {
backoffWrapper:(id<_GACAppCheckBackoffWrapperProtocol>)backoffWrapper {
self = [super init];
if (self) {
_appAttestService = appAttestService;
Expand Down Expand Up @@ -151,11 +151,11 @@ - (instancetype)initWithServiceName:(NSString *)serviceName
GACAppAttestKeyIDStorage *keyIDStorage =
[[GACAppAttestKeyIDStorage alloc] initWithKeySuffix:storageKeySuffix];

GACAppCheckAPIService *APIService =
[[GACAppCheckAPIService alloc] initWithURLSession:URLSession
baseURL:baseURL
APIKey:APIKey
requestHooks:requestHooks];
_GACAppCheckAPIService *APIService =
[[_GACAppCheckAPIService alloc] initWithURLSession:URLSession
baseURL:baseURL
APIKey:APIKey
requestHooks:requestHooks];

GACAppAttestAPIService *appAttestAPIService =
[[GACAppAttestAPIService alloc] initWithAPIService:APIService resourceName:resourceName];
Expand All @@ -164,7 +164,7 @@ - (instancetype)initWithServiceName:(NSString *)serviceName
[[GACAppAttestArtifactStorage alloc] initWithKeySuffix:storageKeySuffix
accessGroup:accessGroup];

GACAppCheckBackoffWrapper *backoffWrapper = [[GACAppCheckBackoffWrapper alloc] init];
_GACAppCheckBackoffWrapper *backoffWrapper = [[_GACAppCheckBackoffWrapper alloc] init];

return [self initWithAppAttestService:DCAppAttestService.sharedService
APIService:appAttestAPIService
Expand Down Expand Up @@ -341,9 +341,10 @@ - (void)getTokenWithLimitedUse:(BOOL)limitedUse
completionHandler:handler];
}]
.recoverOn(self.queue, ^id(NSError *error) {
return [GACAppCheckErrorUtil appAttestAttestKeyFailedWithError:error
keyId:keyID
clientDataHash:challengeHash];
return
[_GACAppCheckErrorUtil appAttestAttestKeyFailedWithError:error
keyId:keyID
clientDataHash:challengeHash];
});
})
.thenOn(self.queue, ^FBLPromise<GACAppAttestKeyAttestationResult *> *(NSData *attestation) {
Expand Down Expand Up @@ -488,7 +489,7 @@ - (void)getTokenWithLimitedUse:(BOOL)limitedUse
completionHandler:handler];
}]
.recoverOn(self.queue, ^id(NSError *appAttestError) {
NSError *error = [GACAppCheckErrorUtil
NSError *error = [_GACAppCheckErrorUtil
appAttestGenerateAssertionFailedWithError:appAttestError
keyId:keyID
clientDataHash:statementHash];
Expand Down Expand Up @@ -570,7 +571,7 @@ - (void)getTokenWithLimitedUse:(BOOL)limitedUse
if (self.appAttestService.isSupported) {
return [FBLPromise resolvedWith:[NSNull null]];
} else {
NSError *error = [GACAppCheckErrorUtil unsupportedAttestationProvider:@"AppAttestProvider"];
NSError *error = [_GACAppCheckErrorUtil unsupportedAttestationProvider:@"AppAttestProvider"];
FBLPromise *rejectedPromise = [FBLPromise pendingPromise];
[rejectedPromise reject:error];
return rejectedPromise;
Expand All @@ -596,7 +597,7 @@ - (void)getTokenWithLimitedUse:(BOOL)limitedUse
}]
.recoverOn(self.queue,
^id(NSError *error) {
return [GACAppCheckErrorUtil appAttestGenerateKeyFailedWithError:error];
return [_GACAppCheckErrorUtil appAttestGenerateKeyFailedWithError:error];
})
.thenOn(self.queue, ^FBLPromise<NSString *> *(NSString *keyID) {
return [self.keyIDStorage setAppAttestKeyID:keyID];
Expand Down
Loading
Loading