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

Fix warnings and update to Xcode 7.2 #37

Merged
merged 3 commits into from
Jan 7, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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