File tree Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Original file line number Diff line number Diff line change 4
4
// Copyright © 2016 Facebook. All rights reserved.
5
5
//
6
6
7
- #import < objc/runtime.h>
8
-
9
7
#import " Firestack.h"
10
8
#import " FirestackErrors.h"
11
9
#import " FirestackEvents.h"
12
10
#import " FirestackAnalytics.h"
13
11
// #import "FirestackCloudMessaging.h"
14
12
15
- @import Firebase;
16
-
17
13
static Firestack *_sharedInstance = nil ;
18
14
static dispatch_once_t onceToken;
19
15
Original file line number Diff line number Diff line change @@ -64,7 +64,6 @@ @implementation FirestackAuth
64
64
callback (@[[NSNull null ], userProps]);
65
65
} else {
66
66
NSLog (@" An error occurred: %@ " , [error localizedDescription ]);
67
- NSLog (@" Error: %@ " , error);
68
67
// No user is signed in.
69
68
NSDictionary *err = @{
70
69
@" error" : @" No user signed in" ,
@@ -436,16 +435,16 @@ - (FIRAuthCredential *)getCredentialForProvider:(NSString *)provider
436
435
secret : (NSString *)authTokenSecret
437
436
{
438
437
FIRAuthCredential *credential;
439
- if ([provider caseInsensitiveCompare: @" twitter" ] ) {
438
+ if ([provider compare: @" twitter" options: NSCaseInsensitiveSearch] == NSOrderedSame ) {
440
439
credential = [FIRTwitterAuthProvider credentialWithToken: authToken
441
440
secret: authTokenSecret];
442
- } if ([provider caseInsensitiveCompare: @" facebook" ] ) {
441
+ } else if ([provider compare: @" facebook" options: NSCaseInsensitiveSearch] == NSOrderedSame ) {
443
442
credential = [FIRFacebookAuthProvider credentialWithAccessToken: authToken];
444
- } if ([provider caseInsensitiveCompare: @" google" ] ) {
443
+ } else if ([provider compare: @" google" options: NSCaseInsensitiveSearch] == NSOrderedSame ) {
445
444
credential = [FIRGoogleAuthProvider credentialWithIDToken: authToken
446
445
accessToken: authTokenSecret];
447
446
} else {
448
- NSLog (@" Provider not yet handled" );
447
+ NSLog (@" Provider not yet handled: %@ " , provider );
449
448
}
450
449
return credential;
451
450
}
You can’t perform that action at this time.
0 commit comments