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

Commit

Permalink
Merge pull request #37 from ParsePlatform/nlutsenko.warnings
Browse files Browse the repository at this point in the history
Fix warnings and update to Xcode 7.2
  • Loading branch information
nlutsenko committed Jan 7, 2016
2 parents 74e3219 + 55a0661 commit 9c4bb7c
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion ParseFacebookUtils.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@
isa = PBXProject;
attributes = {
CLASSPREFIX = PF;
LastUpgradeCheck = 0710;
LastUpgradeCheck = 0720;
ORGANIZATIONNAME = "Parse, LLC";
TargetAttributes = {
813A25561AC0F3E2007F54F3 = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0710"
LastUpgradeVersion = "0720"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ - (BFTask *)authenticateAsync {
}
}
[self.session openWithBehavior:behavior
fromViewController:nil
completionHandler:^(FBSession *callingSession, FBSessionState status, NSError *openError) {
if (called) {
if ((status & FBSessionStateOpenTokenExtended) == FBSessionStateOpenTokenExtended &&
Expand Down Expand Up @@ -235,6 +236,7 @@ - (BOOL)restoreAuthenticationWithAuthData:(nullable NSDictionary<NSString *, NSS

if (rawSession.state == FBSessionStateCreatedTokenLoaded) {
[rawSession openWithBehavior:FBSessionLoginBehaviorWithNoFallbackToWebView
fromViewController:nil
completionHandler:^(FBSession *callingSession, FBSessionState status, NSError *error) {
if (!called) {
if (callingSession.isOpen && self.currentOperationId == scopedOperationId) {
Expand Down
6 changes: 3 additions & 3 deletions ParseFacebookUtils/Internal/PFReceptionist.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ @implementation PFReceptionist {
NSThread *_affinitizedThread;
}

- (instancetype)initWithTarget:(NSObject *)newTarget thread:(NSThread *)thread {
if (!newTarget) {
- (instancetype)initWithTarget:(id)target thread:(NSThread *)thread {
if (!target) {
return nil;
}

_target = newTarget;
_target = target;
_affinitizedThread = thread;

return self;
Expand Down
9 changes: 6 additions & 3 deletions Tests/Unit/FacebookAuthenticationProviderTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,13 @@ - (void)testAuthenticateSuccess {

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

[invocation getArgument:&theSession atIndex:0];
[invocation getArgument:&handler atIndex:3];
[invocation getArgument:&handler atIndex:4];

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

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

[invocation getArgument:&theSession atIndex:0];
[invocation getArgument:&handler atIndex:3];
[invocation getArgument:&handler atIndex:4];

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

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

[invocation getArgument:&theSession atIndex:0];
[invocation getArgument:&handler atIndex:3];
[invocation getArgument:&handler atIndex:4];

[provider.tokenCache setAccessToken:@"token"];
[provider.tokenCache setExpirationDate:[NSDate dateWithTimeIntervalSince1970:1337]];
Expand Down

0 comments on commit 9c4bb7c

Please sign in to comment.