This repository was archived by the owner on Jan 16, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 9 files changed +40
-16
lines changed
ParseFacebookUtils.xcodeproj Expand file tree Collapse file tree 9 files changed +40
-16
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ branches:
44 - master-v3
55language : objective-c
66os : osx
7- osx_image : xcode7.2
7+ osx_image : xcode7.3
88env :
99 global :
1010 - LC_CTYPE=en_US.UTF-8
Original file line number Diff line number Diff line change 11GEM
22 remote: https://rubygems.org/
33 specs:
4- activesupport (4.2.5 )
4+ activesupport (4.2.6 )
55 i18n (~> 0.7 )
66 json (~> 1.7 , >= 1.7.7 )
77 minitest (~> 5.1 )
4141 fuzzy_match (2.0.4 )
4242 i18n (0.7.0 )
4343 json (1.8.3 )
44- minitest (5.8.3 )
45- molinillo (0.4.0 )
46- nap (1.0 .0 )
44+ minitest (5.8.4 )
45+ molinillo (0.4.4 )
46+ nap (1.1 .0 )
4747 naturally (2.1.0 )
4848 netrc (0.7.8 )
49- rake (10.4 .2 )
49+ rake (11.1 .2 )
5050 rouge (1.10.1 )
5151 thread_safe (0.3.5 )
5252 tzinfo (1.2.2 )
5555 activesupport (>= 3 )
5656 claide (~> 0.9.1 )
5757 colored (~> 1.2 )
58- xcpretty (0.2.1 )
58+ xcpretty (0.2.2 )
5959 rouge (~> 1.8 )
6060
6161PLATFORMS
@@ -68,4 +68,4 @@ DEPENDENCIES
6868 xcpretty
6969
7070BUNDLED WITH
71- 1.10.6
71+ 1.11.2
Original file line number Diff line number Diff line change 553553 isa = PBXProject;
554554 attributes = {
555555 CLASSPREFIX = PF;
556- LastUpgradeCheck = 0720 ;
556+ LastUpgradeCheck = 0730 ;
557557 ORGANIZATIONNAME = "Parse, LLC";
558558 TargetAttributes = {
559559 81CB98C51AB7905D00136FA5 = {
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" UTF-8" ?>
22<Scheme
3- LastUpgradeVersion = " 0720 "
3+ LastUpgradeVersion = " 0730 "
44 version = " 1.3" >
55 <BuildAction
66 parallelizeBuildables = " YES"
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" UTF-8" ?>
22<Scheme
3- LastUpgradeVersion = " 0720 "
3+ LastUpgradeVersion = " 0730 "
44 version = " 1.3" >
55 <BuildAction
66 parallelizeBuildables = " YES"
Original file line number Diff line number Diff line change @@ -84,7 +84,12 @@ - (instancetype)pffb_continueWithMainThreadBooleanBlock:(PFBooleanResultBlock)bl
8484}
8585
8686- (instancetype )pffb_continueWithMainThreadBlock : (BFContinuationBlock)block {
87- return [self continueWithExecutor: [BFExecutor mainThreadExecutor ] withBlock: block];
87+ return [self continueWithExecutor: [BFExecutor mainThreadExecutor ] withBlock: ^id (BFTask *task) {
88+ if (task.exception ) {
89+ @throw task.exception ;
90+ }
91+ return block (task);
92+ }];
8893}
8994
9095@end
Original file line number Diff line number Diff line change 1010#import " PFFacebookUtils.h"
1111
1212#import < Bolts/BFExecutor.h>
13-
1413#import < FBSDKCoreKit/FBSDKCoreKit.h>
14+ #import < Parse/Parse.h>
1515
1616#import " PFFacebookPrivateUtilities.h"
1717
@@ -48,6 +48,10 @@ + (void)_setAuthenticationProvider:(PFFacebookAuthenticationProvider *)provider
4848// /--------------------------------------
4949
5050+ (void )initializeFacebookWithApplicationLaunchOptions : (NSDictionary *)launchOptions {
51+ if (![Parse currentConfiguration ]) {
52+ // TODO: (nlutsenko) Remove this when Parse SDK throws on every access to Parse._currentManager
53+ [NSException raise: NSInternalInconsistencyException format: @" PFFacebookUtils must be initialized after initializing Parse." ];
54+ }
5155 if (!authenticationProvider_) {
5256 Class providerClass = nil ;
5357#if TARGET_OS_IOS
Original file line number Diff line number Diff line change 77 * of patent rights can be found in the PATENTS file in the same directory.
88 */
99
10- @import Parse.PFConstants ;
10+ @import Parse;
1111
1212#import < OCMock/OCMock.h>
1313
@@ -57,9 +57,14 @@ - (void)testInitialize {
5757
5858 XCTAssertThrows ([PFFacebookUtils unlinkUserInBackground: userMock]);
5959
60- [PFFacebookUtils initializeFacebookWithApplicationLaunchOptions: nil ];
61- XCTAssertNotNil ([PFFacebookUtils _authenticationProvider ]);
60+ XCTAssertThrows ([PFFacebookUtils initializeFacebookWithApplicationLaunchOptions: nil ]);
61+
62+ id parseMock = PFStrictClassMock ([Parse class ]);
63+ id configurationMock = PFStrictClassMock ([ParseClientConfiguration class ]);
64+ OCMStub (ClassMethod ([parseMock currentConfiguration ])).andReturn (configurationMock);
6265
66+ XCTAssertNoThrow ([PFFacebookUtils initializeFacebookWithApplicationLaunchOptions: nil ]);
67+ XCTAssertNotNil ([PFFacebookUtils _authenticationProvider ]);
6368 XCTAssertNoThrow ([PFFacebookUtils initializeFacebookWithApplicationLaunchOptions: nil ]);
6469
6570 OCMVerifyAll (userMock);
Original file line number Diff line number Diff line change 1+ coverage :
2+ comment : off
3+ ignore :
4+ - Tests/*
5+ status :
6+ project :
7+ default :
8+ target : 75
9+ only_pulls : yes
10+
You can’t perform that action at this time.
0 commit comments