Skip to content
This repository was archived by the owner on Jan 16, 2021. It is now read-only.

Commit 9c4bb7c

Browse files
committed
Merge pull request #37 from ParsePlatform/nlutsenko.warnings
Fix warnings and update to Xcode 7.2
2 parents 74e3219 + 55a0661 commit 9c4bb7c

File tree

5 files changed

+13
-8
lines changed

5 files changed

+13
-8
lines changed

ParseFacebookUtils.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@
439439
isa = PBXProject;
440440
attributes = {
441441
CLASSPREFIX = PF;
442-
LastUpgradeCheck = 0710;
442+
LastUpgradeCheck = 0720;
443443
ORGANIZATIONNAME = "Parse, LLC";
444444
TargetAttributes = {
445445
813A25561AC0F3E2007F54F3 = {

ParseFacebookUtils.xcodeproj/xcshareddata/xcschemes/ParseFacebookUtils-iOS.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0710"
3+
LastUpgradeVersion = "0720"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

ParseFacebookUtils/Internal/PFFacebookAuthenticationProvider.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ - (BFTask *)authenticateAsync {
114114
}
115115
}
116116
[self.session openWithBehavior:behavior
117+
fromViewController:nil
117118
completionHandler:^(FBSession *callingSession, FBSessionState status, NSError *openError) {
118119
if (called) {
119120
if ((status & FBSessionStateOpenTokenExtended) == FBSessionStateOpenTokenExtended &&
@@ -235,6 +236,7 @@ - (BOOL)restoreAuthenticationWithAuthData:(nullable NSDictionary<NSString *, NSS
235236

236237
if (rawSession.state == FBSessionStateCreatedTokenLoaded) {
237238
[rawSession openWithBehavior:FBSessionLoginBehaviorWithNoFallbackToWebView
239+
fromViewController:nil
238240
completionHandler:^(FBSession *callingSession, FBSessionState status, NSError *error) {
239241
if (!called) {
240242
if (callingSession.isOpen && self.currentOperationId == scopedOperationId) {

ParseFacebookUtils/Internal/PFReceptionist.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ @implementation PFReceptionist {
3131
NSThread *_affinitizedThread;
3232
}
3333

34-
- (instancetype)initWithTarget:(NSObject *)newTarget thread:(NSThread *)thread {
35-
if (!newTarget) {
34+
- (instancetype)initWithTarget:(id)target thread:(NSThread *)thread {
35+
if (!target) {
3636
return nil;
3737
}
3838

39-
_target = newTarget;
39+
_target = target;
4040
_affinitizedThread = thread;
4141

4242
return self;

Tests/Unit/FacebookAuthenticationProviderTests.m

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,13 @@ - (void)testAuthenticateSuccess {
9393

9494
OCMStub([mockedSession valueForKey:@"self"]).andReturnWeak(mockedSession);
9595
OCMStub([[mockedSession ignoringNonObjectArgs] openWithBehavior:0
96+
fromViewController:nil
9697
completionHandler:OCMOCK_ANY]).andDo(^(NSInvocation *invocation) {
9798
__unsafe_unretained FBSession *theSession = nil;
9899
__unsafe_unretained FBSessionStateHandler handler = nil;
99100

100101
[invocation getArgument:&theSession atIndex:0];
101-
[invocation getArgument:&handler atIndex:3];
102+
[invocation getArgument:&handler atIndex:4];
102103

103104
[provider.tokenCache setAccessToken:@"token"];
104105
[provider.tokenCache setExpirationDate:[NSDate dateWithTimeIntervalSince1970:1337]];
@@ -162,12 +163,13 @@ - (void)testAuthenticateIncompleteCachedSession {
162163

163164
OCMStub([mockedSession valueForKey:@"self"]).andReturnWeak(mockedSession);
164165
OCMStub([[mockedSession ignoringNonObjectArgs] openWithBehavior:0
166+
fromViewController:nil
165167
completionHandler:OCMOCK_ANY]).andDo(^(NSInvocation *invocation) {
166168
__unsafe_unretained FBSession *theSession = nil;
167169
__unsafe_unretained FBSessionStateHandler handler = nil;
168170

169171
[invocation getArgument:&theSession atIndex:0];
170-
[invocation getArgument:&handler atIndex:3];
172+
[invocation getArgument:&handler atIndex:4];
171173

172174
[provider.tokenCache setAccessToken:@"token"];
173175
[provider.tokenCache setExpirationDate:[NSDate dateWithTimeIntervalSince1970:1337]];
@@ -238,12 +240,13 @@ - (void)testTokenExtension {
238240

239241
OCMStub([mockedSession valueForKey:@"self"]).andReturnWeak(mockedSession);
240242
OCMStub([[mockedSession ignoringNonObjectArgs] openWithBehavior:0
243+
fromViewController:nil
241244
completionHandler:OCMOCK_ANY]).andDo(^(NSInvocation *invocation) {
242245
__unsafe_unretained FBSession *theSession = nil;
243246
__unsafe_unretained FBSessionStateHandler handler = nil;
244247

245248
[invocation getArgument:&theSession atIndex:0];
246-
[invocation getArgument:&handler atIndex:3];
249+
[invocation getArgument:&handler atIndex:4];
247250

248251
[provider.tokenCache setAccessToken:@"token"];
249252
[provider.tokenCache setExpirationDate:[NSDate dateWithTimeIntervalSince1970:1337]];

0 commit comments

Comments
 (0)