Skip to content

Commit 10f50bf

Browse files
author
Chuan Ren
authored
Add NS_ASSUME_NONNULL_NOTATION for game center sign in (#2359)
1 parent e8b0c1f commit 10f50bf

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Firebase/Auth/Source/AuthProviders/GameCenter/FIRGameCenterAuthCredential.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
#import "FIRGameCenterAuthProvider.h"
2222
#import "FIRVerifyAssertionRequest.h"
2323

24+
NS_ASSUME_NONNULL_BEGIN
25+
2426
@implementation FIRGameCenterAuthCredential
2527

2628
- (nullable instancetype)initWithProvider:(NSString *)provider {
@@ -84,3 +86,5 @@ - (void)encodeWithCoder:(NSCoder *)aCoder {
8486
}
8587

8688
@end
89+
90+
NS_ASSUME_NONNULL_END

Firebase/Auth/Source/AuthProviders/GameCenter/FIRGameCenterAuthProvider.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
#import "FIRAuthExceptionUtils.h"
2323
#import "FIRGameCenterAuthCredential.h"
2424

25+
NS_ASSUME_NONNULL_BEGIN
26+
2527
@implementation FIRGameCenterAuthProvider
2628

2729
- (instancetype)init {
@@ -37,7 +39,7 @@ + (void)getCredentialWithCompletion:(FIRGameCenterCredentialCallback)completion
3739
checking whether the APP that consuming our SDK has linked GameKit.framework. If not, a
3840
`GameKitNotLinkedError` will be raised.
3941
**/
40-
GKLocalPlayer *optionalLocalPlayer = [[NSClassFromString(@"GKLocalPlayer") alloc] init];
42+
GKLocalPlayer * _Nullable optionalLocalPlayer = [[NSClassFromString(@"GKLocalPlayer") alloc] init];
4143

4244
if (!optionalLocalPlayer) {
4345
if (completion) {
@@ -82,3 +84,5 @@ + (void)getCredentialWithCompletion:(FIRGameCenterCredentialCallback)completion
8284
}
8385

8486
@end
87+
88+
NS_ASSUME_NONNULL_END

0 commit comments

Comments
 (0)