Skip to content
This repository was archived by the owner on Jan 16, 2021. It is now read-only.
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 .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ branches:
- master-v3
language: objective-c
os: osx
osx_image: xcode7.2
osx_image: xcode7.3
env:
global:
- LC_CTYPE=en_US.UTF-8
Expand Down
14 changes: 7 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (4.2.5)
activesupport (4.2.6)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
Expand Down Expand Up @@ -41,12 +41,12 @@ GEM
fuzzy_match (2.0.4)
i18n (0.7.0)
json (1.8.3)
minitest (5.8.3)
molinillo (0.4.0)
nap (1.0.0)
minitest (5.8.4)
molinillo (0.4.4)
nap (1.1.0)
naturally (2.1.0)
netrc (0.7.8)
rake (10.4.2)
rake (11.1.2)
rouge (1.10.1)
thread_safe (0.3.5)
tzinfo (1.2.2)
Expand All @@ -55,7 +55,7 @@ GEM
activesupport (>= 3)
claide (~> 0.9.1)
colored (~> 1.2)
xcpretty (0.2.1)
xcpretty (0.2.2)
rouge (~> 1.8)

PLATFORMS
Expand All @@ -68,4 +68,4 @@ DEPENDENCIES
xcpretty

BUNDLED WITH
1.10.6
1.11.2
2 changes: 1 addition & 1 deletion ParseFacebookUtils.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@
isa = PBXProject;
attributes = {
CLASSPREFIX = PF;
LastUpgradeCheck = 0720;
LastUpgradeCheck = 0730;
ORGANIZATIONNAME = "Parse, LLC";
TargetAttributes = {
81CB98C51AB7905D00136FA5 = {
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 = "0720"
LastUpgradeVersion = "0730"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
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 = "0720"
LastUpgradeVersion = "0730"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
7 changes: 6 additions & 1 deletion ParseFacebookUtils/Internal/PFFacebookPrivateUtilities.m
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,12 @@ - (instancetype)pffb_continueWithMainThreadBooleanBlock:(PFBooleanResultBlock)bl
}

- (instancetype)pffb_continueWithMainThreadBlock:(BFContinuationBlock)block {
return [self continueWithExecutor:[BFExecutor mainThreadExecutor] withBlock:block];
return [self continueWithExecutor:[BFExecutor mainThreadExecutor] withBlock:^id(BFTask *task) {
if (task.exception) {
@throw task.exception;
}
return block(task);
}];
}

@end
Expand Down
6 changes: 5 additions & 1 deletion ParseFacebookUtils/PFFacebookUtils.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#import "PFFacebookUtils.h"

#import <Bolts/BFExecutor.h>

#import <FBSDKCoreKit/FBSDKCoreKit.h>
#import <Parse/Parse.h>

#import "PFFacebookPrivateUtilities.h"

Expand Down Expand Up @@ -48,6 +48,10 @@ + (void)_setAuthenticationProvider:(PFFacebookAuthenticationProvider *)provider
///--------------------------------------

+ (void)initializeFacebookWithApplicationLaunchOptions:(NSDictionary *)launchOptions {
if (![Parse currentConfiguration]) {
// TODO: (nlutsenko) Remove this when Parse SDK throws on every access to Parse._currentManager
[NSException raise:NSInternalInconsistencyException format:@"PFFacebookUtils must be initialized after initializing Parse."];
}
if (!authenticationProvider_) {
Class providerClass = nil;
#if TARGET_OS_IOS
Expand Down
11 changes: 8 additions & 3 deletions Tests/Unit/FacebookUtilsTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/

@import Parse.PFConstants;
@import Parse;

#import <OCMock/OCMock.h>

Expand Down Expand Up @@ -57,9 +57,14 @@ - (void)testInitialize {

XCTAssertThrows([PFFacebookUtils unlinkUserInBackground:userMock]);

[PFFacebookUtils initializeFacebookWithApplicationLaunchOptions:nil];
XCTAssertNotNil([PFFacebookUtils _authenticationProvider]);
XCTAssertThrows([PFFacebookUtils initializeFacebookWithApplicationLaunchOptions:nil]);

id parseMock = PFStrictClassMock([Parse class]);
id configurationMock = PFStrictClassMock([ParseClientConfiguration class]);
OCMStub(ClassMethod([parseMock currentConfiguration])).andReturn(configurationMock);

XCTAssertNoThrow([PFFacebookUtils initializeFacebookWithApplicationLaunchOptions:nil]);
XCTAssertNotNil([PFFacebookUtils _authenticationProvider]);
XCTAssertNoThrow([PFFacebookUtils initializeFacebookWithApplicationLaunchOptions:nil]);

OCMVerifyAll(userMock);
Expand Down
10 changes: 10 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
coverage:
comment: off
ignore:
- Tests/*
status:
project:
default:
target: 75
only_pulls: yes