From 5889dd55ebd425b742bc81703a7c2ca4cb667275 Mon Sep 17 00:00:00 2001 From: Andrew Heard Date: Fri, 27 Oct 2023 17:24:53 -0400 Subject: [PATCH] Fix warning due to NSUInteger length on watchOS (#36) --- .github/workflows/app_check_core.yml | 2 +- AppCheckCore/Sources/Core/Errors/GACAppCheckErrorUtil.m | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/app_check_core.yml b/.github/workflows/app_check_core.yml index 58c518a..f3a377b 100644 --- a/.github/workflows/app_check_core.yml +++ b/.github/workflows/app_check_core.yml @@ -15,7 +15,7 @@ jobs: runs-on: macos-latest strategy: matrix: - target: [ios, tvos, macos] + target: [ios, tvos, macos, watchos] steps: - uses: actions/checkout@v3 - uses: ruby/setup-ruby@v1 diff --git a/AppCheckCore/Sources/Core/Errors/GACAppCheckErrorUtil.m b/AppCheckCore/Sources/Core/Errors/GACAppCheckErrorUtil.m index f62d989..a548a46 100644 --- a/AppCheckCore/Sources/Core/Errors/GACAppCheckErrorUtil.m +++ b/AppCheckCore/Sources/Core/Errors/GACAppCheckErrorUtil.m @@ -136,7 +136,7 @@ + (NSError *)appAttestAttestKeyFailedWithError:(NSError *)error [NSString stringWithFormat:@"Failed to attest the validity of the generated cryptographic " @"key (`attestKey:clientDataHash:completionHandler:`); " @"keyId.length = %lu, clientDataHash.length = %lu", - keyId.length, clientDataHash.length]; + (unsigned long)keyId.length, (unsigned long)clientDataHash.length]; // TODO(#31): Add a new error code for this case (e.g., GACAppCheckAppAttestAttestKeyFailed). return [self appCheckErrorWithCode:GACAppCheckErrorCodeUnknown failureReason:failureReason @@ -150,7 +150,7 @@ + (NSError *)appAttestGenerateAssertionFailedWithError:(NSError *)error stringWithFormat:@"Failed to create a block of data that demonstrates the legitimacy of the " @"app instance (`generateAssertion:clientDataHash:completionHandler:`); " @"keyId.length = %lu, clientDataHash.length = %lu.", - keyId.length, clientDataHash.length]; + (unsigned long)keyId.length, (unsigned long)clientDataHash.length]; // TODO(#31): Add error code for this case (e.g., GACAppCheckAppAttestGenerateAssertionFailed). return [self appCheckErrorWithCode:GACAppCheckErrorCodeUnknown failureReason:failureReason