Przeglądaj źródła

Depend on AppCheckCore instead of FirebaseAppCheck (#330)

mdmathias 2 lat temu
rodzic
commit
f4a327fef1

+ 1 - 0
.github/workflows/unit_tests.yml

@@ -32,6 +32,7 @@ jobs:
     - name: Lint podspec using local source
       run: |
         pod lib lint ${{ matrix.podspec }} --verbose \
+           --sources=https://github.com/firebase/SpecsDev.git,https://cdn.cocoapods.org/ \
            ${{ matrix.includePodspecFlag }} ${{ matrix.flag }}
 
   spm-build-test:

+ 1 - 1
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 'FirebaseAppCheck', '~> 10.0'
+  s.dependency 'AppCheckCore', '~> 0.1.0-alpha'
   s.dependency 'AppAuth', '~> 1.6'
   s.dependency 'GTMAppAuth', '~> 4.0'
   s.dependency 'GTMSessionFetcher/Core', '>= 1.1', '< 4.0'

+ 0 - 59
GoogleSignIn/Sources/GIDAppCheck/API/GIDAppCheckProvider.h

@@ -1,59 +0,0 @@
-/*
- * Copyright 2023 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#import <Foundation/Foundation.h>
-
-NS_ASSUME_NONNULL_BEGIN
-
-#if TARGET_OS_IOS && !TARGET_OS_MACCATALYST
-@protocol GIDAppCheckTokenFetcher;
-@class FIRAppCheckToken;
-
-/// Interface providing the API for both pre-warming `GIDSignIn` to use Firebase App Check and
-/// fetching the App Check token.
-NS_AVAILABLE_IOS(14)
-@protocol GIDAppCheckProvider <NSObject>
-
-/// Creates the instance of this App Check wrapper class.
-///
-/// @param tokenFetcher The instance performing the Firebase App Check token requests. If `provider`
-///     is nil, then we default to `FIRAppCheck`.
-/// @param userDefaults The instance of `NSUserDefaults` that `GIDAppCheck` will use to store its
-///     preparation status. If nil, `GIDAppCheck` will use `-[NSUserDefaults standardUserDefaults]`.
-- (instancetype)initWithAppCheckTokenFetcher:(nullable id<GIDAppCheckTokenFetcher>)tokenFetcher
-                                userDefaults:(nullable NSUserDefaults *)userDefaults;
-
-/// Prewarms the library for App Check by asking Firebase App Check to generate the App Attest key
-/// id and perform the initial attestation process (if needed).
-///
-/// @param completion A `nullable` callback with a `nullable` `NSError` if preparation fails.
-- (void)prepareForAppCheckWithCompletion:(nullable void (^)(NSError * _Nullable error))completion;
-
-/// Fetches the limited use Firebase token.
-///
-/// @param completion A `nullable` callback with the `FIRAppCheckToken` if present, or an `NSError`
-///     otherwise.
-- (void)getLimitedUseTokenWithCompletion:(nullable void (^)(FIRAppCheckToken * _Nullable token,
-                                                            NSError * _Nullable error))completion;
-
-/// Whether or not the App Attest key ID created and the attestation object has been fetched.
-- (BOOL)isPrepared;
-
-@end
-
-#endif // TARGET_OS_IOS && !TARGET_OS_MACCATALYST
-
-NS_ASSUME_NONNULL_END

+ 10 - 11
GoogleSignIn/Sources/GIDAppCheckTokenFetcher/Implementations/GIDAppCheckTokenFetcherFake.h → GoogleSignIn/Sources/GIDAppCheck/Implementations/Fake/GIDAppCheckProviderFake.h

@@ -16,26 +16,25 @@
 #import <Foundation/Foundation.h>
 
 #if TARGET_OS_IOS && !TARGET_OS_MACCATALYST
-#import "GoogleSignIn/Sources/GIDAppCheckTokenFetcher/API/GIDAppCheckTokenFetcher.h"
+#import <AppCheckCore/GACAppCheckProvider.h>
 
-@class FIRAppCheckToken;
+@class GACAppCheckToken;
 
 NS_ASSUME_NONNULL_BEGIN
 
-extern NSUInteger const kGIDAppCheckTokenFetcherTokenError;
+extern NSUInteger const kGIDAppCheckProviderFakeError;
 
 NS_CLASS_AVAILABLE_IOS(14)
-@interface GIDAppCheckTokenFetcherFake : NSObject <GIDAppCheckTokenFetcher>
+@interface GIDAppCheckProviderFake : NSObject <GACAppCheckProvider>
 
-/// Creates an instance with the provided app check token and error.
+/// Creates an instance conforming to `GACAppCheckProvider` with the provided app check token and
+/// error.
 ///
-/// This protocol is mainly used for testing purposes so that the token fetching from Firebase App
-/// Check can be faked.
-/// @param token The `FIRAppCheckToken` to pass into the completion called from
-/// `limitedUseTokenWithCompletion:`.
+/// @param token The `GACAppCheckToken` instance to pass into the completion called from
+///     `getTokenWithCompletion:`.
 /// @param error The `NSError` to pass into the completion called from
-/// `limitedUseTokenWithCompletion:`.
-- (instancetype)initWithAppCheckToken:(nullable FIRAppCheckToken *)token
+///     `getTokenWithCompletion:`.
+- (instancetype)initWithAppCheckToken:(nullable GACAppCheckToken *)token
                                 error:(nullable NSError *)error;
 
 @end

+ 10 - 11
GoogleSignIn/Sources/GIDAppCheckTokenFetcher/Implementations/GIDAppCheckTokenFetcherFake.m → GoogleSignIn/Sources/GIDAppCheck/Implementations/Fake/GIDAppCheckProviderFake.m

@@ -12,25 +12,24 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#import <TargetConditionals.h>
+#import "GoogleSignIn/Sources/GIDAppCheck/Implementations/Fake/GIDAppCheckProviderFake.h"
 
 #if TARGET_OS_IOS && !TARGET_OS_MACCATALYST
-#import "GoogleSignIn/Sources/GIDAppCheckTokenFetcher/Implementations/GIDAppCheckTokenFetcherFake.h"
 
-@import FirebaseAppCheck;
+#import <AppCheckCore/GACAppCheckToken.h>
 
-NSUInteger const kGIDAppCheckTokenFetcherTokenError = 1;
+NSUInteger const kGIDAppCheckProviderFakeError = 1;
 
-@interface GIDAppCheckTokenFetcherFake ()
+@interface GIDAppCheckProviderFake ()
 
-@property(nonatomic, strong, nullable) FIRAppCheckToken *token;
+@property(nonatomic, strong, nullable) id<GACAppCheckTokenProtocol> token;
 @property(nonatomic, strong, nullable) NSError *error;
 
 @end
 
-@implementation GIDAppCheckTokenFetcherFake
+@implementation GIDAppCheckProviderFake
 
-- (instancetype)initWithAppCheckToken:(nullable FIRAppCheckToken *)token
+- (instancetype)initWithAppCheckToken:(nullable id<GACAppCheckTokenProtocol>)token
                                 error:(nullable NSError *)error {
   if (self = [super init]) {
     _token = token;
@@ -39,10 +38,10 @@ NSUInteger const kGIDAppCheckTokenFetcherTokenError = 1;
   return self;
 }
 
-- (void)limitedUseTokenWithCompletion:(void (^)(FIRAppCheckToken * _Nullable,
-                                                NSError * _Nullable))completion {
+- (void)getTokenWithCompletion:(nonnull void (^)(GACAppCheckToken * _Nullable,
+                                                 NSError * _Nullable))handler {
   dispatch_async(dispatch_get_main_queue(), ^{
-    completion(self.token, self.error);
+    handler(self.token, self.error);
   });
 }
 

+ 37 - 4
GoogleSignIn/Sources/GIDAppCheck/Implementations/GIDAppCheck.h

@@ -19,17 +19,50 @@
 #if TARGET_OS_IOS && !TARGET_OS_MACCATALYST
 
 #import <Foundation/Foundation.h>
-#import "GoogleSignIn/Sources/GIDAppCheck/API/GIDAppCheckProvider.h"
 
 NS_ASSUME_NONNULL_BEGIN
 
-@class FIRAppCheckToken;
+@protocol GACAppCheckProvider;
+@protocol GACAppCheckTokenProtocol;
+
 extern NSString *const kGIDAppCheckPreparedKey;
 
 NS_CLASS_AVAILABLE_IOS(14)
-@interface GIDAppCheck : NSObject <GIDAppCheckProvider>
+@interface GIDAppCheck : NSObject
+
+/// Creates the instance of this App Check wrapper class.
+///
+/// The instance is created using `+[NSUserDefaults standardUserDefaults]` and the standard App
+/// Check provider.
+///
+/// @SeeAlso The App Check provider is constructed with `+[GIDAppCheck standardAppCheckProvider]`.
+- (instancetype)init;
+
+/// Creates the instance of this App Check wrapper class.
+///
+/// @param appCheckProvider The instance performing the Firebase App Check token requests. If `nil`,
+///     then a default implementation will be used.
+/// @param userDefaults The instance of `NSUserDefaults` that `GIDAppCheck` will use to store its
+///     preparation status. If nil, `GIDAppCheck` will use `-[NSUserDefaults standardUserDefaults]`.
+- (instancetype)initWithAppCheckProvider:(id<GACAppCheckProvider>)appCheckProvider
+                            userDefaults:(NSUserDefaults *)userDefaults NS_DESIGNATED_INITIALIZER;
+
+/// Prewarms the library for App Check by asking Firebase App Check to generate the App Attest key
+/// id and perform the initial attestation process (if needed).
+///
+/// @param completion A `nullable` callback with a `nullable` `NSError` if preparation fails.
+- (void)prepareForAppCheckWithCompletion:(nullable void (^)(NSError * _Nullable error))completion;
+
+/// Fetches the limited use Firebase token.
+///
+/// @param completion A `nullable` callback with the `FIRAppCheckToken` if present, or an `NSError`
+///     otherwise.
+- (void)getLimitedUseTokenWithCompletion:
+    (nullable void (^)(id<GACAppCheckTokenProtocol> _Nullable token,
+                       NSError * _Nullable error))completion;
 
-- (instancetype)init NS_UNAVAILABLE;
+/// Whether or not the App Attest key ID created and the attestation object has been fetched.
+- (BOOL)isPrepared;
 
 @end
 

+ 51 - 15
GoogleSignIn/Sources/GIDAppCheck/Implementations/GIDAppCheck.m

@@ -15,23 +15,32 @@
  */
 
 #import "GoogleSignIn/Sources/GIDAppCheck/Implementations/GIDAppCheck.h"
-#import "GoogleSignIn/Sources/GIDAppCheck/API/GIDAppCheckProvider.h"
-#import "GoogleSignIn/Sources/GIDAppCheckTokenFetcher/Implementations/FIRAppCheck+GIDAppCheckTokenFetcher.h"
-#import "GoogleSignIn/Sources/Public/GoogleSignIn/GIDAppCheckError.h"
-
-@import FirebaseAppCheck;
 
 #if TARGET_OS_IOS && !TARGET_OS_MACCATALYST
 
+#import <AppCheckCore/GACAppCheck.h>
+#import <AppCheckCore/GACAppCheckSettings.h>
+#import <AppCheckCore/GACAppCheckToken.h>
+#import <AppCheckCore/GACAppAttestProvider.h>
+
+#import "GoogleSignIn/Sources/GIDAppCheck/Implementations/GIDAppCheck.h"
+#import "GoogleSignIn/Sources/Public/GoogleSignIn/GIDAppCheckError.h"
+#import "GoogleSignIn/Sources/Public/GoogleSignIn/GIDSignIn.h"
+
 NSErrorDomain const kGIDAppCheckErrorDomain = @"com.google.GIDAppCheck";
 NSString *const kGIDAppCheckPreparedKey = @"com.google.GIDAppCheckPreparedKey";
+static NSString *const kGIDConfigClientIDKey = @"GIDClientID";
+static NSString *const kGIDAppAttestServiceName = @"GoogleSignIn-iOS";
+static NSString *const kGIDAppAttestResourceNameFormat = @"oauthClients/%@";
+static NSString *const kGIDAppAttestBaseURL = @"https://firebaseappcheck.googleapis.com/v1beta";
 
 typedef void (^GIDAppCheckPrepareCompletion)(NSError * _Nullable);
-typedef void (^GIDAppCheckTokenCompletion)(FIRAppCheckToken * _Nullable, NSError * _Nullable);
+typedef void (^GIDAppCheckTokenCompletion)(id<GACAppCheckTokenProtocol> _Nullable,
+                                           NSError * _Nullable);
 
 @interface GIDAppCheck ()
 
-@property(nonatomic, strong) id<GIDAppCheckTokenFetcher> tokenFetcher;
+@property(nonatomic, strong) GACAppCheck *appCheck;
 @property(nonatomic, strong) dispatch_queue_t workerQueue;
 @property(nonatomic, strong) NSUserDefaults *userDefaults;
 @property(atomic, strong) NSMutableArray<GIDAppCheckPrepareCompletion> *prepareCompletions;
@@ -41,11 +50,23 @@ typedef void (^GIDAppCheckTokenCompletion)(FIRAppCheckToken * _Nullable, NSError
 
 @implementation GIDAppCheck
 
-- (instancetype)initWithAppCheckTokenFetcher:(nullable id<GIDAppCheckTokenFetcher>)tokenFetcher
-                                userDefaults:(nullable NSUserDefaults *)userDefaults {
+- (instancetype)init {
+  id<GACAppCheckProvider> provider = [GIDAppCheck standardAppCheckProvider];
+  NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
+  return [self initWithAppCheckProvider:provider userDefaults:userDefaults];
+}
+
+- (instancetype)initWithAppCheckProvider:(id<GACAppCheckProvider>)appCheckProvider
+                            userDefaults:(NSUserDefaults *)userDefaults {
   if (self = [super init]) {
-    _tokenFetcher = tokenFetcher ?: [FIRAppCheck appCheck];
-    _userDefaults = userDefaults ?: [NSUserDefaults standardUserDefaults];
+    _appCheck = [[GACAppCheck alloc] initWithServiceName:kGIDConfigClientIDKey
+                                            resourceName:[GIDAppCheck appAttestResourceName]
+                                        appCheckProvider:appCheckProvider
+                                                settings:[[GACAppCheckSettings alloc] init]
+                                           tokenDelegate:nil
+                                     keychainAccessGroup:nil];
+
+    _userDefaults = userDefaults;
     _workerQueue = dispatch_queue_create("com.google.googlesignin.GIDAppCheckWorkerQueue", nil);
     _prepareCompletions = [NSMutableArray array];
     _preparing = NO;
@@ -89,8 +110,8 @@ typedef void (^GIDAppCheckTokenCompletion)(FIRAppCheckToken * _Nullable, NSError
       return;
     }
 
-    [self.tokenFetcher limitedUseTokenWithCompletion:^(FIRAppCheckToken * _Nullable token,
-                                                       NSError * _Nullable error) {
+    [self.appCheck getLimitedUseTokenWithCompletion:^(id<GACAppCheckTokenProtocol> _Nullable token,
+                                                      NSError * _Nullable error) {
       NSError * __block maybeError = error;
       @synchronized (self) {
         if (!token && !error) {
@@ -118,8 +139,8 @@ typedef void (^GIDAppCheckTokenCompletion)(FIRAppCheckToken * _Nullable, NSError
 
 - (void)getLimitedUseTokenWithCompletion:(nullable GIDAppCheckTokenCompletion)completion {
   dispatch_async(self.workerQueue, ^{
-    [self.tokenFetcher limitedUseTokenWithCompletion:^(FIRAppCheckToken * _Nullable token,
-                                                       NSError * _Nullable error) {
+    [self.appCheck getLimitedUseTokenWithCompletion:^(id<GACAppCheckTokenProtocol> _Nullable token,
+                                                      NSError * _Nullable error) {
       if (token) {
         [self.userDefaults setBool:YES forKey:kGIDAppCheckPreparedKey];
       }
@@ -130,6 +151,21 @@ typedef void (^GIDAppCheckTokenCompletion)(FIRAppCheckToken * _Nullable, NSError
   });
 }
 
++ (NSString *)appAttestResourceName {
+  NSString *clientID = [NSBundle.mainBundle objectForInfoDictionaryKey:kGIDConfigClientIDKey];
+  return [NSString stringWithFormat:kGIDAppAttestResourceNameFormat, clientID];
+}
+
++ (id<GACAppCheckProvider>)standardAppCheckProvider {
+  return [[GACAppAttestProvider alloc] initWithServiceName:kGIDAppAttestServiceName
+                                              resourceName:[GIDAppCheck appAttestResourceName]
+                                                   baseURL:kGIDAppAttestBaseURL
+                                                    APIKey:nil
+                                       keychainAccessGroup:nil
+                                                limitedUse:YES
+                                              requestHooks:nil];
+}
+
 @end
 
 #endif // TARGET_OS_IOS && !TARGET_OS_MACCATALYST

+ 0 - 37
GoogleSignIn/Sources/GIDAppCheckTokenFetcher/API/GIDAppCheckTokenFetcher.h

@@ -1,37 +0,0 @@
-/*
- * Copyright 2023 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-NS_ASSUME_NONNULL_BEGIN
-
-@class FIRAppCheckToken;
-
-#if TARGET_OS_IOS && !TARGET_OS_MACCATALYST
-
-NS_AVAILABLE_IOS(14)
-@protocol GIDAppCheckTokenFetcher <NSObject>
-
-/// Get the limited use `FIRAppCheckToken`.
-///
-/// @param completion A block that passes back the `FIRAppCheckToken` upon success or an error in
-///     the case of any failure.
-- (void)limitedUseTokenWithCompletion:(nullable void (^)(FIRAppCheckToken * _Nullable token,
-                                                         NSError * _Nullable error))completion;
-
-@end
-
-#endif // TARGET_OS_IOS && !TARGET_OS_MACCATALYST
-
-NS_ASSUME_NONNULL_END

+ 0 - 29
GoogleSignIn/Sources/GIDAppCheckTokenFetcher/Implementations/FIRAppCheck+GIDAppCheckTokenFetcher.h

@@ -1,29 +0,0 @@
-/*
- * Copyright 2023 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-@import FirebaseAppCheck;
-#import "GoogleSignIn/Sources/GIDAppCheckTokenFetcher/API/GIDAppCheckTokenFetcher.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-#if TARGET_OS_IOS && !TARGET_OS_MACCATALYST
-
-@interface FIRAppCheck (FIRAppCheck_GIDAppCheckTokenFetcher) <GIDAppCheckTokenFetcher>
-@end
-
-#endif // TARGET_OS_IOS && !TARGET_OS_MACCATALYST
-
-NS_ASSUME_NONNULL_END

+ 11 - 13
GoogleSignIn/Sources/GIDSignIn.m

@@ -28,10 +28,9 @@
 #import "GoogleSignIn/Sources/GIDScopes.h"
 #import "GoogleSignIn/Sources/GIDSignInCallbackSchemes.h"
 #if TARGET_OS_IOS && !TARGET_OS_MACCATALYST
-#import "FirebaseAppCheck/FIRAppCheckToken.h"
-#import "GoogleSignIn/Sources/GIDAppCheck/UI/GIDActivityIndicatorViewController.h"
+#import <AppCheckCore/GACAppCheckToken.h>
 #import "GoogleSignIn/Sources/GIDAppCheck/Implementations/GIDAppCheck.h"
-#import "GoogleSignIn/Sources/GIDAppCheck/API/GIDAppCheckProvider.h"
+#import "GoogleSignIn/Sources/GIDAppCheck/UI/GIDActivityIndicatorViewController.h"
 #import "GoogleSignIn/Sources/GIDAuthStateMigration.h"
 #import "GoogleSignIn/Sources/GIDEMMErrorHandler.h"
 #endif // TARGET_OS_IOS && !TARGET_OS_MACCATALYST
@@ -170,7 +169,7 @@ static NSString *const kConfigOpenIDRealmKey = @"GIDOpenIDRealm";
   // represent a sign in continuation.
   GIDSignInInternalOptions *_currentOptions;
 #if TARGET_OS_IOS && !TARGET_OS_MACCATALYST
-  id<GIDAppCheckProvider> _appCheck API_AVAILABLE(ios(14));
+  GIDAppCheck *_appCheck API_AVAILABLE(ios(14));
 #endif // TARGET_OS_IOS && !TARGET_OS_MACCATALYST
   // AppAuth configuration object.
   OIDServiceConfiguration *_appAuthConfiguration;
@@ -460,10 +459,9 @@ static NSString *const kConfigOpenIDRealmKey = @"GIDOpenIDRealm";
         [[GTMKeychainStore alloc] initWithItemName:kGTMAppAuthKeychainName];
 #if TARGET_OS_IOS && !TARGET_OS_MACCATALYST
     if (@available(iOS 14.0, *)) {
-      GIDAppCheck *appCheck = [[GIDAppCheck alloc] initWithAppCheckTokenFetcher:nil
-                                                                   userDefaults:nil];
+      GIDAppCheck *appCheck = [[GIDAppCheck alloc] init];
       sharedInstance = [[self alloc] initWithKeychainStore:keychainStore
-                                          appCheckProvider:appCheck];
+                                                  appCheck:appCheck];
     }
 #endif // TARGET_OS_IOS && !TARGET_OS_MACCATALYST
     if (!sharedInstance) {
@@ -479,9 +477,9 @@ static NSString *const kConfigOpenIDRealmKey = @"GIDOpenIDRealm";
 - (void)configureWithCompletion:(nullable void (^)(NSError * _Nullable))completion {
   @synchronized(self) {
     [_appCheck prepareForAppCheckWithCompletion:^(NSError * _Nullable error) {
-        if (completion) {
-          completion(error);
-        }
+      if (completion) {
+        completion(error);
+      }
     }];
   }
 }
@@ -531,10 +529,10 @@ static NSString *const kConfigOpenIDRealmKey = @"GIDOpenIDRealm";
 
 #if TARGET_OS_IOS && !TARGET_OS_MACCATALYST
 - (instancetype)initWithKeychainStore:(GTMKeychainStore *)keychainStore
-                     appCheckProvider:(id<GIDAppCheckProvider>)appCheckProvider {
+                             appCheck:(GIDAppCheck *)appCheck {
   self = [self initWithKeychainStore:keychainStore];
   if (self) {
-    _appCheck = appCheckProvider;
+    _appCheck = appCheck;
   }
   return self;
 }
@@ -646,7 +644,7 @@ static NSString *const kConfigOpenIDRealmKey = @"GIDOpenIDRealm";
         dispatch_time_t halfSecond = dispatch_time(DISPATCH_TIME_NOW, NSEC_PER_MSEC / 2);
         dispatch_after(halfSecond, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
           [self->_appCheck getLimitedUseTokenWithCompletion:
-              ^(FIRAppCheckToken * _Nullable token, NSError * _Nullable error) {
+              ^(id<GACAppCheckTokenProtocol> _Nullable token, NSError * _Nullable error) {
             if (token) {
               additionalParameters[kClientAssertionTypeParameter] =
                   kClientAssertionTypeParameterValue;

+ 2 - 2
GoogleSignIn/Sources/GIDSignIn_Private.h

@@ -29,7 +29,7 @@ NS_ASSUME_NONNULL_BEGIN
 @class GIDGoogleUser;
 @class GIDSignInInternalOptions;
 @class GTMKeychainStore;
-@protocol GIDAppCheckProvider;
+@class GIDAppCheck;
 
 /// Represents a completion block that takes a `GIDSignInResult` on success or an error if the
 /// operation was unsuccessful.
@@ -51,7 +51,7 @@ typedef void (^GIDDisconnectCompletion)(NSError *_Nullable error);
 #if TARGET_OS_IOS && !TARGET_OS_MACCATALYST
 /// Private initializer taking a `GTMKeychainStore` and `GIDAppCheckProvider`.
 - (instancetype)initWithKeychainStore:(GTMKeychainStore *)keychainStore
-                     appCheckProvider:(id<GIDAppCheckProvider>)appCheckProvider
+                             appCheck:(GIDAppCheck *)appCheck
 API_AVAILABLE(ios(14));
 #endif // TARGET_OS_IOS || !TARGET_OS_MACCATALYST
 

+ 0 - 1
GoogleSignIn/Sources/Public/GoogleSignIn/GIDSignIn.h

@@ -26,7 +26,6 @@
 @class GIDConfiguration;
 @class GIDGoogleUser;
 @class GIDSignInResult;
-@protocol GIDAppCheckProvider;
 
 NS_ASSUME_NONNULL_BEGIN
 

+ 31 - 27
GoogleSignIn/Tests/Unit/GIDAppCheckTest.m

@@ -17,13 +17,13 @@
 #if TARGET_OS_IOS && !TARGET_OS_MACCATALYST
 
 #import <XCTest/XCTest.h>
-#import "FirebaseAppCheck/FIRAppCheckToken.h"
+#import <AppCheckCore/GACAppCheckToken.h>
 #import "GoogleSignIn/Sources/GIDAppCheck/Implementations/GIDAppCheck.h"
-#import "GoogleSignIn/Sources/GIDAppCheckTokenFetcher/Implementations/GIDAppCheckTokenFetcherFake.h"
+#import "GoogleSignIn/Sources/GIDAppCheck/Implementations/Fake/GIDAppCheckProviderFake.h"
 #import "GoogleSignIn/Sources/Public/GoogleSignIn/GIDAppCheckError.h"
 
 static NSUInteger const timeout = 1;
-static NSString *const kUserDefaultsSuiteName = @"GIDAppCheckKeySuiteName";
+static NSString *const kUserDefaultsTestSuiteName = @"GIDAppCheckTestKeySuiteName";
 
 NS_CLASS_AVAILABLE_IOS(14)
 @interface GIDAppCheckTest : XCTestCase
@@ -36,27 +36,28 @@ NS_CLASS_AVAILABLE_IOS(14)
 
 - (void)setUp {
   [super setUp];
-  _userDefaults = [[NSUserDefaults alloc] initWithSuiteName:kUserDefaultsSuiteName];
+  _userDefaults = [[NSUserDefaults alloc] initWithSuiteName:kUserDefaultsTestSuiteName];
 }
 
 - (void)tearDown {
   [super tearDown];
   [self.userDefaults removeObjectForKey:kGIDAppCheckPreparedKey];
-  [self.userDefaults removeSuiteNamed:kUserDefaultsSuiteName];
+  [self.userDefaults removeSuiteNamed:kUserDefaultsTestSuiteName];
 }
 
 - (void)testGetLimitedUseTokenFailure {
   XCTestExpectation *tokenFailExpectation =
       [self expectationWithDescription:@"App check token fail"];
   NSError *expectedError = [NSError errorWithDomain:kGIDAppCheckErrorDomain
-                                               code:kGIDAppCheckTokenFetcherTokenError
+                                               code:kGIDAppCheckProviderFakeError
                                            userInfo:nil];
-  GIDAppCheckTokenFetcherFake *tokenFetcher =
-      [[GIDAppCheckTokenFetcherFake alloc] initWithAppCheckToken:nil error:expectedError];
-  GIDAppCheck *appCheck = [[GIDAppCheck alloc] initWithAppCheckTokenFetcher:tokenFetcher
-                                                               userDefaults:self.userDefaults];
 
-  [appCheck getLimitedUseTokenWithCompletion:^(FIRAppCheckToken * _Nullable token,
+  GIDAppCheckProviderFake *fakeProvider =
+      [[GIDAppCheckProviderFake alloc] initWithAppCheckToken:nil error:expectedError];
+  GIDAppCheck *appCheck = [[GIDAppCheck alloc] initWithAppCheckProvider:fakeProvider
+                                                           userDefaults:self.userDefaults];
+
+  [appCheck getLimitedUseTokenWithCompletion:^(id<GACAppCheckTokenProtocol> _Nullable token,
                                                NSError * _Nullable error) {
     XCTAssertNil(token);
     XCTAssertEqualObjects(expectedError, error);
@@ -70,13 +71,14 @@ NS_CLASS_AVAILABLE_IOS(14)
   XCTestExpectation *notAlreadyPreparedExpectation =
       [self expectationWithDescription:@"App check not already prepared error"];
 
-  FIRAppCheckToken *expectedToken = [[FIRAppCheckToken alloc] initWithToken:@"foo"
+  GACAppCheckToken *expectedToken = [[GACAppCheckToken alloc] initWithToken:@"foo"
                                                              expirationDate:[NSDate distantFuture]];
   // It doesn't matter what we pass for the error since we will check `isPrepared` and make one
-  GIDAppCheckTokenFetcherFake *tokenFetcher =
-      [[GIDAppCheckTokenFetcherFake alloc] initWithAppCheckToken:expectedToken error:nil];
-  GIDAppCheck *appCheck = [[GIDAppCheck alloc] initWithAppCheckTokenFetcher:tokenFetcher
-                                                               userDefaults:self.userDefaults];
+  GIDAppCheckProviderFake *fakeProvider =
+      [[GIDAppCheckProviderFake alloc] initWithAppCheckToken:expectedToken error:nil];
+
+  GIDAppCheck *appCheck = [[GIDAppCheck alloc] initWithAppCheckProvider:fakeProvider
+                                                           userDefaults:self.userDefaults];
 
   [appCheck prepareForAppCheckWithCompletion:^(NSError * _Nullable error) {
     XCTAssertNil(error);
@@ -88,6 +90,7 @@ NS_CLASS_AVAILABLE_IOS(14)
   XCTestExpectation *alreadyPreparedExpectation =
       [self expectationWithDescription:@"App check already prepared error"];
 
+  // Should be no error since multiple calls to prepare should be fine.
   [appCheck prepareForAppCheckWithCompletion:^(NSError * _Nullable error) {
     XCTAssertNil(error);
     [alreadyPreparedExpectation fulfill];
@@ -101,13 +104,14 @@ NS_CLASS_AVAILABLE_IOS(14)
 - (void)testGetLimitedUseTokenSucceeds {
   XCTestExpectation *prepareExpectation =
       [self expectationWithDescription:@"Prepare for App Check expectation"];
-  FIRAppCheckToken *expectedToken = [[FIRAppCheckToken alloc] initWithToken:@"foo"
+
+  GACAppCheckToken *expectedToken = [[GACAppCheckToken alloc] initWithToken:@"foo"
                                                              expirationDate:[NSDate distantFuture]];
 
-  GIDAppCheckTokenFetcherFake *tokenFetcher =
-      [[GIDAppCheckTokenFetcherFake alloc] initWithAppCheckToken:expectedToken error:nil];
-  GIDAppCheck *appCheck = [[GIDAppCheck alloc] initWithAppCheckTokenFetcher:tokenFetcher
-                                                               userDefaults:self.userDefaults];
+  GIDAppCheckProviderFake *fakeProvider =
+      [[GIDAppCheckProviderFake alloc] initWithAppCheckToken:expectedToken error:nil];
+  GIDAppCheck *appCheck = [[GIDAppCheck alloc] initWithAppCheckProvider:fakeProvider
+                                                           userDefaults:self.userDefaults];
 
   [appCheck prepareForAppCheckWithCompletion:^(NSError * _Nullable error) {
     XCTAssertNil(error);
@@ -122,7 +126,7 @@ NS_CLASS_AVAILABLE_IOS(14)
   XCTestExpectation *getLimitedUseTokenSucceedsExpectation =
       [self expectationWithDescription:@"getLimitedUseToken should succeed"];
 
-  [appCheck getLimitedUseTokenWithCompletion:^(FIRAppCheckToken * _Nullable token,
+  [appCheck getLimitedUseTokenWithCompletion:^(id<GACAppCheckTokenProtocol> _Nullable token,
                                                NSError * _Nullable error) {
     XCTAssertNil(error);
     XCTAssertNotNil(token);
@@ -142,13 +146,13 @@ NS_CLASS_AVAILABLE_IOS(14)
   XCTestExpectation *secondPrepareExpectation =
       [self expectationWithDescription:@"Second async prepare for App Check expectation"];
 
-  FIRAppCheckToken *expectedToken = [[FIRAppCheckToken alloc] initWithToken:@"foo"
+  GACAppCheckToken *expectedToken = [[GACAppCheckToken alloc] initWithToken:@"foo"
                                                              expirationDate:[NSDate distantFuture]];
 
-  GIDAppCheckTokenFetcherFake *tokenFetcher =
-      [[GIDAppCheckTokenFetcherFake alloc] initWithAppCheckToken:expectedToken error:nil];
-  GIDAppCheck *appCheck = [[GIDAppCheck alloc] initWithAppCheckTokenFetcher:tokenFetcher
-                                                               userDefaults:self.userDefaults];
+  GIDAppCheckProviderFake *fakeProvider =
+      [[GIDAppCheckProviderFake alloc] initWithAppCheckToken:expectedToken error:nil];
+  GIDAppCheck *appCheck = [[GIDAppCheck alloc] initWithAppCheckProvider:fakeProvider
+                                                           userDefaults:self.userDefaults];
 
   dispatch_async(dispatch_get_main_queue(), ^{
     [appCheck prepareForAppCheckWithCompletion:^(NSError * _Nullable error) {

+ 16 - 17
GoogleSignIn/Tests/Unit/GIDSignInTest.m

@@ -34,9 +34,9 @@
 #import "GoogleSignIn/Sources/GIDSignInPreferences.h"
 
 #if TARGET_OS_IOS && !TARGET_OS_MACCATALYST
-#import "FirebaseAppCheck/FIRAppCheckToken.h"
+#import <AppCheckCore/GACAppCheckToken.h>
 #import "GoogleSignIn/Sources/GIDAppCheck/Implementations/GIDAppCheck.h"
-#import "GoogleSignIn/Sources/GIDAppCheckTokenFetcher/Implementations/GIDAppCheckTokenFetcherFake.h"
+#import "GoogleSignIn/Sources/GIDAppCheck/Implementations/Fake/GIDAppCheckProviderFake.h"
 #import "GoogleSignIn/Sources/GIDEMMErrorHandler.h"
 #endif // TARGET_OS_IOS && !TARGET_OS_MACCATALYST
 
@@ -389,23 +389,22 @@ static NSString *const kNewScope = @"newScope";
     XCTestExpectation *configureSucceedsExpecation =
     [self expectationWithDescription:@"Configure succeeds expectation"];
 
-    FIRAppCheckToken *token = [[FIRAppCheckToken alloc] initWithToken:@"foo"
+    GACAppCheckToken *token = [[GACAppCheckToken alloc] initWithToken:@"foo"
                                                        expirationDate:[NSDate distantFuture]];
-    GIDAppCheckTokenFetcherFake *tokenFetcher =
-        [[GIDAppCheckTokenFetcherFake alloc] initWithAppCheckToken:token error:nil];
-    GIDAppCheck *appCheckProvider =
-        [[GIDAppCheck alloc] initWithAppCheckTokenFetcher:tokenFetcher
-                                             userDefaults:_testUserDefaults];
+    GIDAppCheckProviderFake *fakeProvider =
+        [[GIDAppCheckProviderFake alloc] initWithAppCheckToken:token error:nil];
+    GIDAppCheck *appCheck = [[GIDAppCheck alloc] initWithAppCheckProvider:fakeProvider
+                                                             userDefaults:_testUserDefaults];
 
     GIDSignIn *signIn = [[GIDSignIn alloc] initWithKeychainStore:_keychainStore
-                                                appCheckProvider:appCheckProvider];
+                                                        appCheck:appCheck];
     [signIn configureWithCompletion:^(NSError * _Nullable error) {
       XCTAssertNil(error);
       [configureSucceedsExpecation fulfill];
     }];
 
     [self waitForExpectations:@[configureSucceedsExpecation] timeout:1];
-    XCTAssertTrue(appCheckProvider.isPrepared);
+    XCTAssertTrue(appCheck.isPrepared);
   }
 }
 
@@ -414,14 +413,14 @@ static NSString *const kNewScope = @"newScope";
     XCTestExpectation *configureFailsExpecation =
     [self expectationWithDescription:@"Configure fails expectation"];
 
-    GIDAppCheckTokenFetcherFake *tokenFetcher =
-        [[GIDAppCheckTokenFetcherFake alloc] initWithAppCheckToken:nil error:nil];
-    GIDAppCheck *appCheckProvider =
-        [[GIDAppCheck alloc] initWithAppCheckTokenFetcher:tokenFetcher
-                                             userDefaults:_testUserDefaults];
+    GIDAppCheckProviderFake *fakeProvider =
+        [[GIDAppCheckProviderFake alloc] initWithAppCheckToken:nil error:nil];
+    GIDAppCheck *appCheck =
+        [[GIDAppCheck alloc] initWithAppCheckProvider:fakeProvider
+                                         userDefaults:_testUserDefaults];
 
     GIDSignIn *signIn = [[GIDSignIn alloc] initWithKeychainStore:_keychainStore
-                                                appCheckProvider:appCheckProvider];
+                                                        appCheck:appCheck];
 
     // `configureWithCompletion:` should fail if neither a token or error is present
     [signIn configureWithCompletion:^(NSError * _Nullable error) {
@@ -431,7 +430,7 @@ static NSString *const kNewScope = @"newScope";
     }];
 
     [self waitForExpectations:@[configureFailsExpecation] timeout:1];
-    XCTAssertFalse(appCheckProvider.isPrepared);
+    XCTAssertFalse(appCheck.isPrepared);
   }
 }
 #endif // TARGET_OS_IOS && !TARGET_OS_MACCATALYST

+ 5 - 5
Package.swift

@@ -46,9 +46,9 @@ let package = Package(
       url: "https://github.com/openid/AppAuth-iOS.git",
       "1.6.0" ..< "2.0.0"),
     .package(
-      name: "Firebase",
-      url: "https://github.com/firebase/firebase-ios-sdk.git",
-      "10.0.0" ..< "11.0.0"),
+      name: "AppCheck",
+      url: "https://github.com/google/app-check.git",
+      .branch("main")),
     .package(
       name: "GTMAppAuth",
       url: "https://github.com/google/GTMAppAuth.git",
@@ -71,7 +71,7 @@ let package = Package(
       name: "GoogleSignIn",
       dependencies: [
         .product(name: "AppAuth", package: "AppAuth"),
-        .product(name: "FirebaseAppCheck", package: "Firebase"),
+        .product(name: "AppCheckCore", package: "AppCheck"),
         .product(name: "GTMAppAuth", package: "GTMAppAuth"),
         .product(name: "GTMSessionFetcherCore", package: "GTMSessionFetcher"),
       ],
@@ -108,7 +108,7 @@ let package = Package(
         "GoogleSignIn",
         "OCMock",
         .product(name: "AppAuth", package: "AppAuth"),
-        .product(name: "FirebaseAppCheck", package: "Firebase"),
+        .product(name: "AppCheckCore", package: "AppCheck"),
         .product(name: "GTMAppAuth", package: "GTMAppAuth"),
         .product(name: "GTMSessionFetcherCore", package: "GTMSessionFetcher"),
         .product(name: "GULMethodSwizzler", package: "GoogleUtilities"),

+ 0 - 8
Samples/Swift/AppAttestExample/AppAttestExample.xcodeproj/project.pbxproj

@@ -12,8 +12,6 @@
 		73A464042A1C3B3400BA8528 /* AppAttestExampleApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73A464032A1C3B3400BA8528 /* AppAttestExampleApp.swift */; };
 		73A464062A1C3B3400BA8528 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73A464052A1C3B3400BA8528 /* ContentView.swift */; };
 		73A4640B2A1C3B3500BA8528 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 73A4640A2A1C3B3500BA8528 /* Preview Assets.xcassets */; };
-		73BC0EB22A57609D00C3DDE5 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 73BC0EB12A57609D00C3DDE5 /* GoogleService-Info.plist */; };
-		73BD4BB52A390CFE00A48E3C /* BirthdayAppCheckProviderFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73BD4BB42A390CFE00A48E3C /* BirthdayAppCheckProviderFactory.swift */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXFileReference section */
@@ -24,8 +22,6 @@
 		73A464032A1C3B3400BA8528 /* AppAttestExampleApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppAttestExampleApp.swift; sourceTree = "<group>"; };
 		73A464052A1C3B3400BA8528 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
 		73A4640A2A1C3B3500BA8528 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
-		73BC0EB12A57609D00C3DDE5 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
-		73BD4BB42A390CFE00A48E3C /* BirthdayAppCheckProviderFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BirthdayAppCheckProviderFactory.swift; sourceTree = "<group>"; };
 		7D9832F2FFAF408698660CA8 /* Pods-AppAttestExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AppAttestExample.debug.xcconfig"; path = "Target Support Files/Pods-AppAttestExample/Pods-AppAttestExample.debug.xcconfig"; sourceTree = "<group>"; };
 		91F3A930BB86D9E0648046BC /* Pods_AppAttestExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_AppAttestExample.framework; sourceTree = BUILT_PRODUCTS_DIR; };
 /* End PBXFileReference section */
@@ -74,10 +70,8 @@
 			children = (
 				73443A232A55F56900A4932E /* AppAttestExample.entitlements */,
 				73A464032A1C3B3400BA8528 /* AppAttestExampleApp.swift */,
-				73BD4BB42A390CFE00A48E3C /* BirthdayAppCheckProviderFactory.swift */,
 				73A464052A1C3B3400BA8528 /* ContentView.swift */,
 				738D5F722A26BC3B00A7F11B /* BirthdayLoader.swift */,
-				73BC0EB12A57609D00C3DDE5 /* GoogleService-Info.plist */,
 				73A464092A1C3B3500BA8528 /* Preview Content */,
 			);
 			path = AppAttestExample;
@@ -160,7 +154,6 @@
 			buildActionMask = 2147483647;
 			files = (
 				73A4640B2A1C3B3500BA8528 /* Preview Assets.xcassets in Resources */,
-				73BC0EB22A57609D00C3DDE5 /* GoogleService-Info.plist in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -215,7 +208,6 @@
 			files = (
 				738D5F732A26BC3B00A7F11B /* BirthdayLoader.swift in Sources */,
 				73A464062A1C3B3400BA8528 /* ContentView.swift in Sources */,
-				73BD4BB52A390CFE00A48E3C /* BirthdayAppCheckProviderFactory.swift in Sources */,
 				73A464042A1C3B3400BA8528 /* AppAttestExampleApp.swift in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;

+ 0 - 10
Samples/Swift/AppAttestExample/AppAttestExample/AppAttestExampleApp.swift

@@ -15,8 +15,6 @@
  */
 
 import SwiftUI
-import FirebaseCore
-import FirebaseAppCheck
 import GoogleSignIn
 
 class AppDelegate: NSObject, UIApplicationDelegate {
@@ -24,14 +22,6 @@ class AppDelegate: NSObject, UIApplicationDelegate {
     _ application: UIApplication,
     didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil
   ) -> Bool {
-    #if targetEnvironment(simulator)
-    let debugProvider = AppCheckDebugProviderFactory()
-    AppCheck.setAppCheckProviderFactory(debugProvider)
-    #else
-    AppCheck.setAppCheckProviderFactory(BirthdayAppCheckProviderFactory())
-    #endif
-    FirebaseApp.configure()
-
     GIDSignIn.sharedInstance.configureWithCompletion { error in
       if let error {
         print("Error configuring `GIDSignIn` for Firebase App Check: \(error)")

+ 0 - 25
Samples/Swift/AppAttestExample/AppAttestExample/BirthdayAppCheckProviderFactory.swift

@@ -1,25 +0,0 @@
-/*
- * Copyright 2023 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import FirebaseCore
-import FirebaseAppCheck
-
-class BirthdayAppCheckProviderFactory: NSObject, AppCheckProviderFactory {
-  func createProvider(with app: FirebaseApp) -> AppCheckProvider? {
-    return AppAttestProvider(app: app)
-  }
-}
-

+ 21 - 0
Samples/Swift/AppAttestExample/AppAttestExample/Info.plist

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleURLTypes</key>
+	<array>
+		<dict>
+			<key>CFBundleTypeRole</key>
+			<string>Editor</string>
+			<key>CFBundleURLName</key>
+			<string>com.googleusercontent.apps.665845761721-a9g0c1k6buv131av6nnmburou5scd63h</string>
+			<key>CFBundleURLSchemes</key>
+			<array>
+				<string>com.googleusercontent.apps.665845761721-a9g0c1k6buv131av6nnmburou5scd63h</string>
+			</array>
+		</dict>
+	</array>
+	<key>GIDClientID</key>
+	<string>665845761721-a9g0c1k6buv131av6nnmburou5scd63h.apps.googleusercontent.com</string>
+</dict>
+</plist>

+ 1 - 3
Samples/Swift/AppAttestExample/Podfile

@@ -5,8 +5,6 @@ project 'AppAttestExample.xcodeproj'
 use_frameworks! :linkage => :static
 
 target 'AppAttestExample' do
+  pod 'AppCheckCore', :git => 'https://github.com/google/app-check.git', :tag => 'CocoaPods-0.1.0-alpha.1'
   platform :ios, '14.0'
-
-  pod 'FirebaseCore', '~> 10.0'
-  pod 'FirebaseAppCheck', '~> 10.0'
 end