Skip to content

Commit

Permalink
Add NS_ASSUME_NONNULL_NOTATION for game center sign in (#2359)
Browse files Browse the repository at this point in the history
  • Loading branch information
Chuan Ren authored Feb 7, 2019
1 parent e8b0c1f commit 10f50bf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
#import "FIRGameCenterAuthProvider.h"
#import "FIRVerifyAssertionRequest.h"

NS_ASSUME_NONNULL_BEGIN

@implementation FIRGameCenterAuthCredential

- (nullable instancetype)initWithProvider:(NSString *)provider {
Expand Down Expand Up @@ -84,3 +86,5 @@ - (void)encodeWithCoder:(NSCoder *)aCoder {
}

@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#import "FIRAuthExceptionUtils.h"
#import "FIRGameCenterAuthCredential.h"

NS_ASSUME_NONNULL_BEGIN

@implementation FIRGameCenterAuthProvider

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

if (!optionalLocalPlayer) {
if (completion) {
Expand Down Expand Up @@ -82,3 +84,5 @@ + (void)getCredentialWithCompletion:(FIRGameCenterCredentialCallback)completion
}

@end

NS_ASSUME_NONNULL_END

0 comments on commit 10f50bf

Please sign in to comment.