Skip to content

Commit 8650246

Browse files
authored
Ignore warnings from GTMFetcherAuthorizationProtocol deprecation (#219)
* Ignore warnings from GTMFetcherAuthorizationProtocol deprecation. * Ignore more warnings from GTMFetcherAuthorizationProtocol deprecation.
1 parent 725cc3f commit 8650246

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

GoogleSignIn/Sources/GIDAuthentication.m

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,21 @@ @interface GTMAppAuthFetcherAuthorizationWithEMMSupport : GTMAppAuthFetcherAutho
127127

128128
@implementation GTMAppAuthFetcherAuthorizationWithEMMSupport
129129

130+
#pragma clang diagnostic push
131+
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
130132
- (void)authorizeRequest:(nullable NSMutableURLRequest *)request
131133
delegate:(id)delegate
132134
didFinishSelector:(SEL)sel {
135+
#pragma clang diagnostic pop
133136
GTMAppAuthFetcherAuthorizationEMMChainedDelegate *chainedDelegate =
134137
[[GTMAppAuthFetcherAuthorizationEMMChainedDelegate alloc] initWithDelegate:delegate
135138
selector:sel];
139+
#pragma clang diagnostic push
140+
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
136141
[super authorizeRequest:request
137142
delegate:chainedDelegate
138143
didFinishSelector:@selector(authentication:request:finishedWithError:)];
144+
#pragma clang diagnostic pop
139145
}
140146

141147
- (void)authorizeRequest:(nullable NSMutableURLRequest *)request
@@ -206,7 +212,10 @@ - (NSString *)emmSupport {
206212

207213
#pragma mark - Public methods
208214

215+
#pragma clang diagnostic push
216+
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
209217
- (id<GTMFetcherAuthorizationProtocol>)fetcherAuthorizer {
218+
#pragma clang diagnostic pop
210219
#if TARGET_OS_IOS && !TARGET_OS_MACCATALYST
211220
GTMAppAuthFetcherAuthorization *authorization = self.emmSupport ?
212221
[[GTMAppAuthFetcherAuthorizationWithEMMSupport alloc] initWithAuthState:_authState] :

GoogleSignIn/Sources/Public/GoogleSignIn/GIDAuthentication.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ typedef void (^GIDAuthenticationCompletion)(GIDAuthentication *_Nullable authent
5959
/// Gets a new authorizer for `GTLService`, `GTMSessionFetcher`, or `GTMHTTPFetcher`.
6060
///
6161
/// @return A new authorizer
62+
#pragma clang diagnostic push
63+
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
6264
- (id<GTMFetcherAuthorizationProtocol>)fetcherAuthorizer;
65+
#pragma clang diagnostic pop
6366

6467
/// Get a valid access token and a valid ID token, refreshing them first if they have expired or are
6568
/// about to expire.

GoogleSignIn/Tests/Unit/GIDAuthenticationTest.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,10 @@ - (void)testFetcherAuthorizer {
245245
// internally, so let's just take the shortcut here by asserting we get a
246246
// GTMAppAuthFetcherAuthorization object.
247247
GIDAuthentication *auth = [self auth];
248+
#pragma clang diagnostic push
249+
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
248250
id<GTMFetcherAuthorizationProtocol> fetcherAuthroizer = auth.fetcherAuthorizer;
251+
#pragma clang diagnostic pop
249252
XCTAssertTrue([fetcherAuthroizer isKindOfClass:[GTMAppAuthFetcherAuthorization class]]);
250253
XCTAssertTrue([fetcherAuthroizer canAuthorize]);
251254
}

0 commit comments

Comments
 (0)