├── .ruby-version
├── .clang-format
├── Configurations
├── Shared
├── ParseFacebookTestApplicationV4.xcconfig
├── ParseFacebookUtilsV4-iOS.xcconfig
├── ParseFacebookUtilsV4-tvOS.xcconfig
└── ParseFacebookUtilsV4-UnitTests.xcconfig
├── Gemfile
├── Podfile
├── Resources
├── Localizable.strings
├── Info-tvOS.plist
└── Info-iOS.plist
├── .gitmodules
├── codecov.yml
├── ParseFacebookUtils.xcodeproj
├── project.xcworkspace
│ └── contents.xcworkspacedata
├── xcshareddata
│ └── xcschemes
│ │ ├── ParseFacebookUtilsV4-tvOS.xcscheme
│ │ └── ParseFacebookUtilsV4-iOS.xcscheme
└── project.pbxproj
├── Podfile.lock
├── ParseFacebookUtils.xcworkspace
└── contents.xcworkspacedata
├── ParseFacebookUtils
├── ParseFacebookUtilsV4.h
├── Internal
│ ├── AuthenticationProvider
│ │ ├── tvOS
│ │ │ ├── PFFacebookDeviceAuthenticationProvider.h
│ │ │ └── PFFacebookDeviceAuthenticationProvider.m
│ │ ├── iOS
│ │ │ ├── PFFacebookMobileAuthenticationProvider_Private.h
│ │ │ ├── PFFacebookMobileAuthenticationProvider.h
│ │ │ └── PFFacebookMobileAuthenticationProvider.m
│ │ ├── PFFacebookAuthenticationProvider.h
│ │ └── PFFacebookAuthenticationProvider.m
│ ├── PFFacebookUtils_Private.h
│ ├── PFFacebookPrivateUtilities.h
│ └── PFFacebookPrivateUtilities.m
├── PFFacebookUtils.m
└── PFFacebookUtils.h
├── .gitignore
├── Tests
├── Resources
│ └── Info.plist
├── TestApplication
│ ├── Classes
│ │ └── main.m
│ └── Resources
│ │ └── Info.plist
├── Other
│ └── TestCase
│ │ ├── PFFacebookTestCase.m
│ │ └── PFFacebookTestCase.h
└── Unit
│ ├── FacebookUtilsTests.m
│ └── FacebookAuthenticationProviderTests.m
├── README.md
├── .travis.yml
├── ParseFacebookUtilsV4.podspec
├── LICENSE
├── CHANGELOG.md
├── PATENTS
├── Gemfile.lock
├── Rakefile
├── CODE_OF_CONDUCT.md
└── CONTRIBUTING.md
/.ruby-version:
--------------------------------------------------------------------------------
1 | 2.3.1
2 |
--------------------------------------------------------------------------------
/.clang-format:
--------------------------------------------------------------------------------
1 | Vendor/xctoolchain/.clang-format
--------------------------------------------------------------------------------
/Configurations/Shared:
--------------------------------------------------------------------------------
1 | ../Vendor/xctoolchain/Configurations/
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 |
3 | gem 'naturally'
4 | gem 'rake'
5 | gem 'xcpretty'
6 | gem 'cocoapods'
7 |
--------------------------------------------------------------------------------
/Podfile:
--------------------------------------------------------------------------------
1 | platform :ios, '7.0'
2 | use_frameworks!
3 |
4 | target 'ParseFacebookUtilsV4-UnitTests' do
5 | pod 'OCMock'
6 | end
7 |
--------------------------------------------------------------------------------
/Resources/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/parse-community/ParseFacebookUtils-iOS/HEAD/Resources/Localizable.strings
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "Vendor/xctoolchain"]
2 | path = Vendor/xctoolchain
3 | url = https://github.com/nlutsenko/xctoolchain.git
4 |
--------------------------------------------------------------------------------
/codecov.yml:
--------------------------------------------------------------------------------
1 | coverage:
2 | comment: off
3 | ignore:
4 | - Tests/*
5 | status:
6 | project:
7 | default:
8 | target: 75
9 | only_pulls: yes
10 |
--------------------------------------------------------------------------------
/ParseFacebookUtils.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - OCMock (3.3.1)
3 |
4 | DEPENDENCIES:
5 | - OCMock
6 |
7 | SPEC CHECKSUMS:
8 | OCMock: f3f61e6eaa16038c30caa5798c5e49d3307b6f22
9 |
10 | PODFILE CHECKSUM: 7f73b647320ae8e03a939adea9db9d7515147c5e
11 |
12 | COCOAPODS: 1.3.1
13 |
--------------------------------------------------------------------------------
/ParseFacebookUtils.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/ParseFacebookUtils/ParseFacebookUtilsV4.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Parse, LLC.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 |
3 | *.pbxuser
4 | *.perspective
5 | *.perspectivev3
6 |
7 | *.mode1v3
8 | *.mode2v3
9 |
10 | *.xcodeproj/xcuserdata/*.xcuserdatad
11 |
12 | *.xccheckout
13 | *.xcscmblueprint
14 | *.xcuserdatad
15 |
16 | Pods
17 |
18 | DerivedData
19 | build
20 |
21 | Vendor/Parse.framework
22 | Vendor/Bolts.framework
23 | Vendor/FBSDKCoreKit.framework
24 | Vendor/FBSDKLoginKit.framework
25 |
26 | Vendor/tvOS/Parse.framework
27 | Vendor/tvOS/Bolts.framework
28 | Vendor/tvOS/FBSDKCoreKit.framework
29 | Vendor/tvOS/FBSDKTVOSKit.framework
30 |
--------------------------------------------------------------------------------
/ParseFacebookUtils/Internal/AuthenticationProvider/tvOS/PFFacebookDeviceAuthenticationProvider.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Parse, LLC.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | #import "PFFacebookAuthenticationProvider.h"
13 |
14 | @interface PFFacebookDeviceAuthenticationProvider : PFFacebookAuthenticationProvider
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/Configurations/ParseFacebookTestApplicationV4.xcconfig:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2015-present, Parse, LLC.
3 | // All rights reserved.
4 | //
5 | // This source code is licensed under the BSD-style license found in the
6 | // LICENSE file in the root directory of this source tree. An additional grant
7 | // of patent rights can be found in the PATENTS file in the same directory.
8 | //
9 |
10 | #include "Shared/Platform/iOS.xcconfig"
11 | #include "Shared/Product/Application.xcconfig"
12 |
13 | PRODUCT_NAME = ParseFacebookTestApplicationV4
14 | PRODUCT_BUNDLE_IDENTIFIER = com.parse.facebookutils-ios.unit.app
15 |
16 | INFOPLIST_FILE = $(SRCROOT)/Tests/TestApplication/Resources/Info.plist
17 |
--------------------------------------------------------------------------------
/Configurations/ParseFacebookUtilsV4-iOS.xcconfig:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2015-present, Parse, LLC.
3 | // All rights reserved.
4 | //
5 | // This source code is licensed under the BSD-style license found in the
6 | // LICENSE file in the root directory of this source tree. An additional grant
7 | // of patent rights can be found in the PATENTS file in the same directory.
8 | //
9 |
10 | #include "Shared/Platform/iOS.xcconfig"
11 | #include "Shared/Product/StaticFramework.xcconfig"
12 |
13 | PRODUCT_NAME = ParseFacebookUtilsV4
14 | PRODUCT_BUNDLE_IDENTIFIER = com.parse.facebookutils-ios
15 |
16 | INFOPLIST_FILE = $(SRCROOT)/Resources/Info-iOS.plist
17 |
18 | FRAMEWORK_SEARCH_PATHS = $(inherited) $(SRCROOT)/Vendor
19 |
--------------------------------------------------------------------------------
/Configurations/ParseFacebookUtilsV4-tvOS.xcconfig:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2015-present, Parse, LLC.
3 | // All rights reserved.
4 | //
5 | // This source code is licensed under the BSD-style license found in the
6 | // LICENSE file in the root directory of this source tree. An additional grant
7 | // of patent rights can be found in the PATENTS file in the same directory.
8 | //
9 |
10 | #include "Shared/Platform/tvOS.xcconfig"
11 | #include "Shared/Product/StaticFramework.xcconfig"
12 |
13 | PRODUCT_NAME = ParseFacebookUtilsV4
14 | PRODUCT_BUNDLE_IDENTIFIER = com.parse.facebookutils-tvos
15 |
16 | INFOPLIST_FILE = $(SRCROOT)/Resources/Info-tvOS.plist
17 |
18 | FRAMEWORK_SEARCH_PATHS = $(inherited) $(SRCROOT)/Vendor/tvOS
19 |
--------------------------------------------------------------------------------
/ParseFacebookUtils/Internal/PFFacebookUtils_Private.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Parse, LLC.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | #import "PFFacebookMobileAuthenticationProvider.h"
13 |
14 | @interface PFFacebookUtils (Private)
15 |
16 | + (PFFacebookMobileAuthenticationProvider *)_authenticationProvider;
17 | + (void)_setAuthenticationProvider:(PFFacebookMobileAuthenticationProvider *)provider;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/ParseFacebookUtils/Internal/AuthenticationProvider/iOS/PFFacebookMobileAuthenticationProvider_Private.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Parse, LLC.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | #import "PFFacebookMobileAuthenticationProvider.h"
13 |
14 | @class FBSDKAccessToken;
15 |
16 | @interface PFFacebookMobileAuthenticationProvider ()
17 |
18 | @property (nonatomic, strong, readwrite) FBSDKLoginManager *loginManager;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/Resources/Info-tvOS.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | ParseFacebookUtilsV4
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | FMWK
15 | CFBundleShortVersionString
16 | 1.11.1
17 | CFBundleSignature
18 | ????
19 | CFBundleVersion
20 | 1.11.1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Tests/Resources/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # [ARCHIVE] ParseFacebookUtils
2 |
3 | # ParseFacebookUtils has moved to [Parse-SDK-iOS-OSX](https://github.com/parse-community/Parse-SDK-iOS-OSX)
4 |
5 | [](https://community.parseplatform.org/c/parse-server)
6 | [](#backers)
7 | [](#sponsors)
8 | 
9 |
10 | ## Migration
11 |
12 | ### CocoaPods
13 |
14 | Update your `Podfile`:
15 |
16 | ```ruby
17 | pod 'Parse/FacebookUtils'
18 | ```
19 | ### Carthage
20 |
21 | Update your `Cartfile`:
22 |
23 | ```
24 | github "ParsePlatform/Parse-SDK-iOS-OSX"
25 | ```
26 |
--------------------------------------------------------------------------------
/ParseFacebookUtils/Internal/AuthenticationProvider/iOS/PFFacebookMobileAuthenticationProvider.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Parse, LLC.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | #import
13 |
14 | #import
15 | #import
16 |
17 | #import "PFFacebookAuthenticationProvider.h"
18 |
19 | @class BFTask<__covariant BFGenericType>;
20 |
21 | NS_ASSUME_NONNULL_BEGIN
22 |
23 | @interface PFFacebookMobileAuthenticationProvider : PFFacebookAuthenticationProvider
24 |
25 | @property (nonatomic, strong, readonly) FBSDKLoginManager *loginManager;
26 |
27 | @end
28 |
29 | NS_ASSUME_NONNULL_END
30 |
--------------------------------------------------------------------------------
/Resources/Info-iOS.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | ParseFacebookUtilsV4
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | FMWK
15 | CFBundleShortVersionString
16 | 1.11.1
17 | CFBundleSignature
18 | ????
19 | CFBundleSupportedPlatforms
20 |
21 | iPhoneSimulator
22 | iPhoneOS
23 |
24 | CFBundleVersion
25 | 1.11.1
26 | MinimumOSVersion
27 | 6.0
28 |
29 |
30 |
--------------------------------------------------------------------------------
/Configurations/ParseFacebookUtilsV4-UnitTests.xcconfig:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2015-present, Parse, LLC.
3 | // All rights reserved.
4 | //
5 | // This source code is licensed under the BSD-style license found in the
6 | // LICENSE file in the root directory of this source tree. An additional grant
7 | // of patent rights can be found in the PATENTS file in the same directory.
8 | //
9 |
10 | #include "Shared/Platform/iOS.xcconfig"
11 | #include "Shared/Product/LogicTests.xcconfig"
12 | #include "Pods/Target Support Files/Pods-ParseFacebookUtilsV4-UnitTests/Pods-ParseFacebookUtilsV4-UnitTests.debug.xcconfig"
13 |
14 | PRODUCT_NAME = ParseFacebookUtilsV4-UnitTests
15 | PRODUCT_BUNDLE_IDENTIFIER = com.parse.facebookutils-ios.unit
16 |
17 | IPHONEOS_DEPLOYMENT_TARGET = 8.0
18 |
19 | FRAMEWORK_SEARCH_PATHS = $(inherited) $(BUILT_PRODUCTS_DIR) $(SRCROOT)/Vendor "$PODS_CONFIGURATION_BUILD_DIR/OCMock"
20 |
21 | INFOPLIST_FILE = $(SRCROOT)/Tests/Resources/Info.plist
22 | TEST_HOST = $(BUILT_PRODUCTS_DIR)/ParseFacebookTestApplicationV4.app/ParseFacebookTestApplicationV4
23 |
--------------------------------------------------------------------------------
/Tests/TestApplication/Classes/main.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Parse, LLC.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | @interface AppDelegate : NSObject
13 |
14 | @end
15 |
16 | @implementation AppDelegate
17 |
18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19 | UIWindow *window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].applicationFrame];
20 | window.rootViewController = [[UIViewController alloc] init];
21 | [window makeKeyAndVisible];
22 | return YES;
23 | }
24 |
25 | @end
26 |
27 | int main(int argc, char * argv[]) {
28 | @autoreleasepool {
29 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | branches:
2 | only:
3 | - master
4 | - master-v3
5 | language: objective-c
6 | os: osx
7 | osx_image: xcode9
8 | env:
9 | global:
10 | - LC_CTYPE=en_US.UTF-8
11 | - LANG=en_US.UTF-8
12 | matrix:
13 | - TEST_TYPE=iOS
14 | - TEST_TYPE=CocoaPods
15 | - TEST_TYPE=Package
16 | install:
17 | - |
18 | bundle install
19 | pod repo update --silent
20 | pod install
21 | script:
22 | - |
23 | if [ "$TEST_TYPE" = iOS ]; then
24 | set -o pipefail
25 | xcodebuild test -workspace ParseFacebookUtils.xcworkspace -sdk iphonesimulator -scheme ParseFacebookUtilsV4-iOS -configuration Debug -destination "platform=iOS Simulator,name=iPhone 6 Plus" GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcpretty
26 | elif [ "$TEST_TYPE" = CocoaPods ]; then
27 | pod lib lint --use-libraries ParseFacebookUtilsV4.podspec
28 | elif [ "$TEST_TYPE" = Package ]; then
29 | bundle exec rake package:frameworks
30 | fi
31 | after_success:
32 | - |
33 | if [ "$TEST_TYPE" = iOS ]; then
34 | bash <(curl -s https://codecov.io/bash)
35 | fi
36 |
--------------------------------------------------------------------------------
/Tests/TestApplication/Resources/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIcons
10 |
11 | CFBundleIcons~ipad
12 |
13 | CFBundleIdentifier
14 | $(PRODUCT_BUNDLE_IDENTIFIER)
15 | CFBundleInfoDictionaryVersion
16 | 6.0
17 | CFBundleName
18 | $(PRODUCT_NAME)
19 | CFBundlePackageType
20 | APPL
21 | CFBundleShortVersionString
22 | 1.0
23 | CFBundleSignature
24 | ????
25 | CFBundleVersion
26 | 1
27 | LSRequiresIPhoneOS
28 |
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/ParseFacebookUtilsV4.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 | s.name = 'ParseFacebookUtilsV4'
3 | s.version = '1.11.2'
4 | s.license = { :type => 'BSD' }
5 | s.homepage = 'http://parseplatform.org/'
6 | s.summary = 'Parse is a complete technology stack to power your app\'s backend.'
7 | s.authors = 'Parse Community'
8 | s.social_media_url = 'https://twitter.com/ParsePlatform'
9 |
10 | s.source = { :git => "https://github.com/ParsePlatform/ParseFacebookUtils-iOS.git", :tag => "v4-#{s.version.to_s}" }
11 |
12 | s.platform = :ios, :tvos
13 | s.ios.deployment_target = '9.0'
14 | s.tvos.deployment_target = '9.0'
15 | s.requires_arc = true
16 |
17 | s.public_header_files = 'ParseFacebookUtils/*.h'
18 | s.source_files = 'ParseFacebookUtils/**/*.{h,m}'
19 |
20 | s.ios.exclude_files = 'ParseFacebookUtils/Internal/AuthenticationProvider/tvOS/**/*.{h,m}'
21 | s.tvos.exclude_files = 'ParseFacebookUtils/Internal/AuthenticationProvider/iOS/**/*.{h,m}'
22 |
23 | s.frameworks = 'AudioToolbox',
24 | 'CFNetwork',
25 | 'CoreGraphics',
26 | 'CoreLocation',
27 | 'QuartzCore',
28 | 'Security',
29 | 'SystemConfiguration'
30 | s.ios.weak_frameworks = 'Accounts',
31 | 'Social'
32 | s.libraries = 'z', 'sqlite3'
33 |
34 | s.dependency 'Bolts/Tasks', '~> 1.9'
35 | s.dependency 'Parse', '~> 1.15.1'
36 | s.dependency 'FBSDKCoreKit', '~> 4.28.0'
37 |
38 | s.ios.dependency 'FBSDKLoginKit', '~> 4.28.0'
39 | s.tvos.dependency 'FBSDKTVOSKit', '~> 4.28.0'
40 | s.tvos.dependency 'FBSDKShareKit', '~> 4.28.0'
41 | end
42 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | BSD License
2 |
3 | For Parse Facebook Utils for iOS software
4 |
5 | Copyright (c) 2015-present, Parse, LLC. All rights reserved.
6 |
7 | Redistribution and use in source and binary forms, with or without modification,
8 | are permitted provided that the following conditions are met:
9 |
10 | * Redistributions of source code must retain the above copyright notice, this
11 | list of conditions and the following disclaimer.
12 |
13 | * Redistributions in binary form must reproduce the above copyright notice,
14 | this list of conditions and the following disclaimer in the documentation
15 | and/or other materials provided with the distribution.
16 |
17 | * Neither the name Parse nor the names of its contributors may be used to
18 | endorse or promote products derived from this software without specific
19 | prior written permission.
20 |
21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
22 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
25 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
28 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 | -----
33 |
34 | As of April 5, 2017, Parse, LLC has transferred this code to the parse-community organization, and will no longer be contributing to or distributing this code.
35 |
--------------------------------------------------------------------------------
/Tests/Other/TestCase/PFFacebookTestCase.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Parse, LLC.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "PFFacebookTestCase.h"
11 |
12 | @implementation PFFacebookTestCase {
13 | NSMutableArray *_mocks;
14 | dispatch_queue_t _mockQueue;
15 | }
16 |
17 | ///--------------------------------------
18 | #pragma mark - XCTestCase
19 | ///--------------------------------------
20 |
21 | - (void)setUp {
22 | [super setUp];
23 |
24 | _mocks = [[NSMutableArray alloc] init];
25 | _mockQueue = dispatch_queue_create("com.parse.tests.mock.queue", DISPATCH_QUEUE_SERIAL);
26 | }
27 |
28 | - (void)tearDown {
29 | dispatch_sync(_mockQueue, ^{
30 | [_mocks makeObjectsPerformSelector:@selector(stopMocking)];
31 | });
32 |
33 | _mocks = nil;
34 | _mockQueue = nil;
35 |
36 | [super tearDown];
37 | }
38 |
39 | ///--------------------------------------
40 | #pragma mark - Helpers
41 | ///--------------------------------------
42 |
43 | - (XCTestExpectation *)currentSelectorTestExpectation {
44 | NSInvocation *invocation = self.invocation;
45 | NSString *selectorName = invocation ? NSStringFromSelector(invocation.selector) : @"testExpectation";
46 | return [self expectationWithDescription:selectorName];
47 | }
48 |
49 | - (void)waitForTestExpectations {
50 | [self waitForExpectationsWithTimeout:10.0 handler:nil];
51 | }
52 |
53 | ///--------------------------------------
54 | #pragma mark - Mock Registration
55 | ///--------------------------------------
56 |
57 | - (void)registerMockObject:(id)mockObject {
58 | dispatch_sync(_mockQueue, ^{
59 | [_mocks addObject:mockObject];
60 | });
61 | }
62 |
63 | @end
64 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Change Log
2 | All notable changes to this project will be documented in this file.
3 |
4 | ---
5 |
6 | ## [ParseFacebookUtils-V4 1.11.1](https://github.com/ParsePlatform/ParseFacebookUtils-iOS/releases/tag/v4-1.11.1) (02/20/2016)
7 |
8 | #### Updated
9 |
10 | - `ParseFacebookUtilsV4` CocoaPod now uses the latest version of Facebook SDK.
11 | [#50](https://github.com/ParsePlatform/ParseFacebookUtils-iOS/pull/50),
12 | [#48](https://github.com/ParsePlatform/ParseFacebookUtils-iOS/pull/48)
13 | by [@nlutsenko](https://github.com/nlutsenko)
14 |
15 | #### Fixed
16 |
17 | - Fixed static analyzer warnings that appeared in Xcode 7.3 beta.
18 | [#51](https://github.com/ParsePlatform/ParseFacebookUtils-iOS/pull/51)
19 | by [@nlutsenko](https://github.com/nlutsenko)
20 |
21 | ## [ParseFacebookUtils-V4 1.11.0](https://github.com/ParsePlatform/ParseFacebookUtils-iOS/releases/tag/v4-1.11.0) (01/07/2016)
22 |
23 | #### New
24 |
25 | - ParseFacebookUtils now requires Xcode 7.0+.
26 | [#38](https://github.com/ParsePlatform/ParseFacebookUtils-iOS/pull/38)
27 | by [@nlutsenko](https://github.com/nlutsenko)
28 |
29 | ## [ParseFacebookUtils-V4 1.10.0](https://github.com/ParsePlatform/ParseFacebookUtils-iOS/releases/tag/v4-1.10.0) (12/14/2015)
30 |
31 | #### New
32 | - ParseFacebookUtils now supports tvOS. #23
33 |
34 | #### Improved
35 | - Updated, cleaned up and improved documentation. #22
36 |
37 | ## [ParseFacebookUtils-V4 1.9.1](https://github.com/ParsePlatform/ParseFacebookUtils-iOS/releases/tag/v4-1.9.1) (11/17/2015)
38 |
39 | #### New
40 | - ParseFacebookUtils now supports Xcode 7.1. #7
41 | - ParseFacebookUtils now depends on FBSDK 4.8+.
42 |
43 | #### Improved
44 | - Removed unused imports. #10
45 |
46 | ## [ParseFacebookUtils-V4 1.9.0](https://github.com/ParsePlatform/ParseFacebookUtils-iOS/releases/tag/v4-1.9.0) (10/08/2015)
47 |
48 | Hello, open source!
49 |
50 | #### Fixed
51 | - Fixed initialization of Facebook Utils blocking the main thread.
52 |
--------------------------------------------------------------------------------
/ParseFacebookUtils/Internal/PFFacebookPrivateUtilities.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Parse, LLC.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 | #import
12 |
13 | #import
14 | #import
15 |
16 | #import
17 |
18 | #import
19 |
20 | NS_ASSUME_NONNULL_BEGIN
21 |
22 | @interface PFFacebookPrivateUtilities : NSObject
23 |
24 | + (UIViewController *)applicationTopViewController;
25 |
26 | ///--------------------------------------
27 | /// @name User Authentication Data
28 | ///--------------------------------------
29 |
30 | + (NSDictionary *)userAuthenticationDataWithFacebookUserId:(NSString *)userId
31 | accessToken:(NSString *)accessToken
32 | expirationDate:(NSDate *)expirationDate;
33 | + (nullable NSDictionary *)userAuthenticationDataFromAccessToken:(FBSDKAccessToken *)token;
34 |
35 | + (nullable FBSDKAccessToken *)facebookAccessTokenFromUserAuthenticationData:(nullable NSDictionary *)authData;
36 |
37 | @end
38 |
39 | @interface BFTask (ParseFacebookUtils)
40 |
41 | - (instancetype)pffb_continueWithMainThreadUserBlock:(PFUserResultBlock)block;
42 | - (instancetype)pffb_continueWithMainThreadBooleanBlock:(PFBooleanResultBlock)block;
43 | - (instancetype)pffb_continueWithMainThreadBlock:(BFContinuationBlock)block;
44 |
45 | @end
46 |
47 | @interface NSError (ParseFacebookUtils)
48 |
49 | + (instancetype)pffb_invalidFacebookSessionError;
50 |
51 | @end
52 |
53 | @interface NSDateFormatter (ParseFacebookUtils)
54 |
55 | + (instancetype)pffb_preciseDateFormatter;
56 |
57 | @end
58 |
59 | NS_ASSUME_NONNULL_END
60 |
--------------------------------------------------------------------------------
/ParseFacebookUtils/Internal/AuthenticationProvider/PFFacebookAuthenticationProvider.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Parse, LLC.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 | #import
12 |
13 | #import
14 |
15 | #import
16 | #import
17 |
18 | NS_ASSUME_NONNULL_BEGIN
19 |
20 | extern NSString *const PFFacebookUserAuthenticationType;
21 |
22 | @interface PFFacebookAuthenticationProvider : NSObject
23 |
24 | ///--------------------------------------
25 | /// @name Init
26 | ///--------------------------------------
27 |
28 | - (instancetype)init NS_UNAVAILABLE;
29 | + (instancetype)new NS_UNAVAILABLE;
30 |
31 | - (instancetype)initWithApplication:(UIApplication *)application
32 | launchOptions:(nullable NSDictionary *)launchOptions NS_DESIGNATED_INITIALIZER;
33 | + (instancetype)providerWithApplication:(UIApplication *)application
34 | launchOptions:(nullable NSDictionary *)launchOptions;;
35 |
36 | ///--------------------------------------
37 | /// @name Authenticate
38 | ///--------------------------------------
39 |
40 | - (BFTask*> *)authenticateAsyncWithReadPermissions:(nullable NSArray *)readPermissions
41 | publishPermissions:(nullable NSArray *)publishPermissions;
42 | - (BFTask*> *)authenticateAsyncWithReadPermissions:(nullable NSArray *)readPermissions
43 | publishPermissions:(nullable NSArray *)publishPermissions
44 | fromViewComtroller:(UIViewController *)viewController;
45 |
46 | @end
47 |
48 | NS_ASSUME_NONNULL_END
49 |
--------------------------------------------------------------------------------
/PATENTS:
--------------------------------------------------------------------------------
1 | Additional Grant of Patent Rights Version 2
2 |
3 | "Software" means the Parse Facebook Utils for iOS software distributed by Parse, LLC.
4 |
5 | Parse, LLC. ("Parse") hereby grants to each recipient of the Software
6 | ("you") a perpetual, worldwide, royalty-free, non-exclusive, irrevocable
7 | (subject to the termination provision below) license under any Necessary
8 | Claims, to make, have made, use, sell, offer to sell, import, and otherwise
9 | transfer the Software. For avoidance of doubt, no license is granted under
10 | Parse’s rights in any patent claims that are infringed by (i) modifications
11 | to the Software made by you or any third party or (ii) the Software in
12 | combination with any software or other technology.
13 |
14 | The license granted hereunder will terminate, automatically and without notice,
15 | if you (or any of your subsidiaries, corporate affiliates or agents) initiate
16 | directly or indirectly, or take a direct financial interest in, any Patent
17 | Assertion: (i) against Parse or any of its subsidiaries or corporate
18 | affiliates, (ii) against any party if such Patent Assertion arises in whole or
19 | in part from any software, technology, product or service of Parse or any of
20 | its subsidiaries or corporate affiliates, or (iii) against any party relating
21 | to the Software. Notwithstanding the foregoing, if Parse or any of its
22 | subsidiaries or corporate affiliates files a lawsuit alleging patent
23 | infringement against you in the first instance, and you respond by filing a
24 | patent infringement counterclaim in that lawsuit against that party that is
25 | unrelated to the Software, the license granted hereunder will not terminate
26 | under section (i) of this paragraph due to such counterclaim.
27 |
28 | A "Necessary Claim" is a claim of a patent owned by Parse that is
29 | necessarily infringed by the Software standing alone.
30 |
31 | A "Patent Assertion" is any lawsuit or other action alleging direct, indirect,
32 | or contributory infringement or inducement to infringe any patent, including a
33 | cross-claim or counterclaim.
34 |
35 | -----
36 |
37 | As of April 5, 2017, Parse, LLC has transferred this code to the parse-community organization, and will no longer be contributing to or distributing this code.
38 |
--------------------------------------------------------------------------------
/Gemfile.lock:
--------------------------------------------------------------------------------
1 | GEM
2 | remote: https://rubygems.org/
3 | specs:
4 | CFPropertyList (2.3.5)
5 | activesupport (4.2.10)
6 | i18n (~> 0.7)
7 | minitest (~> 5.1)
8 | thread_safe (~> 0.3, >= 0.3.4)
9 | tzinfo (~> 1.1)
10 | claide (1.0.2)
11 | cocoapods (1.3.1)
12 | activesupport (>= 4.0.2, < 5)
13 | claide (>= 1.0.2, < 2.0)
14 | cocoapods-core (= 1.3.1)
15 | cocoapods-deintegrate (>= 1.0.1, < 2.0)
16 | cocoapods-downloader (>= 1.1.3, < 2.0)
17 | cocoapods-plugins (>= 1.0.0, < 2.0)
18 | cocoapods-search (>= 1.0.0, < 2.0)
19 | cocoapods-stats (>= 1.0.0, < 2.0)
20 | cocoapods-trunk (>= 1.2.0, < 2.0)
21 | cocoapods-try (>= 1.1.0, < 2.0)
22 | colored2 (~> 3.1)
23 | escape (~> 0.0.4)
24 | fourflusher (~> 2.0.1)
25 | gh_inspector (~> 1.0)
26 | molinillo (~> 0.5.7)
27 | nap (~> 1.0)
28 | ruby-macho (~> 1.1)
29 | xcodeproj (>= 1.5.1, < 2.0)
30 | cocoapods-core (1.3.1)
31 | activesupport (>= 4.0.2, < 6)
32 | fuzzy_match (~> 2.0.4)
33 | nap (~> 1.0)
34 | cocoapods-deintegrate (1.0.1)
35 | cocoapods-downloader (1.1.3)
36 | cocoapods-plugins (1.0.0)
37 | nap
38 | cocoapods-search (1.0.0)
39 | cocoapods-stats (1.0.0)
40 | cocoapods-trunk (1.3.0)
41 | nap (>= 0.8, < 2.0)
42 | netrc (~> 0.11)
43 | cocoapods-try (1.1.0)
44 | colored2 (3.1.2)
45 | concurrent-ruby (1.0.5)
46 | escape (0.0.4)
47 | fourflusher (2.0.1)
48 | fuzzy_match (2.0.4)
49 | gh_inspector (1.0.3)
50 | i18n (0.9.0)
51 | concurrent-ruby (~> 1.0)
52 | minitest (5.10.3)
53 | molinillo (0.5.7)
54 | nanaimo (0.2.3)
55 | nap (1.1.0)
56 | naturally (2.1.0)
57 | netrc (0.11.0)
58 | rake (12.1.0)
59 | rouge (2.0.7)
60 | ruby-macho (1.1.0)
61 | thread_safe (0.3.6)
62 | tzinfo (1.2.3)
63 | thread_safe (~> 0.1)
64 | xcodeproj (1.5.2)
65 | CFPropertyList (~> 2.3.3)
66 | claide (>= 1.0.2, < 2.0)
67 | colored2 (~> 3.1)
68 | nanaimo (~> 0.2.3)
69 | xcpretty (0.2.8)
70 | rouge (~> 2.0.7)
71 |
72 | PLATFORMS
73 | ruby
74 |
75 | DEPENDENCIES
76 | cocoapods
77 | naturally
78 | rake
79 | xcpretty
80 |
81 | BUNDLED WITH
82 | 1.15.4
83 |
--------------------------------------------------------------------------------
/Rakefile:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) 2015-present, Parse, LLC.
3 | # All rights reserved.
4 | #
5 | # This source code is licensed under the BSD-style license found in the
6 | # LICENSE file in the root directory of this source tree. An additional grant
7 | # of patent rights can be found in the PATENTS file in the same directory.
8 | #
9 |
10 | require_relative 'Vendor/xctoolchain/Scripts/xctask/build_task'
11 | require_relative 'Vendor/xctoolchain/Scripts/xctask/build_framework_task'
12 |
13 | script_folder = File.expand_path(File.dirname(__FILE__))
14 | build_folder = File.join(script_folder, 'build')
15 | release_folder = File.join(build_folder, 'release')
16 |
17 | xcworkspace_name = 'ParseFacebookUtils.xcworkspace'
18 | framework_name = 'ParseFacebookUtilsV4.framework'
19 |
20 | namespace :build do
21 | desc 'Build iOS framework.'
22 | task :ios do
23 | task = XCTask::BuildFrameworkTask.new do |t|
24 | t.directory = script_folder
25 | t.build_directory = File.join(build_folder, 'iOS')
26 | t.framework_type = XCTask::FrameworkType::IOS
27 | t.framework_name = framework_name
28 |
29 | t.workspace = xcworkspace_name
30 | t.scheme = 'ParseFacebookUtilsV4-iOS'
31 | t.configuration = 'Release'
32 | end
33 | result = task.execute
34 | unless result
35 | puts 'Failed to build iOS Framework.'
36 | exit(1)
37 | end
38 | end
39 |
40 | desc 'Build tvOS framework.'
41 | task :tvos do
42 | task = XCTask::BuildFrameworkTask.new do |t|
43 | t.directory = script_folder
44 | t.build_directory = File.join(build_folder, 'tvOS')
45 | t.framework_type = XCTask::FrameworkType::TVOS
46 | t.framework_name = framework_name
47 |
48 | t.workspace = xcworkspace_name
49 | t.scheme = 'ParseFacebookUtilsV4-tvOS'
50 | t.configuration = 'Release'
51 | end
52 | result = task.execute
53 | unless result
54 | puts 'Failed to build tvOS Framework.'
55 | exit(1)
56 | end
57 | end
58 | end
59 |
60 | namespace :package do
61 | ios_package_name = 'ParseFacebookUtils-iOS.zip'
62 | tvos_package_name = 'ParseFacebookUtils-tvOS.zip'
63 |
64 | desc 'Build and package all frameworks'
65 | task :frameworks do
66 | rm_rf build_folder, :verbose => false
67 | mkdir_p build_folder, :verbose => false
68 |
69 | Rake::Task['build:ios'].invoke
70 | ios_framework_path = File.join(build_folder, 'iOS', framework_name)
71 | make_package(release_folder, [ios_framework_path], ios_package_name)
72 |
73 | Rake::Task['build:tvos'].invoke
74 | tvos_framework_path = File.join(build_folder, 'tvOS', framework_name)
75 | make_package(release_folder, [tvos_framework_path], tvos_package_name)
76 | end
77 |
78 | def make_package(target_path, items, archive_name)
79 | temp_folder = File.join(target_path, 'tmp')
80 | `mkdir -p #{temp_folder}`
81 |
82 | item_list = ''
83 | items.each do |item|
84 | `cp -R #{item} #{temp_folder}`
85 |
86 | file_name = File.basename(item)
87 | item_list << " #{file_name}"
88 | end
89 |
90 | archive_path = File.join(target_path, archive_name)
91 | `cd #{temp_folder}; zip -r --symlinks #{archive_path} #{item_list}`
92 | rm_rf temp_folder
93 | puts "Release archive created: #{File.join(target_path, archive_name)}"
94 | end
95 | end
96 |
--------------------------------------------------------------------------------
/ParseFacebookUtils.xcodeproj/xcshareddata/xcschemes/ParseFacebookUtilsV4-tvOS.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
34 |
35 |
45 |
46 |
52 |
53 |
54 |
55 |
56 |
57 |
63 |
64 |
70 |
71 |
72 |
73 |
75 |
76 |
79 |
80 |
81 |
--------------------------------------------------------------------------------
/Tests/Other/TestCase/PFFacebookTestCase.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Parse, LLC.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | @import XCTest;
13 |
14 | @interface PFFacebookTestCase : XCTestCase
15 |
16 | ///--------------------------------------
17 | /// @name XCTestCase
18 | ///--------------------------------------
19 |
20 | - (void)setUp NS_REQUIRES_SUPER;
21 | - (void)tearDown NS_REQUIRES_SUPER;
22 |
23 | ///--------------------------------------
24 | /// @name Expectations
25 | ///--------------------------------------
26 |
27 | - (XCTestExpectation *)currentSelectorTestExpectation;
28 | - (void)waitForTestExpectations;
29 |
30 | ///--------------------------------------
31 | /// @name Mocks
32 | ///--------------------------------------
33 |
34 | - (void)registerMockObject:(id)mockObject;
35 |
36 | @end
37 |
38 | #define _PFRegisterMock(mockObject) [self registerMockObject:mockObject]
39 | #define _PFMockShim(method, args...) ({ id mock = method(args); _PFRegisterMock(mock); mock; })
40 | #define _PFOCMockWarning _Pragma("GCC warning \"Please use PF mocking methods instead of OCMock ones.\"")
41 |
42 | #define _PFStrictClassMock(kls) [OCMockObject mockForClass:kls]
43 | #define _PFClassMock(kls) [OCMockObject niceMockForClass:kls]
44 | #define _PFStrictProtocolMock(proto) [OCMockObject mockForProtocol:proto]
45 | #define _PFProtocolMock(proto) [OCMockObject niceMockForProtocol:proto]
46 | #define _PFPartialMock(obj) [OCMockObject partialMockForObject:obj]
47 |
48 | #define PFStrictClassMock(...) _PFMockShim(_PFStrictClassMock, __VA_ARGS__)
49 | #define PFClassMock(...) _PFMockShim(_PFClassMock, __VA_ARGS__)
50 | #define PFStrictProtocolMock(...) _PFMockShim(_PFStrictProtocolMock, __VA_ARGS__)
51 | #define PFProtocolMock(...) _PFMockShim(_PFProtocolMock, __VA_ARGS__)
52 | #define PFPartialMock(...) _PFMockShim(_PFPartialMock, __VA_ARGS__)
53 |
54 | #undef OCMStrictClassMock
55 | #undef OCMClassMock
56 | #undef OCMStrictProtocolMock
57 | #undef OCMProtocolMock
58 | #undef OCMPartialMock
59 |
60 | #define OCMStrictClassMock _PFOCMockWarning _PFStrictClassMock
61 | #define OCMClassMock _PFOCMockWarning _PFClassMock
62 | #define OCMStrictProtocolMock _PFOCMockWarning _PFStrictProtocolMock
63 | #define OCMProtocolMock _PFOCMockWarning _PFProtocolMock
64 | #define OCMPartialMock _PFOCMockWarning _PFPartialMock
65 |
66 | #define PFAssertIsKindOfClass(a1, a2, description...) \
67 | XCTAssertTrue([a1 isKindOfClass:[a2 class]], ## description)
68 |
69 | #define PFAssertNotKindOfClass(a1, a2, description...) \
70 | XCTAssertFalse([a1 isKindOfClass:[a2 class]], ## description)
71 |
72 | #define PFAssertThrowsInconsistencyException(expression, ...) \
73 | XCTAssertThrowsSpecificNamed(expression, NSException, NSInternalInconsistencyException, __VA_ARGS__)
74 |
75 | #define PFAssertThrowsInvalidArgumentException(expression, ...) \
76 | XCTAssertThrowsSpecificNamed(expression, NSException, NSInvalidArgumentException, __VA_ARGS__)
77 |
78 | #define PFAssertStringContains(a, b) XCTAssertTrue([(a) rangeOfString:(b)].location != NSNotFound)
79 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | In the interest of fostering an open and welcoming environment, we as
6 | contributors and maintainers pledge to making participation in our project and
7 | our community a harassment-free experience for everyone, regardless of age, body
8 | size, disability, ethnicity, sex characteristics, gender identity and expression,
9 | level of experience, education, socio-economic status, nationality, personal
10 | appearance, race, religion, or sexual identity and orientation.
11 |
12 | ## Our Standards
13 |
14 | Examples of behavior that contributes to creating a positive environment
15 | include:
16 |
17 | * Using welcoming and inclusive language
18 | * Being respectful of differing viewpoints and experiences
19 | * Gracefully accepting constructive criticism
20 | * Focusing on what is best for the community
21 | * Showing empathy towards other community members
22 |
23 | Examples of unacceptable behavior by participants include:
24 |
25 | * The use of sexualized language or imagery and unwelcome sexual attention or
26 | advances
27 | * Trolling, insulting/derogatory comments, and personal or political attacks
28 | * Public or private harassment
29 | * Publishing others' private information, such as a physical or electronic
30 | address, without explicit permission
31 | * Other conduct which could reasonably be considered inappropriate in a
32 | professional setting
33 |
34 | ## Our Responsibilities
35 |
36 | Project maintainers are responsible for clarifying the standards of acceptable
37 | behavior and are expected to take appropriate and fair corrective action in
38 | response to any instances of unacceptable behavior.
39 |
40 | Project maintainers have the right and responsibility to remove, edit, or
41 | reject comments, commits, code, wiki edits, issues, and other contributions
42 | that are not aligned to this Code of Conduct, or to ban temporarily or
43 | permanently any contributor for other behaviors that they deem inappropriate,
44 | threatening, offensive, or harmful.
45 |
46 | ## Scope
47 |
48 | This Code of Conduct applies both within project spaces and in public spaces
49 | when an individual is representing the project or its community. Examples of
50 | representing a project or community include using an official project e-mail
51 | address, posting via an official social media account, or acting as an appointed
52 | representative at an online or offline event. Representation of a project may be
53 | further defined and clarified by project maintainers.
54 |
55 | ## Enforcement
56 |
57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
58 | reported by contacting the project team at codeofconduct@parseplatform.org. All
59 | complaints will be reviewed and investigated and will result in a response that
60 | is deemed necessary and appropriate to the circumstances. The project team is
61 | obligated to maintain confidentiality with regard to the reporter of an incident.
62 | Further details of specific enforcement policies may be posted separately.
63 |
64 | Project maintainers who do not follow or enforce the Code of Conduct in good
65 | faith may face temporary or permanent repercussions as determined by other
66 | members of the project's leadership.
67 |
68 | ## Attribution
69 |
70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72 |
73 | [homepage]: https://www.contributor-covenant.org
74 |
75 | For answers to common questions about this code of conduct, see
76 | https://www.contributor-covenant.org/faq
77 |
--------------------------------------------------------------------------------
/ParseFacebookUtils/Internal/AuthenticationProvider/PFFacebookAuthenticationProvider.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Parse, LLC.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "PFFacebookAuthenticationProvider.h"
11 |
12 | #import
13 | #import
14 |
15 | #import "PFFacebookPrivateUtilities.h"
16 |
17 | NSString *const PFFacebookUserAuthenticationType = @"facebook";
18 |
19 | @implementation PFFacebookAuthenticationProvider
20 |
21 | ///--------------------------------------
22 | #pragma mark - Init
23 | ///--------------------------------------
24 |
25 | - (instancetype)initWithApplication:(UIApplication *)application
26 | launchOptions:(nullable NSDictionary *)launchOptions {
27 | self = [super init];
28 | if (!self) return self;
29 |
30 | [[FBSDKApplicationDelegate sharedInstance] application:[UIApplication sharedApplication]
31 | didFinishLaunchingWithOptions:launchOptions];
32 |
33 | return self;
34 | }
35 |
36 | + (instancetype)providerWithApplication:(UIApplication *)application
37 | launchOptions:(nullable NSDictionary *)launchOptions {
38 | return [[self alloc] initWithApplication:application launchOptions:launchOptions];
39 | }
40 |
41 | ///--------------------------------------
42 | #pragma mark - Authenticate
43 | ///--------------------------------------
44 |
45 | - (BFTask*> *)authenticateAsyncWithReadPermissions:(nullable NSArray *)readPermissions
46 | publishPermissions:(nullable NSArray *)publishPermissions {
47 | return [self authenticateAsyncWithReadPermissions:readPermissions
48 | publishPermissions:publishPermissions
49 | fromViewComtroller:[PFFacebookPrivateUtilities applicationTopViewController]];
50 | }
51 |
52 | - (BFTask*> *)authenticateAsyncWithReadPermissions:(nullable NSArray *)readPermissions
53 | publishPermissions:(nullable NSArray *)publishPermissions
54 | fromViewComtroller:(UIViewController *)viewController {
55 | return [BFTask taskWithError:[NSError pffb_invalidFacebookSessionError]];
56 | }
57 |
58 | ///--------------------------------------
59 | #pragma mark - PFUserAuthenticationDelegate
60 | ///--------------------------------------
61 |
62 | - (BOOL)restoreAuthenticationWithAuthData:(nullable NSDictionary *)authData {
63 | FBSDKAccessToken *token = [PFFacebookPrivateUtilities facebookAccessTokenFromUserAuthenticationData:authData];
64 | if (!token) {
65 | return !authData; // Only deauthenticate if authData was nil, otherwise - return failure (`NO`).
66 | }
67 |
68 | FBSDKAccessToken *currentToken = [FBSDKAccessToken currentAccessToken];
69 | // Do not reset the current token if we have the same token already set.
70 | if (![currentToken.userID isEqualToString:token.userID] ||
71 | ![currentToken.tokenString isEqualToString:token.tokenString]) {
72 | [FBSDKAccessToken setCurrentAccessToken:token];
73 | }
74 |
75 | return YES;
76 | }
77 |
78 | @end
79 |
--------------------------------------------------------------------------------
/ParseFacebookUtils/Internal/AuthenticationProvider/iOS/PFFacebookMobileAuthenticationProvider.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Parse, LLC.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "PFFacebookMobileAuthenticationProvider.h"
11 | #import "PFFacebookMobileAuthenticationProvider_Private.h"
12 |
13 | #import
14 | #import
15 |
16 | #import
17 | #import
18 |
19 | #import
20 |
21 | #import
22 |
23 | #import "PFFacebookPrivateUtilities.h"
24 |
25 | @implementation PFFacebookMobileAuthenticationProvider
26 |
27 | ///--------------------------------------
28 | #pragma mark - Init
29 | ///--------------------------------------
30 |
31 | - (instancetype)initWithApplication:(UIApplication *)application
32 | launchOptions:(nullable NSDictionary *)launchOptions {
33 | self = [super initWithApplication:application launchOptions:launchOptions];
34 | if (!self) return self;
35 |
36 | _loginManager = [[FBSDKLoginManager alloc] init];
37 |
38 | return self;
39 | }
40 |
41 | ///--------------------------------------
42 | #pragma mark - Authenticate
43 | ///--------------------------------------
44 |
45 | - (BFTask*> *)authenticateAsyncWithReadPermissions:(nullable NSArray *)readPermissions
46 | publishPermissions:(nullable NSArray *)publishPermissions
47 | fromViewComtroller:(UIViewController *)viewController {
48 | if (readPermissions && publishPermissions) {
49 | NSString *description = @"Read permissions are not permitted to be requested with publish permissions.";
50 | NSError *error = [NSError errorWithDomain:PFParseErrorDomain
51 | code:kPFErrorFacebookInvalidSession
52 | userInfo:@{ NSLocalizedDescriptionKey: description }];
53 | return [BFTask taskWithError:error];
54 | }
55 |
56 | BFTaskCompletionSource *taskCompletionSource = [BFTaskCompletionSource taskCompletionSource];
57 | FBSDKLoginManagerRequestTokenHandler resultHandler = ^(FBSDKLoginManagerLoginResult *result, NSError *error) {
58 | if (result.isCancelled) {
59 | [taskCompletionSource cancel];
60 | } else if (error) {
61 | taskCompletionSource.error = error;
62 | } else {
63 | taskCompletionSource.result = [PFFacebookPrivateUtilities userAuthenticationDataFromAccessToken:result.token];
64 | }
65 | };
66 | if (publishPermissions) {
67 | [self.loginManager logInWithPublishPermissions:publishPermissions
68 | fromViewController:viewController
69 | handler:resultHandler];
70 | } else {
71 | [self.loginManager logInWithReadPermissions:readPermissions
72 | fromViewController:viewController
73 | handler:resultHandler];
74 | }
75 | return taskCompletionSource.task;
76 | }
77 |
78 | ///--------------------------------------
79 | #pragma mark - PFUserAuthenticationDelegate
80 | ///--------------------------------------
81 |
82 | - (BOOL)restoreAuthenticationWithAuthData:(nullable NSDictionary *)authData {
83 | if (!authData) {
84 | [self.loginManager logOut];
85 | }
86 | return [super restoreAuthenticationWithAuthData:authData];
87 | }
88 |
89 | @end
90 |
--------------------------------------------------------------------------------
/ParseFacebookUtils/Internal/AuthenticationProvider/tvOS/PFFacebookDeviceAuthenticationProvider.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Parse, LLC.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "PFFacebookDeviceAuthenticationProvider.h"
11 |
12 | #import
13 | #import
14 |
15 | #import
16 | #import
17 | #import
18 | #import
19 |
20 | #import "PFFacebookPrivateUtilities.h"
21 |
22 | @interface PFFacebookDeviceAuthenticationProvider () {
23 | BFTaskCompletionSource *_loginTaskCompletionSource;
24 | FBSDKDeviceLoginViewController *_loginViewController;
25 | }
26 |
27 | @end
28 |
29 | @implementation PFFacebookDeviceAuthenticationProvider
30 |
31 | ///--------------------------------------
32 | #pragma mark - PFFacebookAuthenticationProvider
33 | ///--------------------------------------
34 |
35 | - (BFTask*> *)authenticateAsyncWithReadPermissions:(nullable NSArray *)readPermissions
36 | publishPermissions:(nullable NSArray *)publishPermissions
37 | fromViewComtroller:(UIViewController *)viewController {
38 | return [BFTask taskFromExecutor:[BFExecutor mainThreadExecutor] withBlock:^id _Nonnull{
39 | if (_loginTaskCompletionSource) {
40 | return [NSError errorWithDomain:FBSDKErrorDomain
41 | code:FBSDKDialogUnavailableErrorCode
42 | userInfo:@{ NSLocalizedDescriptionKey : @"Another login attempt is already in progress." }];
43 | }
44 | _loginTaskCompletionSource = [BFTaskCompletionSource taskCompletionSource];
45 | _loginViewController = [[FBSDKDeviceLoginViewController alloc] init];
46 | _loginViewController.delegate = self;
47 | _loginViewController.readPermissions = readPermissions;
48 | _loginViewController.publishPermissions = publishPermissions;
49 |
50 | [viewController presentViewController:_loginViewController animated:YES completion:nil];
51 |
52 | return _loginTaskCompletionSource.task;
53 | }];
54 | }
55 |
56 | ///--------------------------------------
57 | #pragma mark - PFUserAuthenticationDelegate
58 | ///--------------------------------------
59 |
60 | - (BOOL)restoreAuthenticationWithAuthData:(nullable NSDictionary *)authData {
61 | if (!authData) {
62 | [FBSDKAccessToken setCurrentAccessToken:nil];
63 | }
64 | return [super restoreAuthenticationWithAuthData:authData];
65 | }
66 |
67 | ///--------------------------------------
68 | #pragma mark - FBSDKDeviceLoginViewController
69 | ///--------------------------------------
70 |
71 | - (void)deviceLoginViewControllerDidCancel:(FBSDKDeviceLoginViewController *)viewController {
72 | [_loginTaskCompletionSource trySetCancelled];
73 | _loginViewController = nil;
74 | _loginTaskCompletionSource = nil;
75 | }
76 |
77 | - (void)deviceLoginViewControllerDidFinish:(FBSDKDeviceLoginViewController *)viewController {
78 | FBSDKAccessToken *accessToken = [FBSDKAccessToken currentAccessToken];
79 | NSDictionary *result = [PFFacebookPrivateUtilities userAuthenticationDataFromAccessToken:accessToken];
80 | [_loginTaskCompletionSource trySetResult:result];
81 | _loginViewController = nil;
82 | _loginTaskCompletionSource = nil;
83 | }
84 |
85 | - (void)deviceLoginViewControllerDidFail:(FBSDKDeviceLoginViewController *)viewController error:(NSError *)error {
86 | [_loginTaskCompletionSource trySetError:error];
87 | _loginViewController = nil;
88 | _loginTaskCompletionSource = nil;
89 | }
90 |
91 | @end
92 |
--------------------------------------------------------------------------------
/ParseFacebookUtils/Internal/PFFacebookPrivateUtilities.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Parse, LLC.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "PFFacebookPrivateUtilities.h"
11 |
12 | #import
13 |
14 | @implementation PFFacebookPrivateUtilities
15 |
16 | + (UIViewController *)applicationTopViewController {
17 | UIViewController *viewController = [UIApplication sharedApplication].keyWindow.rootViewController;
18 | while (viewController.presentedViewController) {
19 | viewController = viewController.presentedViewController;
20 | }
21 | return viewController;
22 | }
23 |
24 | ///--------------------------------------
25 | #pragma mark - User Authentication Data
26 | ///--------------------------------------
27 |
28 | + (NSDictionary *)userAuthenticationDataWithFacebookUserId:(NSString *)userId
29 | accessToken:(NSString *)accessToken
30 | expirationDate:(NSDate *)expirationDate {
31 | return @{ @"id" : userId,
32 | @"access_token" : accessToken,
33 | @"expiration_date" : [[NSDateFormatter pffb_preciseDateFormatter] stringFromDate:expirationDate] };
34 | }
35 |
36 | + (nullable NSDictionary *)userAuthenticationDataFromAccessToken:(FBSDKAccessToken *)token {
37 | if (!token.userID || !token.tokenString || !token.expirationDate) {
38 | return nil;
39 | }
40 |
41 | return [self userAuthenticationDataWithFacebookUserId:token.userID
42 | accessToken:token.tokenString
43 | expirationDate:token.expirationDate];
44 | }
45 |
46 | + (nullable FBSDKAccessToken *)facebookAccessTokenFromUserAuthenticationData:(nullable NSDictionary *)authData {
47 | NSString *accessToken = authData[@"access_token"];
48 | NSString *expirationDateString = authData[@"expiration_date"];
49 | if (!accessToken || !expirationDateString) {
50 | return nil;
51 | }
52 |
53 | NSDate *expirationDate = [[NSDateFormatter pffb_preciseDateFormatter] dateFromString:expirationDateString];
54 | FBSDKAccessToken *token = [[FBSDKAccessToken alloc] initWithTokenString:accessToken
55 | permissions:nil
56 | declinedPermissions:nil
57 | appID:[FBSDKSettings appID]
58 | userID:authData[@"id"]
59 | expirationDate:expirationDate
60 | refreshDate:nil];
61 | return token;
62 | }
63 |
64 | @end
65 |
66 | @implementation BFTask (ParseFacebookUtils)
67 |
68 | - (instancetype)pffb_continueWithMainThreadUserBlock:(PFUserResultBlock)block {
69 | return [self pffb_continueWithMainThreadBlock:^id(BFTask *task) {
70 | if (block) {
71 | block(task.result, task.error);
72 | }
73 | return nil;
74 | }];
75 | }
76 |
77 | - (instancetype)pffb_continueWithMainThreadBooleanBlock:(PFBooleanResultBlock)block {
78 | return [self pffb_continueWithMainThreadBlock:^id(BFTask *task) {
79 | if (block) {
80 | block([task.result boolValue], task.error);
81 | }
82 | return nil;
83 | }];
84 | }
85 |
86 | - (instancetype)pffb_continueWithMainThreadBlock:(BFContinuationBlock)block {
87 | return [self continueWithExecutor:[BFExecutor mainThreadExecutor] withBlock:block];
88 | }
89 |
90 | @end
91 |
92 | @implementation NSError (ParseFacebookUtils)
93 |
94 | + (instancetype)pffb_invalidFacebookSessionError {
95 | return [NSError errorWithDomain:PFParseErrorDomain
96 | code:kPFErrorFacebookInvalidSession
97 | userInfo:@{ NSLocalizedDescriptionKey : @"Supplied access token is missing required data." }];
98 | }
99 |
100 | @end
101 |
102 | @implementation NSDateFormatter (ParseFacebookUtils)
103 |
104 | + (instancetype)pffb_preciseDateFormatter {
105 | NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
106 | formatter.locale = [NSLocale localeWithLocaleIdentifier:@"en_US_POSIX"];
107 | formatter.timeZone = [NSTimeZone timeZoneForSecondsFromGMT:0];
108 | formatter.dateFormat = @"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'";
109 | return formatter;
110 | }
111 |
112 | @end
113 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to Parse Facebook Utils for iOS
2 | We want to make contributing to this project as easy and transparent as possible.
3 |
4 | ## Code of Conduct
5 | Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please read [the full text](https://code.facebook.com/codeofconduct) so that you can understand what actions will and will not be tolerated.
6 |
7 | ## Our Development Process
8 | Most of our work will be done in public directly on GitHub. There may be changes done through our internal source control, but it will be rare and only as needed.
9 |
10 | ## Setup
11 | - Clone the project locally using `git clone`.
12 | - Fetch required submodules by running `git submodule update --init --recursive` in the directory.
13 | - `bundle install` to install necessary RubyGems.
14 | - Run `pod install` to fetch OCMock for testing.
15 |
16 | ### `master` is unsafe
17 | Our goal is to keep `master` stable, but there may be changes that your application may not be compatible with. We'll do our best to publicize any breaking changes, but try to use our specific releases in any production environment.
18 |
19 | ### Pull Requests
20 | We actively welcome your pull requests. When we get one, we'll run some Parse-specific integration tests on it first. From here, we'll need to get a core member to sign off on the changes and then merge the pull request. For API changes we may need to fix internal uses, which could cause some delay. We'll do our best to provide updates and feedback throughout the process.
21 |
22 | 1. Fork the repo and create your branch from `master`.
23 | 4. Add unit tests for any new code you add.
24 | 3. If you've changed APIs, update the documentation.
25 | 4. Ensure the test suite passes.
26 | 5. Make sure your code lints.
27 | 6. If you haven't already, complete the Contributor License Agreement ("CLA").
28 |
29 | ### Contributor License Agreement ("CLA")
30 | In order to accept your pull request, we need you to submit a CLA. You only need to do this once to work on any of Facebook's open source projects.
31 |
32 | Complete your CLA here:
33 |
34 | ## Bugs
35 | Although we try to keep developing on Parse easy, you still may run into some issues. General questions should be asked on [Google Groups][google-group], technical questions should be asked on [Stack Overflow][stack-overflow], and for everything else we'll be using GitHub issues.
36 |
37 | ### Known Issues
38 | We use GitHub issues to track public bugs. We will keep a close eye on this and try to make it clear when we have an internal fix in progress. Before filing a new issue, try to make sure your problem doesn't already exist.
39 |
40 | ### Reporting New Issues
41 | Not all issues are SDK issues. If you're unsure whether your bug is with the SDK or backend, you can test to see if it reproduces with our [REST API][rest-api] and [Parse API Console][parse-api-console]. If it does, you can report backend bugs [here][bug-reports].
42 |
43 | To view the REST API network requests issued by the Parse SDK, please check out our [Network Debugging Tool][network-debugging-tool].
44 |
45 | Details are key. The more information you provide us the easier it'll be for us to debug and the faster you'll receive a fix. Some examples of useful tidbits:
46 |
47 | * A description. What did you expect to happen and what actually happened? Why do you think that was wrong?
48 | * A simple unit test that fails. Refer [here][tests-dir] for examples of existing unit tests. See our [README](README.md#usage) for how to run unit tests. You can submit a pull request with your failing unit test so that our CI verifies that the test fails.
49 | * What version does this reproduce on? What version did it last work on?
50 | * [Stacktrace or GTFO][stacktrace-or-gtfo]. In all honesty, full stacktraces with line numbers make a happy developer.
51 | * Anything else you find relevant.
52 |
53 |
54 | ### Security Bugs
55 | Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe disclosure of security bugs. In those cases, please go through the process outlined on that page and do not file a public issue.
56 |
57 | ## Style Guide
58 | We're still working on providing a code style for your IDE and getting a linter on GitHub, but for now try to keep the following:
59 |
60 | * Most importantly, match the existing code style as much as possible.
61 | * Try to keep lines under 120 characters, if possible.
62 |
63 | ## License
64 | By contributing to Parse Facebook Utils for iOS, you agree that your contributions will be licensed under its license.
65 |
66 | [google-group]: https://groups.google.com/forum/#!forum/parse-developers
67 | [stack-overflow]: http://stackoverflow.com/tags/parse.com
68 | [bug-reports]: https://www.parse.com/help#report
69 | [rest-api]: https://www.parse.com/docs/rest/guide
70 | [parse-api-console]: http://blog.parse.com/announcements/introducing-the-parse-api-console/
71 | [network-debugging-tool]: https://github.com/ParsePlatform/Parse-SDK-iOS-OSX/wiki/Network-Debug-Tool
72 | [stacktrace-or-gtfo]: http://i.imgur.com/jacoj.jpg
73 | [tests-dir]: /Tests/Unit/
74 |
--------------------------------------------------------------------------------
/ParseFacebookUtils.xcodeproj/xcshareddata/xcschemes/ParseFacebookUtilsV4-iOS.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
29 |
35 |
36 |
37 |
43 |
49 |
50 |
51 |
52 |
53 |
59 |
60 |
62 |
68 |
69 |
70 |
71 |
72 |
78 |
79 |
80 |
81 |
82 |
83 |
93 |
94 |
100 |
101 |
102 |
103 |
104 |
105 |
111 |
112 |
118 |
119 |
120 |
121 |
123 |
124 |
127 |
128 |
129 |
--------------------------------------------------------------------------------
/ParseFacebookUtils/PFFacebookUtils.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Parse, LLC.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "PFFacebookUtils.h"
11 |
12 | #import
13 | #import
14 | #import
15 |
16 | #import "PFFacebookPrivateUtilities.h"
17 |
18 | #if TARGET_OS_IOS
19 | #import "PFFacebookMobileAuthenticationProvider.h"
20 | #elif TARGET_OS_TV
21 | #import "PFFacebookDeviceAuthenticationProvider.h"
22 | #endif
23 |
24 | @implementation PFFacebookUtils
25 |
26 | ///--------------------------------------
27 | #pragma mark - Authentication Provider
28 | ///--------------------------------------
29 |
30 | static PFFacebookAuthenticationProvider *authenticationProvider_;
31 |
32 | + (void)_assertFacebookInitialized {
33 | if (!authenticationProvider_) {
34 | [NSException raise:NSInternalInconsistencyException format:@"You must initialize PFFacebookUtils with a call to +initializeFacebookWithApplicationLaunchOptions"];
35 | }
36 | }
37 |
38 | + (PFFacebookAuthenticationProvider *)_authenticationProvider {
39 | return authenticationProvider_;
40 | }
41 |
42 | + (void)_setAuthenticationProvider:(PFFacebookAuthenticationProvider *)provider {
43 | authenticationProvider_ = provider;
44 | }
45 |
46 | ///--------------------------------------
47 | #pragma mark - Interacting With Facebook
48 | ///--------------------------------------
49 |
50 | + (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 | }
55 | if (!authenticationProvider_) {
56 | Class providerClass = nil;
57 | #if TARGET_OS_IOS
58 | providerClass = [PFFacebookMobileAuthenticationProvider class];
59 | #elif TARGET_OS_TV
60 | providerClass = [PFFacebookDeviceAuthenticationProvider class];
61 | #endif
62 | PFFacebookAuthenticationProvider *provider = [providerClass providerWithApplication:[UIApplication sharedApplication]
63 | launchOptions:launchOptions];
64 | [PFUser registerAuthenticationDelegate:provider forAuthType:PFFacebookUserAuthenticationType];
65 |
66 | [self _setAuthenticationProvider:provider];
67 | }
68 | }
69 |
70 | #pragma mark iOS
71 | #if TARGET_OS_IOS
72 |
73 | + (FBSDKLoginManager *)facebookLoginManager {
74 | PFFacebookMobileAuthenticationProvider *provider = (PFFacebookMobileAuthenticationProvider *)[self _authenticationProvider];
75 | return provider.loginManager;
76 | }
77 |
78 | #endif
79 |
80 | ///--------------------------------------
81 | #pragma mark - Logging In
82 | ///--------------------------------------
83 |
84 | + (BFTask *)logInInBackgroundWithReadPermissions:(nullable NSArray *)permissions {
85 | return [self _logInAsyncWithReadPermissions:permissions publishPermissions:nil];
86 | }
87 |
88 | + (void)logInInBackgroundWithReadPermissions:(nullable NSArray *)permissions
89 | block:(nullable PFUserResultBlock)block {
90 | [[self logInInBackgroundWithReadPermissions:permissions] pffb_continueWithMainThreadUserBlock:block];
91 | }
92 |
93 | + (BFTask *)logInInBackgroundWithPublishPermissions:(nullable NSArray *)permissions {
94 | return [self _logInAsyncWithReadPermissions:nil publishPermissions:permissions];
95 | }
96 |
97 | + (void)logInInBackgroundWithPublishPermissions:(nullable NSArray *)permissions
98 | block:(nullable PFUserResultBlock)block {
99 | [[self logInInBackgroundWithPublishPermissions:permissions] pffb_continueWithMainThreadUserBlock:block];
100 | }
101 |
102 | + (BFTask *)_logInAsyncWithReadPermissions:(NSArray *)readPermissions
103 | publishPermissions:(NSArray *)publishPermissions {
104 | [self _assertFacebookInitialized];
105 |
106 | PFFacebookAuthenticationProvider *provider = [self _authenticationProvider];
107 | return [[provider authenticateAsyncWithReadPermissions:readPermissions
108 | publishPermissions:publishPermissions] continueWithSuccessBlock:^id(BFTask *task) {
109 | return [PFUser logInWithAuthTypeInBackground:PFFacebookUserAuthenticationType authData:task.result];
110 | }];
111 | }
112 |
113 | + (BFTask *)logInInBackgroundWithAccessToken:(FBSDKAccessToken *)accessToken {
114 | [self _assertFacebookInitialized];
115 |
116 | NSDictionary *authData = [PFFacebookPrivateUtilities userAuthenticationDataFromAccessToken:accessToken];
117 | if (!authData) {
118 | return [BFTask taskWithError:[NSError pffb_invalidFacebookSessionError]];
119 | }
120 | return [[PFUser logInWithAuthTypeInBackground:PFFacebookUserAuthenticationType
121 | authData:authData] continueWithSuccessBlock:^id(BFTask *task) {
122 | [FBSDKAccessToken setCurrentAccessToken:accessToken];
123 | return task; // Return the same result.
124 | }];
125 | }
126 |
127 | + (void)logInInBackgroundWithAccessToken:(FBSDKAccessToken *)accessToken
128 | block:(nullable PFUserResultBlock)block {
129 | [[self logInInBackgroundWithAccessToken:accessToken] pffb_continueWithMainThreadUserBlock:block];
130 | }
131 |
132 | ///--------------------------------------
133 | #pragma mark - Linking Users
134 | ///--------------------------------------
135 |
136 | + (BFTask *)linkUserInBackground:(PFUser *)user
137 | withReadPermissions:(nullable NSArray *)permissions {
138 | return [self _linkUserAsync:user withReadPermissions:permissions publishPermissions:nil];
139 | }
140 |
141 | + (void)linkUserInBackground:(PFUser *)user
142 | withReadPermissions:(nullable NSArray *)permissions
143 | block:(nullable PFBooleanResultBlock)block {
144 | [[self linkUserInBackground:user withReadPermissions:permissions] pffb_continueWithMainThreadBooleanBlock:block];
145 | }
146 |
147 | + (BFTask *)linkUserInBackground:(PFUser *)user
148 | withPublishPermissions:(NSArray *)permissions {
149 | return [self _linkUserAsync:user withReadPermissions:nil publishPermissions:permissions];
150 | }
151 |
152 | + (void)linkUserInBackground:(PFUser *)user
153 | withPublishPermissions:(NSArray *)permissions
154 | block:(nullable PFBooleanResultBlock)block {
155 | [[self linkUserInBackground:user withPublishPermissions:permissions] pffb_continueWithMainThreadBooleanBlock:block];
156 | }
157 |
158 | + (BFTask *)linkUserInBackground:(PFUser *)user withAccessToken:(FBSDKAccessToken *)accessToken {
159 | [self _assertFacebookInitialized];
160 |
161 | NSDictionary *authData = [PFFacebookPrivateUtilities userAuthenticationDataFromAccessToken:accessToken];
162 | if (!authData) {
163 | return [BFTask taskWithError:[NSError pffb_invalidFacebookSessionError]];
164 | }
165 | return [user linkWithAuthTypeInBackground:PFFacebookUserAuthenticationType authData:authData];
166 | }
167 |
168 | + (void)linkUserInBackground:(PFUser *)user
169 | withAccessToken:(FBSDKAccessToken *)accessToken
170 | block:(nullable PFBooleanResultBlock)block {
171 | [[self linkUserInBackground:user withAccessToken:accessToken] pffb_continueWithMainThreadBooleanBlock:block];
172 | }
173 |
174 | + (BFTask *)_linkUserAsync:(PFUser *)user
175 | withReadPermissions:(nullable NSArray *)readPermissions
176 | publishPermissions:(nullable NSArray *)publishPermissions {
177 | [self _assertFacebookInitialized];
178 |
179 | PFFacebookAuthenticationProvider *authenticationProvider = [self _authenticationProvider];
180 | return [[authenticationProvider authenticateAsyncWithReadPermissions:readPermissions
181 | publishPermissions:publishPermissions] continueWithSuccessBlock:^id(BFTask *task) {
182 | return [user linkWithAuthTypeInBackground:PFFacebookUserAuthenticationType authData:task.result];
183 | }];
184 | }
185 |
186 | ///--------------------------------------
187 | #pragma mark - Unlinking
188 | ///--------------------------------------
189 |
190 | + (BFTask *)unlinkUserInBackground:(PFUser *)user {
191 | [self _assertFacebookInitialized];
192 | return [user unlinkWithAuthTypeInBackground:PFFacebookUserAuthenticationType];
193 | }
194 |
195 | + (void)unlinkUserInBackground:(PFUser *)user block:(nullable PFBooleanResultBlock)block {
196 | [[self unlinkUserInBackground:user] pffb_continueWithMainThreadBooleanBlock:block];
197 | }
198 |
199 | ///--------------------------------------
200 | #pragma mark - Getting Linked State
201 | ///--------------------------------------
202 |
203 | + (BOOL)isLinkedWithUser:(PFUser *)user {
204 | return [user isLinkedWithAuthType:PFFacebookUserAuthenticationType];
205 | }
206 |
207 | @end
208 |
--------------------------------------------------------------------------------
/ParseFacebookUtils/PFFacebookUtils.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Parse, LLC.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | #import
13 |
14 | #import
15 | #import
16 |
17 | #import
18 |
19 | #if TARGET_OS_IOS
20 | #import
21 | #endif
22 |
23 | NS_ASSUME_NONNULL_BEGIN
24 |
25 | /**
26 | The `PFFacebookUtils` class provides utility functions for using Facebook authentication with `PFUser`s.
27 |
28 | @warning This class supports official Facebook iOS SDK v4.0+ and is available only on iOS.
29 | */
30 | @interface PFFacebookUtils : NSObject
31 |
32 | ///--------------------------------------
33 | /// @name Interacting With Facebook
34 | ///--------------------------------------
35 |
36 | /**
37 | Initializes Parse Facebook Utils.
38 |
39 | You must provide your Facebook application ID as the value for FacebookAppID in your bundle's plist file
40 | as described here: https://developers.facebook.com/docs/getting-started/facebook-sdk-for-ios/
41 |
42 | @warning You must invoke this in order to use the Facebook functionality in Parse.
43 |
44 | @param launchOptions The launchOptions as passed to [UIApplicationDelegate application:didFinishLaunchingWithOptions:].
45 | */
46 | + (void)initializeFacebookWithApplicationLaunchOptions:(nullable NSDictionary *)launchOptions;
47 |
48 | #if TARGET_OS_IOS
49 | /**
50 | `FBSDKLoginManager` provides methods for configuring login behavior, default audience
51 | and managing Facebook Access Token.
52 |
53 | @warning This method is available only on iOS.
54 |
55 | @return An instance of `FBSDKLoginManager` that is used by `PFFacebookUtils`.
56 | */
57 | + (FBSDKLoginManager *)facebookLoginManager;
58 | #endif
59 |
60 | ///--------------------------------------
61 | /// @name Logging In
62 | ///--------------------------------------
63 |
64 | /**
65 | *Asynchronously* logs in a user using Facebook with read permissions.
66 |
67 | This method delegates to the Facebook SDK to authenticate the user,
68 | and then automatically logs in (or creates, in the case where it is a new user) a `PFUser`.
69 |
70 | @param permissions Array of read permissions to use.
71 |
72 | @return The task that has will a have `result` set to `PFUser` if operation succeeds.
73 | */
74 | + (BFTask *)logInInBackgroundWithReadPermissions:(nullable NSArray *)permissions;
75 |
76 | /**
77 | *Asynchronously* logs in a user using Facebook with read permissions.
78 |
79 | This method delegates to the Facebook SDK to authenticate the user,
80 | and then automatically logs in (or creates, in the case where it is a new user) a `PFUser`.
81 |
82 | @param permissions Array of read permissions to use.
83 | @param block The block to execute when the log in completes.
84 | It should have the following signature: `^(PFUser *user, NSError *error)`.
85 | */
86 | + (void)logInInBackgroundWithReadPermissions:(nullable NSArray *)permissions
87 | block:(nullable PFUserResultBlock)block;
88 |
89 | /**
90 | *Asynchronously* logs in a user using Facebook with publish permissions.
91 |
92 | This method delegates to the Facebook SDK to authenticate the user,
93 | and then automatically logs in (or creates, in the case where it is a new user) a `PFUser`.
94 |
95 | @param permissions Array of publish permissions to use.
96 |
97 | @return The task that has will a have `result` set to `PFUser` if operation succeeds.
98 | */
99 | + (BFTask *)logInInBackgroundWithPublishPermissions:(nullable NSArray *)permissions;
100 |
101 | /**
102 | *Asynchronously* logs in a user using Facebook with publish permissions.
103 |
104 | This method delegates to the Facebook SDK to authenticate the user,
105 | and then automatically logs in (or creates, in the case where it is a new user) a `PFUser`.
106 |
107 | @param permissions Array of publish permissions to use.
108 | @param block The block to execute when the log in completes.
109 | It should have the following signature: `^(PFUser *user, NSError *error)`.
110 | */
111 | + (void)logInInBackgroundWithPublishPermissions:(nullable NSArray *)permissions
112 | block:(nullable PFUserResultBlock)block;
113 |
114 | /**
115 | *Asynchronously* logs in a user using given Facebook Acess Token.
116 |
117 | This method delegates to the Facebook SDK to authenticate the user,
118 | and then automatically logs in (or creates, in the case where it is a new user) a `PFUser`.
119 |
120 | @param accessToken An instance of `FBSDKAccessToken` to use when logging in.
121 |
122 | @return The task that has will a have `result` set to `PFUser` if operation succeeds.
123 | */
124 | + (BFTask *)logInInBackgroundWithAccessToken:(FBSDKAccessToken *)accessToken;
125 |
126 | /**
127 | *Asynchronously* logs in a user using given Facebook Acess Token.
128 |
129 | This method delegates to the Facebook SDK to authenticate the user,
130 | and then automatically logs in (or creates, in the case where it is a new user) a `PFUser`.
131 |
132 | @param accessToken An instance of `FBSDKAccessToken` to use when logging in.
133 | @param block The block to execute when the log in completes.
134 | It should have the following signature: `^(PFUser *user, NSError *error)`.
135 | */
136 | + (void)logInInBackgroundWithAccessToken:(FBSDKAccessToken *)accessToken
137 | block:(nullable PFUserResultBlock)block;
138 |
139 | ///--------------------------------------
140 | /// @name Linking Users
141 | ///--------------------------------------
142 |
143 | /**
144 | *Asynchronously* links Facebook with read permissions to an existing `PFUser`.
145 |
146 | This method delegates to the Facebook SDK to authenticate
147 | the user, and then automatically links the account to the `PFUser`.
148 | It will also save any unsaved changes that were made to the `user`.
149 |
150 | @param user User to link to Facebook.
151 | @param permissions Array of read permissions to use when logging in with Facebook.
152 |
153 | @return The task that will have a `result` set to `@YES` if operation succeeds.
154 | */
155 | + (BFTask *)linkUserInBackground:(PFUser *)user
156 | withReadPermissions:(nullable NSArray *)permissions;
157 |
158 | /**
159 | *Asynchronously* links Facebook with read permissions to an existing `PFUser`.
160 |
161 | This method delegates to the Facebook SDK to authenticate
162 | the user, and then automatically links the account to the `PFUser`.
163 | It will also save any unsaved changes that were made to the `user`.
164 |
165 | @param user User to link to Facebook.
166 | @param permissions Array of read permissions to use.
167 | @param block The block to execute when the linking completes.
168 | It should have the following signature: `^(BOOL succeeded, NSError *error)`.
169 | */
170 | + (void)linkUserInBackground:(PFUser *)user
171 | withReadPermissions:(nullable NSArray *)permissions
172 | block:(nullable PFBooleanResultBlock)block;
173 |
174 | /**
175 | *Asynchronously* links Facebook with publish permissions to an existing `PFUser`.
176 |
177 | This method delegates to the Facebook SDK to authenticate
178 | the user, and then automatically links the account to the `PFUser`.
179 | It will also save any unsaved changes that were made to the `user`.
180 |
181 | @param user User to link to Facebook.
182 | @param permissions Array of publish permissions to use.
183 |
184 | @return The task that will have a `result` set to `@YES` if operation succeeds.
185 | */
186 | + (BFTask *)linkUserInBackground:(PFUser *)user
187 | withPublishPermissions:(NSArray *)permissions;
188 |
189 | /**
190 | *Asynchronously* links Facebook with publish permissions to an existing `PFUser`.
191 |
192 | This method delegates to the Facebook SDK to authenticate
193 | the user, and then automatically links the account to the `PFUser`.
194 | It will also save any unsaved changes that were made to the `user`.
195 |
196 | @param user User to link to Facebook.
197 | @param permissions Array of publish permissions to use.
198 | @param block The block to execute when the linking completes.
199 | It should have the following signature: `^(BOOL succeeded, NSError *error)`.
200 | */
201 | + (void)linkUserInBackground:(PFUser *)user
202 | withPublishPermissions:(NSArray *)permissions
203 | block:(nullable PFBooleanResultBlock)block;
204 |
205 | /**
206 | *Asynchronously* links Facebook Access Token to an existing `PFUser`.
207 |
208 | This method delegates to the Facebook SDK to authenticate
209 | the user, and then automatically links the account to the `PFUser`.
210 | It will also save any unsaved changes that were made to the `user`.
211 |
212 | @param user User to link to Facebook.
213 | @param accessToken An instance of `FBSDKAccessToken` to use.
214 |
215 | @return The task that will have a `result` set to `@YES` if operation succeeds.
216 | */
217 | + (BFTask *)linkUserInBackground:(PFUser *)user withAccessToken:(FBSDKAccessToken *)accessToken;
218 |
219 | /**
220 | *Asynchronously* links Facebook Access Token to an existing `PFUser`.
221 |
222 | This method delegates to the Facebook SDK to authenticate
223 | the user, and then automatically links the account to the `PFUser`.
224 | It will also save any unsaved changes that were made to the `user`.
225 |
226 | @param user User to link to Facebook.
227 | @param accessToken An instance of `FBSDKAccessToken` to use.
228 | @param block The block to execute when the linking completes.
229 | It should have the following signature: `^(BOOL succeeded, NSError *error)`.
230 | */
231 | + (void)linkUserInBackground:(PFUser *)user
232 | withAccessToken:(FBSDKAccessToken *)accessToken
233 | block:(nullable PFBooleanResultBlock)block;
234 |
235 | ///--------------------------------------
236 | /// @name Unlinking Users
237 | ///--------------------------------------
238 |
239 | /**
240 | Unlinks the `PFUser` from a Facebook account *asynchronously*.
241 |
242 | @param user User to unlink from Facebook.
243 | @return The task, that encapsulates the work being done.
244 | */
245 | + (BFTask *)unlinkUserInBackground:(PFUser *)user;
246 |
247 | /**
248 | Unlinks the `PFUser` from a Facebook account *asynchronously*.
249 |
250 | @param user User to unlink from Facebook.
251 | @param block The block to execute.
252 | It should have the following argument signature: `^(BOOL succeeded, NSError *error)`.
253 | */
254 | + (void)unlinkUserInBackground:(PFUser *)user block:(nullable PFBooleanResultBlock)block;
255 |
256 | ///--------------------------------------
257 | /// @name Getting Linked State
258 | ///--------------------------------------
259 |
260 | /**
261 | Whether the user has their account linked to Facebook.
262 |
263 | @param user User to check for a facebook link. The user must be logged in on this device.
264 |
265 | @return `YES` if the user has their account linked to Facebook, otherwise `NO`.
266 | */
267 | + (BOOL)isLinkedWithUser:(PFUser *)user;
268 |
269 | @end
270 |
271 | NS_ASSUME_NONNULL_END
272 |
--------------------------------------------------------------------------------
/Tests/Unit/FacebookUtilsTests.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Parse, LLC.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | @import Parse;
11 |
12 | #import
13 |
14 | #import "PFFacebookTestCase.h"
15 | #import "PFFacebookUtils_Private.h"
16 | #import "PFFacebookPrivateUtilities.h"
17 |
18 | ///--------------------------------------
19 | #pragma mark - FacebookUtilsTests
20 | ///--------------------------------------
21 |
22 | @interface FacebookUtilsTests : PFFacebookTestCase
23 |
24 | @end
25 |
26 | @implementation FacebookUtilsTests
27 |
28 | ///--------------------------------------
29 | #pragma mark - XCTestCase
30 | ///--------------------------------------
31 |
32 | - (void)tearDown {
33 | [PFFacebookUtils _setAuthenticationProvider:nil];
34 |
35 | [super tearDown];
36 | }
37 |
38 | ///--------------------------------------
39 | #pragma mark - Helpers
40 | ///--------------------------------------
41 |
42 | - (NSDictionary *)sampleAuthData {
43 | return @{ @"id" : @"fbId",
44 | @"auth_token" : @"token",
45 | @"expiration_date" : @"1970-01-01T00:22:17.000Z" };
46 | }
47 |
48 | ///--------------------------------------
49 | #pragma mark - Tests
50 | ///--------------------------------------
51 |
52 | - (void)testInitialize {
53 | id userMock = PFStrictClassMock([PFUser class]);
54 | OCMExpect(ClassMethod([userMock registerAuthenticationDelegate:[OCMArg checkWithBlock:^BOOL(id obj) {
55 | return (obj != nil);
56 | }] forAuthType:@"facebook"]));
57 |
58 | XCTAssertThrows([PFFacebookUtils unlinkUserInBackground:userMock]);
59 |
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);
65 |
66 | XCTAssertNoThrow([PFFacebookUtils initializeFacebookWithApplicationLaunchOptions:nil]);
67 | XCTAssertNotNil([PFFacebookUtils _authenticationProvider]);
68 | XCTAssertNoThrow([PFFacebookUtils initializeFacebookWithApplicationLaunchOptions:nil]);
69 |
70 | OCMVerifyAll(userMock);
71 | }
72 |
73 | - (void)testLoginManager {
74 | id mockedLoginManager = PFStrictClassMock([FBSDKLoginManager class]);
75 | id mockedAuthProvider = PFStrictClassMock([PFFacebookMobileAuthenticationProvider class]);
76 |
77 | OCMStub([mockedAuthProvider loginManager]).andReturn(mockedLoginManager);
78 |
79 | [PFFacebookUtils _setAuthenticationProvider:mockedAuthProvider];
80 | XCTAssertEqualObjects(mockedLoginManager, [PFFacebookUtils facebookLoginManager]);
81 | }
82 |
83 | - (void)testLoginReadPermissions {
84 | id mockedAuthProvider = PFStrictClassMock([PFFacebookMobileAuthenticationProvider class]);
85 | OCMStub([mockedAuthProvider authenticateAsyncWithReadPermissions:@[ @"read" ] publishPermissions:nil]).andReturn([BFTask taskWithResult:@{}]);
86 | [PFFacebookUtils _setAuthenticationProvider:mockedAuthProvider];
87 |
88 | id userMock = PFStrictClassMock([PFUser class]);
89 | OCMStub(ClassMethod([userMock logInWithAuthTypeInBackground:@"facebook" authData:[OCMArg isNotNil]])).andReturn([BFTask taskWithResult:userMock]);
90 |
91 | XCTestExpectation *taskExpecatation = [self expectationWithDescription:@"task"];
92 | [[PFFacebookUtils logInInBackgroundWithReadPermissions:@[ @"read" ]] continueWithBlock:^id(BFTask *task) {
93 | XCTAssertEqual(task.result, userMock);
94 | [taskExpecatation fulfill];
95 | return nil;
96 | }];
97 | [self waitForTestExpectations];
98 |
99 | XCTestExpectation *blockExpecatation = [self expectationWithDescription:@"block"];
100 | [PFFacebookUtils logInInBackgroundWithReadPermissions:@[ @"read" ] block:^(PFUser *resultUser, NSError *error) {
101 | XCTAssertEqual(resultUser, userMock);
102 | XCTAssertNil(error);
103 | [blockExpecatation fulfill];
104 | }];
105 | [self waitForTestExpectations];
106 | }
107 |
108 | - (void)testLoginWritePermissions {
109 | id mockedAuthProvider = PFStrictClassMock([PFFacebookMobileAuthenticationProvider class]);
110 | OCMStub([mockedAuthProvider authenticateAsyncWithReadPermissions:nil publishPermissions:@[ @"publish" ]]).andReturn([BFTask taskWithResult:@{}]);
111 | [PFFacebookUtils _setAuthenticationProvider:mockedAuthProvider];
112 |
113 | id userMock = PFStrictClassMock([PFUser class]);
114 | OCMStub(ClassMethod([userMock logInWithAuthTypeInBackground:@"facebook" authData:[OCMArg isNotNil]])).andReturn([BFTask taskWithResult:userMock]);
115 |
116 | XCTestExpectation *taskExpecatation = [self expectationWithDescription:@"task"];
117 | [[PFFacebookUtils logInInBackgroundWithPublishPermissions:@[ @"publish" ]] continueWithBlock:^id(BFTask *task) {
118 | XCTAssertEqual(task.result, userMock);
119 | [taskExpecatation fulfill];
120 | return nil;
121 | }];
122 | [self waitForTestExpectations];
123 |
124 | XCTestExpectation *blockExpecatation = [self expectationWithDescription:@"block"];
125 | [PFFacebookUtils logInInBackgroundWithPublishPermissions:@[ @"publish" ] block:^(PFUser *resultUser, NSError *error) {
126 | XCTAssertEqual(resultUser, userMock);
127 | XCTAssertNil(error);
128 | [blockExpecatation fulfill];
129 | }];
130 | [self waitForTestExpectations];
131 | }
132 |
133 | - (void)testLoginWithAccessToken {
134 | id mockedPrivateUtilities = PFStrictClassMock([PFFacebookPrivateUtilities class]);
135 | id mockedAccessToken = PFStrictClassMock([FBSDKAccessToken class]);
136 | id mockedAuthProvider = PFStrictClassMock([PFFacebookMobileAuthenticationProvider class]);
137 | [PFFacebookUtils _setAuthenticationProvider:mockedAuthProvider];
138 |
139 | // NOTE: (richardross) Until we decouple user login with auth data, we can only mock error cases here.
140 | OCMStub(ClassMethod([mockedPrivateUtilities userAuthenticationDataFromAccessToken:mockedAccessToken])).andReturn(nil);
141 |
142 | XCTestExpectation *taskExpectation = [self expectationWithDescription:@"task"];
143 | [[PFFacebookUtils logInInBackgroundWithAccessToken:mockedAccessToken] continueWithBlock:^id(BFTask *task) {
144 | XCTAssertEqualObjects(task.error.domain, PFParseErrorDomain);
145 | XCTAssertEqual(task.error.code, kPFErrorFacebookInvalidSession);
146 | [taskExpectation fulfill];
147 | return nil;
148 | }];
149 | [self waitForTestExpectations];
150 |
151 | XCTestExpectation *blockExpectation = [self expectationWithDescription:@"block"];
152 | [PFFacebookUtils logInInBackgroundWithAccessToken:mockedAccessToken block:^(PFUser *user, NSError *error) {
153 | XCTAssertNil(user);
154 | XCTAssertEqualObjects(error.domain, PFParseErrorDomain);
155 | XCTAssertEqual(error.code, kPFErrorFacebookInvalidSession);
156 | [blockExpectation fulfill];
157 | }];
158 | [self waitForTestExpectations];
159 | }
160 |
161 | - (void)testLinkWithReadPermissions {
162 | id mockedUser = PFStrictClassMock([PFUser class]);
163 | id mockedAuthProvider = PFStrictClassMock([PFFacebookMobileAuthenticationProvider class]);
164 |
165 | OCMStub([mockedAuthProvider authenticateAsyncWithReadPermissions:@[ @"read" ] publishPermissions:nil]).andReturn([BFTask taskWithResult:@{}]);
166 | [PFFacebookUtils _setAuthenticationProvider:mockedAuthProvider];
167 |
168 | OCMStub([mockedUser linkWithAuthTypeInBackground:@"facebook" authData:[OCMArg isNotNil]]).andReturn([BFTask taskWithResult:@YES]);
169 |
170 | XCTestExpectation *taskExpecatation = [self expectationWithDescription:@"task"];
171 | [[PFFacebookUtils linkUserInBackground:mockedUser withReadPermissions:@[ @"read" ]] continueWithBlock:^id(BFTask *task) {
172 | XCTAssertEqualObjects(task.result, @YES);
173 | [taskExpecatation fulfill];
174 | return nil;
175 | }];
176 | [self waitForTestExpectations];
177 |
178 | XCTestExpectation *blockExpectation = [self expectationWithDescription:@"block"];
179 | [PFFacebookUtils linkUserInBackground:mockedUser withReadPermissions:@[ @"read" ] block:^(BOOL result, NSError *error) {
180 | XCTAssertTrue(result);
181 | [blockExpectation fulfill];
182 | }];
183 | [self waitForTestExpectations];
184 | }
185 |
186 | - (void)testLinkWithWritePermissions {
187 | id mockedUser = PFStrictClassMock([PFUser class]);
188 | id mockedAuthProvider = PFStrictClassMock([PFFacebookMobileAuthenticationProvider class]);
189 |
190 | OCMStub([mockedAuthProvider authenticateAsyncWithReadPermissions:nil publishPermissions:@[ @"publish" ]]).andReturn([BFTask taskWithResult:@{}]);
191 | [PFFacebookUtils _setAuthenticationProvider:mockedAuthProvider];
192 | OCMStub([mockedUser linkWithAuthTypeInBackground:@"facebook" authData:[OCMArg isNotNil]]).andReturn([BFTask taskWithResult:@YES]);
193 |
194 | XCTestExpectation *taskExpecation = [self expectationWithDescription:@"task"];
195 | [[PFFacebookUtils linkUserInBackground:mockedUser withPublishPermissions:@[ @"publish" ]] continueWithBlock:^id(BFTask *task) {
196 | XCTAssertEqualObjects(task.result, @YES);
197 | [taskExpecation fulfill];
198 | return nil;
199 | }];
200 | [self waitForTestExpectations];
201 |
202 | XCTestExpectation *blockExpectation = [self expectationWithDescription:@"block"];
203 | [PFFacebookUtils linkUserInBackground:mockedUser withPublishPermissions:@[ @"publish" ] block:^(BOOL result, NSError *error) {
204 | XCTAssertTrue(result);
205 | [blockExpectation fulfill];
206 | }];
207 | [self waitForTestExpectations];
208 | }
209 |
210 | - (void)testLinkWithAccessToken {
211 | id mockedPrivateUtilities = PFStrictClassMock([PFFacebookPrivateUtilities class]);
212 | id mockedAccessToken = PFStrictClassMock([FBSDKAccessToken class]);
213 | id mockedUser = PFStrictClassMock([PFUser class]);
214 | id mockedAuthProvider = PFStrictClassMock([PFFacebookMobileAuthenticationProvider class]);
215 |
216 | NSDictionary *sampleAuthData = [self sampleAuthData];
217 | OCMStub(ClassMethod([mockedPrivateUtilities userAuthenticationDataFromAccessToken:mockedAccessToken])).andReturn(sampleAuthData);
218 |
219 | [PFFacebookUtils _setAuthenticationProvider:mockedAuthProvider];
220 | [OCMStub([mockedUser linkWithAuthTypeInBackground:@"facebook" authData:sampleAuthData]) andReturn:[BFTask taskWithResult:@YES]];
221 |
222 | XCTestExpectation *taskExpecatation = [self expectationWithDescription:@"block"];
223 | [[PFFacebookUtils linkUserInBackground:mockedUser withAccessToken:mockedAccessToken] continueWithBlock:^id(BFTask *task) {
224 | XCTAssertEqualObjects(task.result, @YES);
225 | [taskExpecatation fulfill];
226 | return nil;
227 | }];
228 | [self waitForTestExpectations];
229 |
230 | XCTestExpectation *blockExpectation = [self expectationWithDescription:@"block"];
231 | [PFFacebookUtils linkUserInBackground:mockedUser withAccessToken:mockedAccessToken block:^(BOOL result, NSError *error) {
232 | XCTAssertTrue(result);
233 | [blockExpectation fulfill];
234 | }];
235 | [self waitForTestExpectations];
236 | }
237 |
238 | - (void)testUnlink {
239 | id mockedLinkedUser = PFStrictClassMock([PFUser class]);
240 | id mockedAuthProvider = PFStrictClassMock([PFFacebookMobileAuthenticationProvider class]);
241 |
242 | [PFFacebookUtils _setAuthenticationProvider:mockedAuthProvider];
243 | [OCMStub([mockedLinkedUser unlinkWithAuthTypeInBackground:@"facebook"]) andReturn:[BFTask taskWithResult:@YES]];
244 |
245 | XCTestExpectation *taskExpecatation = [self expectationWithDescription:@"block"];
246 | [[PFFacebookUtils unlinkUserInBackground:mockedLinkedUser] continueWithBlock:^id(BFTask *task) {
247 | XCTAssertEqualObjects(task.result, @YES);
248 | [taskExpecatation fulfill];
249 | return nil;
250 | }];
251 | [self waitForTestExpectations];
252 |
253 | XCTestExpectation *blockExpectation = [self expectationWithDescription:@"block"];
254 | [PFFacebookUtils unlinkUserInBackground:mockedLinkedUser block:^(BOOL result, NSError *error) {
255 | XCTAssertTrue(result);
256 | [blockExpectation fulfill];
257 | }];
258 | [self waitForTestExpectations];
259 | }
260 |
261 | - (void)testIsLinked {
262 | id mockedLinkedUser = PFStrictClassMock([PFUser class]);
263 | id mockedUnlinkedUser = PFStrictClassMock([PFUser class]);
264 |
265 | OCMStub([mockedLinkedUser isLinkedWithAuthType:@"facebook"]).andReturn(YES);
266 | OCMStub([mockedUnlinkedUser isLinkedWithAuthType:@"facebook"]).andReturn(NO);
267 |
268 | XCTAssertTrue([PFFacebookUtils isLinkedWithUser:mockedLinkedUser]);
269 | XCTAssertFalse([PFFacebookUtils isLinkedWithUser:mockedUnlinkedUser]);
270 | }
271 |
272 | @end
273 |
--------------------------------------------------------------------------------
/Tests/Unit/FacebookAuthenticationProviderTests.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Parse, LLC.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | @import Bolts.BFTask;
11 |
12 | @import FBSDKCoreKit.FBSDKAccessToken;
13 | @import FBSDKLoginKit.FBSDKLoginManagerLoginResult;
14 |
15 | #import "PFFacebookMobileAuthenticationProvider_Private.h"
16 | #import "PFFacebookTestCase.h"
17 |
18 | @interface FacebookAuthenticationProviderTests : PFFacebookTestCase
19 |
20 | @end
21 |
22 | @implementation FacebookAuthenticationProviderTests
23 |
24 | - (void)testAuthType {
25 | XCTAssertEqualObjects(PFFacebookUserAuthenticationType, @"facebook");
26 | }
27 |
28 | - (void)testAuthenticateRead {
29 | NSDictionary *expectedAuthData = @{ @"id" : @"fbId",
30 | @"access_token" : @"token",
31 | @"expiration_date" : @"1970-01-01T00:22:17.000Z" };
32 |
33 | id mockedLoginManager = PFStrictClassMock([FBSDKLoginManager class]);
34 |
35 | OCMStub([mockedLoginManager logInWithReadPermissions:@[ @"read" ]
36 | fromViewController:OCMOCK_ANY
37 | handler:OCMOCK_ANY]).andDo(^(NSInvocation *invocation) {
38 | __unsafe_unretained FBSDKLoginManagerRequestTokenHandler handler = nil;
39 | [invocation getArgument:&handler atIndex:4];
40 |
41 | FBSDKAccessToken *token = [[FBSDKAccessToken alloc] initWithTokenString:@"token"
42 | permissions:@[ @"read" ]
43 | declinedPermissions:nil
44 | appID:@"appId"
45 | userID:@"fbId"
46 | expirationDate:[NSDate dateWithTimeIntervalSince1970:1337]
47 | refreshDate:[NSDate dateWithTimeIntervalSince1970:1337]];
48 | FBSDKLoginManagerLoginResult *result = [[FBSDKLoginManagerLoginResult alloc] initWithToken:token
49 | isCancelled:NO
50 | grantedPermissions:[NSSet setWithObject:@"read"]
51 | declinedPermissions:nil];
52 |
53 | handler(result, nil);
54 | });
55 |
56 | PFFacebookMobileAuthenticationProvider *provider = [[PFFacebookMobileAuthenticationProvider alloc] initWithApplication:[UIApplication sharedApplication] launchOptions:nil];
57 | provider.loginManager = mockedLoginManager;
58 |
59 | XCTestExpectation *expectation = [self currentSelectorTestExpectation];
60 | [[provider authenticateAsyncWithReadPermissions:@[ @"read" ]
61 | publishPermissions:nil] continueWithBlock:^id(BFTask *task) {
62 | XCTAssertEqualObjects(task.result, expectedAuthData);
63 | [expectation fulfill];
64 | return nil;
65 | }];
66 | [self waitForTestExpectations];
67 | }
68 |
69 | - (void)testAuthenticatePublish {
70 | NSDictionary *expectedAuthData = @{ @"id" : @"fbId",
71 | @"access_token" : @"token",
72 | @"expiration_date" : @"1970-01-01T00:22:17.000Z" };
73 |
74 | id mockedLoginManager = PFStrictClassMock([FBSDKLoginManager class]);
75 |
76 | OCMStub([mockedLoginManager logInWithPublishPermissions:@[ @"publish" ]
77 | fromViewController:OCMOCK_ANY
78 | handler:OCMOCK_ANY]).andDo(^(NSInvocation *invocation) {
79 | __unsafe_unretained FBSDKLoginManagerRequestTokenHandler handler = nil;
80 | [invocation getArgument:&handler atIndex:4];
81 |
82 | FBSDKAccessToken *token = [[FBSDKAccessToken alloc] initWithTokenString:@"token"
83 | permissions:@[ @"publish" ]
84 | declinedPermissions:nil
85 | appID:@"appId"
86 | userID:@"fbId"
87 | expirationDate:[NSDate dateWithTimeIntervalSince1970:1337]
88 | refreshDate:[NSDate dateWithTimeIntervalSince1970:1337]];
89 | FBSDKLoginManagerLoginResult *result = [[FBSDKLoginManagerLoginResult alloc] initWithToken:token
90 | isCancelled:NO
91 | grantedPermissions:[NSSet setWithObject:@"publish"]
92 | declinedPermissions:nil];
93 |
94 | handler(result, nil);
95 | });
96 |
97 | PFFacebookMobileAuthenticationProvider *provider = [[PFFacebookMobileAuthenticationProvider alloc] initWithApplication:[UIApplication sharedApplication] launchOptions:nil];
98 | provider.loginManager = mockedLoginManager;
99 |
100 | XCTestExpectation *expectation = [self currentSelectorTestExpectation];
101 | [[provider authenticateAsyncWithReadPermissions:nil
102 | publishPermissions:@[ @"publish" ]] continueWithBlock:^id(BFTask *task) {
103 | XCTAssertEqualObjects(task.result, expectedAuthData);
104 | [expectation fulfill];
105 | return nil;
106 | }];
107 | [self waitForTestExpectations];
108 | }
109 |
110 | - (void)testAuthenticateBoth {
111 | id mockedLoginManager = PFStrictClassMock([FBSDKLoginManager class]);
112 |
113 | PFFacebookMobileAuthenticationProvider *provider = [[PFFacebookMobileAuthenticationProvider alloc] initWithApplication:[UIApplication sharedApplication] launchOptions:nil];
114 | provider.loginManager = mockedLoginManager;
115 |
116 | XCTestExpectation *expectation = [self currentSelectorTestExpectation];
117 | [[provider authenticateAsyncWithReadPermissions:@[ @"read" ] publishPermissions:@[ @"publish" ]] continueWithBlock:^id(BFTask *task) {
118 | XCTAssertNotNil(task.error);
119 | [expectation fulfill];
120 | return nil;
121 | }];
122 | [self waitForTestExpectations];
123 | }
124 |
125 | - (void)testAuthenticateCancel {
126 | id mockedLoginManager = PFStrictClassMock([FBSDKLoginManager class]);
127 |
128 | OCMStub([mockedLoginManager logInWithPublishPermissions:@[ @"publish" ]
129 | fromViewController:OCMOCK_ANY
130 | handler:OCMOCK_ANY]).andDo(^(NSInvocation *invocation) {
131 | __unsafe_unretained FBSDKLoginManagerRequestTokenHandler handler = nil;
132 | [invocation getArgument:&handler atIndex:4];
133 |
134 | FBSDKLoginManagerLoginResult *result = [[FBSDKLoginManagerLoginResult alloc] initWithToken:nil
135 | isCancelled:YES
136 | grantedPermissions:nil
137 | declinedPermissions:[NSSet setWithObject:@"publish"]];
138 |
139 | handler(result, nil);
140 | });
141 |
142 | PFFacebookMobileAuthenticationProvider *provider = [[PFFacebookMobileAuthenticationProvider alloc] initWithApplication:[UIApplication sharedApplication] launchOptions:nil];
143 | provider.loginManager = mockedLoginManager;
144 |
145 | XCTestExpectation *expectation = [self currentSelectorTestExpectation];
146 | [[provider authenticateAsyncWithReadPermissions:nil publishPermissions:@[ @"publish" ]] continueWithBlock:^id(BFTask *task) {
147 | XCTAssertTrue(task.cancelled);
148 | [expectation fulfill];
149 | return nil;
150 | }];
151 | [self waitForTestExpectations];
152 | }
153 |
154 | - (void)testAuthenticateError {
155 | NSError *expectedError = [NSError errorWithDomain:@"FBSDK" code:1337 userInfo:nil];
156 | id mockedLoginManager = PFStrictClassMock([FBSDKLoginManager class]);
157 |
158 | OCMStub([mockedLoginManager logInWithPublishPermissions:@[ @"publish" ]
159 | fromViewController:OCMOCK_ANY
160 | handler:OCMOCK_ANY]).andDo(^(NSInvocation *invocation) {
161 | __unsafe_unretained FBSDKLoginManagerRequestTokenHandler handler = nil;
162 | [invocation getArgument:&handler atIndex:4];
163 |
164 | handler(nil, expectedError);
165 | });
166 |
167 | PFFacebookMobileAuthenticationProvider *provider = [[PFFacebookMobileAuthenticationProvider alloc] initWithApplication:[UIApplication sharedApplication] launchOptions:nil];
168 | provider.loginManager = mockedLoginManager;
169 |
170 | XCTestExpectation *expectation = [self currentSelectorTestExpectation];
171 | [[provider authenticateAsyncWithReadPermissions:nil publishPermissions:@[ @"publish" ]] continueWithBlock:^id(BFTask *task) {
172 | XCTAssertEqualObjects(task.error, expectedError);
173 | [expectation fulfill];
174 | return nil;
175 | }];
176 | [self waitForTestExpectations];
177 | }
178 |
179 | - (void)testAuthenticateInvalidResults {
180 | id mockedLoginManager = PFStrictClassMock([FBSDKLoginManager class]);
181 |
182 | OCMStub([mockedLoginManager logInWithPublishPermissions:@[ @"publish" ]
183 | fromViewController:OCMOCK_ANY
184 | handler:OCMOCK_ANY]).andDo(^(NSInvocation *invocation) {
185 | __unsafe_unretained FBSDKLoginManagerRequestTokenHandler handler = nil;
186 | [invocation getArgument:&handler atIndex:4];
187 |
188 | FBSDKAccessToken *token = [[FBSDKAccessToken alloc] initWithTokenString:nil
189 | permissions:@[ @"publish" ]
190 | declinedPermissions:nil
191 | appID:@"appId"
192 | userID:nil
193 | expirationDate:nil
194 | refreshDate:nil];
195 | FBSDKLoginManagerLoginResult *result = [[FBSDKLoginManagerLoginResult alloc] initWithToken:token
196 | isCancelled:NO
197 | grantedPermissions:[NSSet setWithObject:@"publish"]
198 | declinedPermissions:nil];
199 |
200 | handler(result, nil);
201 | });
202 |
203 | PFFacebookMobileAuthenticationProvider *provider = [[PFFacebookMobileAuthenticationProvider alloc] initWithApplication:[UIApplication sharedApplication] launchOptions:nil];
204 | provider.loginManager = mockedLoginManager;
205 |
206 | XCTestExpectation *expectation = [self currentSelectorTestExpectation];
207 | [[provider authenticateAsyncWithReadPermissions:nil publishPermissions:@[ @"publish" ]] continueWithBlock:^id(BFTask *task) {
208 | XCTAssertNil(task.result);
209 | XCTAssertFalse(task.faulted);
210 | [expectation fulfill];
211 | return nil;
212 | }];
213 | [self waitForTestExpectations];
214 | }
215 |
216 | - (void)testReauthenticate {
217 | NSDictionary *authData = @{ @"id" : @"fbId",
218 | @"access_token" : @"token",
219 | @"expiration_date" : @"1970-01-01T00:22:17.000Z" };
220 |
221 | id mockedLoginManager = PFStrictClassMock([FBSDKLoginManager class]);
222 |
223 | PFFacebookMobileAuthenticationProvider *provider = [[PFFacebookMobileAuthenticationProvider alloc] initWithApplication:[UIApplication sharedApplication] launchOptions:nil];
224 | provider.loginManager = mockedLoginManager;
225 |
226 | XCTAssertTrue([provider restoreAuthenticationWithAuthData:authData]);
227 | }
228 |
229 | - (void)testRestoreAuthNil {
230 | id mockedLoginManager = PFStrictClassMock([FBSDKLoginManager class]);
231 | OCMExpect([mockedLoginManager logOut]);
232 |
233 | PFFacebookMobileAuthenticationProvider *provider = [[PFFacebookMobileAuthenticationProvider alloc] initWithApplication:[UIApplication sharedApplication] launchOptions:nil];
234 | provider.loginManager = mockedLoginManager;
235 |
236 | XCTAssertTrue([provider restoreAuthenticationWithAuthData:nil]);
237 |
238 | OCMVerifyAll(mockedLoginManager);
239 | }
240 |
241 | @end
242 |
--------------------------------------------------------------------------------
/ParseFacebookUtils.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 813DFC8A1AB2510300F25A08 /* PFFacebookUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 813DFC841AB2510300F25A08 /* PFFacebookUtils.h */; settings = {ATTRIBUTES = (Public, ); }; };
11 | 813DFC8B1AB2510300F25A08 /* PFFacebookUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 813DFC851AB2510300F25A08 /* PFFacebookUtils.m */; };
12 | 813DFC931AB2515A00F25A08 /* Bolts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 813DFC921AB2515A00F25A08 /* Bolts.framework */; };
13 | 813DFC951AB251F700F25A08 /* Parse.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 813DFC941AB251F700F25A08 /* Parse.framework */; };
14 | 815FC59A1BBF74890006AF6E /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 815FC5971BBF74890006AF6E /* main.m */; };
15 | 81643D771AB79ABD00DD3E65 /* PFFacebookUtils_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 81643D761AB79ABD00DD3E65 /* PFFacebookUtils_Private.h */; };
16 | 81930A3E1BBE1A0600A5E4BB /* PFFacebookTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 81930A3D1BBE1A0600A5E4BB /* PFFacebookTestCase.m */; };
17 | 81B3F22B1AC9CA5300A92677 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 81B3F22A1AC9CA5300A92677 /* Localizable.strings */; };
18 | 81CB98CC1AB7905D00136FA5 /* ParseFacebookUtilsV4.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2AAC07E0554694100DB518D /* ParseFacebookUtilsV4.framework */; };
19 | 81CB98D81AB791FB00136FA5 /* Bolts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 813DFC921AB2515A00F25A08 /* Bolts.framework */; };
20 | 81CB98D91AB7920700136FA5 /* FBSDKCoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 81DA692F1AB25A36008C3B7F /* FBSDKCoreKit.framework */; };
21 | 81CB98DA1AB7920700136FA5 /* FBSDKLoginKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 81DA69301AB25A36008C3B7F /* FBSDKLoginKit.framework */; };
22 | 81CB98DB1AB7920E00136FA5 /* Parse.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 813DFC941AB251F700F25A08 /* Parse.framework */; };
23 | 81CB98DD1AB7921C00136FA5 /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 81CB98DC1AB7921C00136FA5 /* libsqlite3.dylib */; };
24 | 81CB98DF1AB7922600136FA5 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 81CB98DE1AB7922600136FA5 /* AudioToolbox.framework */; };
25 | 81CB98E11AB7922C00136FA5 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 81CB98E01AB7922C00136FA5 /* SystemConfiguration.framework */; };
26 | 81DA69311AB25A36008C3B7F /* FBSDKCoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 81DA692F1AB25A36008C3B7F /* FBSDKCoreKit.framework */; };
27 | 81DA69321AB25A37008C3B7F /* FBSDKLoginKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 81DA69301AB25A36008C3B7F /* FBSDKLoginKit.framework */; };
28 | 81E35FD41BAA6F8400348526 /* PFFacebookPrivateUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 81E35FD21BAA6F8400348526 /* PFFacebookPrivateUtilities.h */; };
29 | 81E35FD51BAA6F8400348526 /* PFFacebookPrivateUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 81E35FD31BAA6F8400348526 /* PFFacebookPrivateUtilities.m */; };
30 | 81EA09C01C178D0600B0F875 /* Bolts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 81EA09BC1C178D0600B0F875 /* Bolts.framework */; };
31 | 81EA09C11C178D0600B0F875 /* FBSDKCoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 81EA09BD1C178D0600B0F875 /* FBSDKCoreKit.framework */; };
32 | 81EA09C21C178D0600B0F875 /* FBSDKTVOSKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 81EA09BE1C178D0600B0F875 /* FBSDKTVOSKit.framework */; };
33 | 81EA09C31C178D0600B0F875 /* Parse.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 81EA09BF1C178D0600B0F875 /* Parse.framework */; };
34 | 81EA09CE1C178DED00B0F875 /* PFFacebookMobileAuthenticationProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 81EA09C61C178DED00B0F875 /* PFFacebookMobileAuthenticationProvider.h */; };
35 | 81EA09D01C178DED00B0F875 /* PFFacebookMobileAuthenticationProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 81EA09C71C178DED00B0F875 /* PFFacebookMobileAuthenticationProvider.m */; };
36 | 81EA09D21C178DED00B0F875 /* PFFacebookMobileAuthenticationProvider_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 81EA09C81C178DED00B0F875 /* PFFacebookMobileAuthenticationProvider_Private.h */; };
37 | 81EA09D41C178DED00B0F875 /* PFFacebookAuthenticationProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 81EA09C91C178DED00B0F875 /* PFFacebookAuthenticationProvider.h */; };
38 | 81EA09D51C178DED00B0F875 /* PFFacebookAuthenticationProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 81EA09C91C178DED00B0F875 /* PFFacebookAuthenticationProvider.h */; };
39 | 81EA09D61C178DED00B0F875 /* PFFacebookAuthenticationProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 81EA09CA1C178DED00B0F875 /* PFFacebookAuthenticationProvider.m */; };
40 | 81EA09D71C178DED00B0F875 /* PFFacebookAuthenticationProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 81EA09CA1C178DED00B0F875 /* PFFacebookAuthenticationProvider.m */; };
41 | 81EA09D91C178DED00B0F875 /* PFFacebookDeviceAuthenticationProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 81EA09CC1C178DED00B0F875 /* PFFacebookDeviceAuthenticationProvider.h */; };
42 | 81EA09DB1C178DED00B0F875 /* PFFacebookDeviceAuthenticationProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 81EA09CD1C178DED00B0F875 /* PFFacebookDeviceAuthenticationProvider.m */; };
43 | 81EDD4B51B58AC7D002F69C0 /* ParseFacebookUtilsV4.h in Headers */ = {isa = PBXBuildFile; fileRef = 81EDD4B41B58AC7D002F69C0 /* ParseFacebookUtilsV4.h */; settings = {ATTRIBUTES = (Public, ); }; };
44 | 81FE7F771C17790400E6BD34 /* PFFacebookUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 813DFC841AB2510300F25A08 /* PFFacebookUtils.h */; settings = {ATTRIBUTES = (Public, ); }; };
45 | 81FE7F781C17790400E6BD34 /* ParseFacebookUtilsV4.h in Headers */ = {isa = PBXBuildFile; fileRef = 81EDD4B41B58AC7D002F69C0 /* ParseFacebookUtilsV4.h */; settings = {ATTRIBUTES = (Public, ); }; };
46 | 81FE7F791C17790400E6BD34 /* PFFacebookPrivateUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 81E35FD21BAA6F8400348526 /* PFFacebookPrivateUtilities.h */; };
47 | 81FE7F7B1C17790400E6BD34 /* PFFacebookUtils_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 81643D761AB79ABD00DD3E65 /* PFFacebookUtils_Private.h */; };
48 | 81FE7F7E1C17790400E6BD34 /* PFFacebookUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 813DFC851AB2510300F25A08 /* PFFacebookUtils.m */; };
49 | 81FE7F801C17790400E6BD34 /* PFFacebookPrivateUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 81E35FD31BAA6F8400348526 /* PFFacebookPrivateUtilities.m */; };
50 | 81FE7F871C17790400E6BD34 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 81B3F22A1AC9CA5300A92677 /* Localizable.strings */; };
51 | F3648F2B62FE91B5B2C740C9 /* Pods_ParseFacebookUtilsV4_UnitTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EE2574ED5D739401DB71A44B /* Pods_ParseFacebookUtilsV4_UnitTests.framework */; };
52 | F5E3229B1B549C2C00E319F9 /* FacebookAuthenticationProviderTests.m in Sources */ = {isa = PBXBuildFile; fileRef = F5E3229A1B549C2C00E319F9 /* FacebookAuthenticationProviderTests.m */; };
53 | F5E3229D1B5583A800E319F9 /* FacebookUtilsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = F5E3229C1B5583A800E319F9 /* FacebookUtilsTests.m */; };
54 | /* End PBXBuildFile section */
55 |
56 | /* Begin PBXContainerItemProxy section */
57 | 81CB98CD1AB7905D00136FA5 /* PBXContainerItemProxy */ = {
58 | isa = PBXContainerItemProxy;
59 | containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
60 | proxyType = 1;
61 | remoteGlobalIDString = D2AAC07D0554694100DB518D;
62 | remoteInfo = "ParseFacebookUtils_v4-iOS";
63 | };
64 | F52CD6191B58311F0051AB86 /* PBXContainerItemProxy */ = {
65 | isa = PBXContainerItemProxy;
66 | containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
67 | proxyType = 1;
68 | remoteGlobalIDString = F535C73A1B54B4A800A7D81E;
69 | remoteInfo = ParseFacebookTestApplicationV4;
70 | };
71 | /* End PBXContainerItemProxy section */
72 |
73 | /* Begin PBXFileReference section */
74 | 8121EA9F1D39862400AC0B02 /* Common.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Common.xcconfig; sourceTree = ""; };
75 | 8121EAA11D39862400AC0B02 /* iOS.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = iOS.xcconfig; sourceTree = ""; };
76 | 8121EAA21D39862400AC0B02 /* macOS.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = macOS.xcconfig; sourceTree = ""; };
77 | 8121EAA31D39862400AC0B02 /* tvOS.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = tvOS.xcconfig; sourceTree = ""; };
78 | 8121EAA41D39862400AC0B02 /* watchOS.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = watchOS.xcconfig; sourceTree = ""; };
79 | 8121EAA61D39862400AC0B02 /* Application.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Application.xcconfig; sourceTree = ""; };
80 | 8121EAA71D39862400AC0B02 /* DynamicFramework.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = DynamicFramework.xcconfig; sourceTree = ""; };
81 | 8121EAA81D39862400AC0B02 /* LogicTests.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = LogicTests.xcconfig; sourceTree = ""; };
82 | 8121EAA91D39862400AC0B02 /* StaticFramework.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = StaticFramework.xcconfig; sourceTree = ""; };
83 | 8121EAAB1D39862400AC0B02 /* Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; };
84 | 8121EAAC1D39862400AC0B02 /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; };
85 | 8121EAAD1D39862400AC0B02 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; };
86 | 813DFC841AB2510300F25A08 /* PFFacebookUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PFFacebookUtils.h; sourceTree = ""; };
87 | 813DFC851AB2510300F25A08 /* PFFacebookUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PFFacebookUtils.m; sourceTree = ""; };
88 | 813DFC921AB2515A00F25A08 /* Bolts.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Bolts.framework; path = Vendor/Bolts.framework; sourceTree = ""; };
89 | 813DFC941AB251F700F25A08 /* Parse.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Parse.framework; sourceTree = BUILT_PRODUCTS_DIR; };
90 | 815FC5971BBF74890006AF6E /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
91 | 815FC5991BBF74890006AF6E /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
92 | 81643D761AB79ABD00DD3E65 /* PFFacebookUtils_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PFFacebookUtils_Private.h; path = Internal/PFFacebookUtils_Private.h; sourceTree = ""; };
93 | 81930A3C1BBE1A0600A5E4BB /* PFFacebookTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PFFacebookTestCase.h; sourceTree = ""; };
94 | 81930A3D1BBE1A0600A5E4BB /* PFFacebookTestCase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PFFacebookTestCase.m; sourceTree = ""; };
95 | 81B3F22A1AC9CA5300A92677 /* Localizable.strings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = Localizable.strings; path = Resources/Localizable.strings; sourceTree = SOURCE_ROOT; };
96 | 81CB98C61AB7905D00136FA5 /* ParseFacebookUtilsV4-UnitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "ParseFacebookUtilsV4-UnitTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
97 | 81CB98DC1AB7921C00136FA5 /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.2.sdk/usr/lib/libsqlite3.dylib; sourceTree = DEVELOPER_DIR; };
98 | 81CB98DE1AB7922600136FA5 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.2.sdk/System/Library/Frameworks/AudioToolbox.framework; sourceTree = DEVELOPER_DIR; };
99 | 81CB98E01AB7922C00136FA5 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.2.sdk/System/Library/Frameworks/SystemConfiguration.framework; sourceTree = DEVELOPER_DIR; };
100 | 81DA692F1AB25A36008C3B7F /* FBSDKCoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FBSDKCoreKit.framework; path = Vendor/FBSDKCoreKit.framework; sourceTree = ""; };
101 | 81DA69301AB25A36008C3B7F /* FBSDKLoginKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FBSDKLoginKit.framework; path = Vendor/FBSDKLoginKit.framework; sourceTree = ""; };
102 | 81E35FD21BAA6F8400348526 /* PFFacebookPrivateUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PFFacebookPrivateUtilities.h; sourceTree = ""; };
103 | 81E35FD31BAA6F8400348526 /* PFFacebookPrivateUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PFFacebookPrivateUtilities.m; sourceTree = ""; };
104 | 81E41FB51C178BA200F5BF3F /* Info-iOS.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info-iOS.plist"; sourceTree = ""; };
105 | 81E41FB61C178BA200F5BF3F /* Info-tvOS.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info-tvOS.plist"; sourceTree = ""; };
106 | 81EA09BC1C178D0600B0F875 /* Bolts.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Bolts.framework; sourceTree = ""; };
107 | 81EA09BD1C178D0600B0F875 /* FBSDKCoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = FBSDKCoreKit.framework; sourceTree = ""; };
108 | 81EA09BE1C178D0600B0F875 /* FBSDKTVOSKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = FBSDKTVOSKit.framework; sourceTree = ""; };
109 | 81EA09BF1C178D0600B0F875 /* Parse.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Parse.framework; sourceTree = ""; };
110 | 81EA09C61C178DED00B0F875 /* PFFacebookMobileAuthenticationProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PFFacebookMobileAuthenticationProvider.h; sourceTree = ""; };
111 | 81EA09C71C178DED00B0F875 /* PFFacebookMobileAuthenticationProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PFFacebookMobileAuthenticationProvider.m; sourceTree = ""; };
112 | 81EA09C81C178DED00B0F875 /* PFFacebookMobileAuthenticationProvider_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PFFacebookMobileAuthenticationProvider_Private.h; sourceTree = ""; };
113 | 81EA09C91C178DED00B0F875 /* PFFacebookAuthenticationProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PFFacebookAuthenticationProvider.h; sourceTree = ""; };
114 | 81EA09CA1C178DED00B0F875 /* PFFacebookAuthenticationProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PFFacebookAuthenticationProvider.m; sourceTree = ""; };
115 | 81EA09CC1C178DED00B0F875 /* PFFacebookDeviceAuthenticationProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PFFacebookDeviceAuthenticationProvider.h; sourceTree = ""; };
116 | 81EA09CD1C178DED00B0F875 /* PFFacebookDeviceAuthenticationProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PFFacebookDeviceAuthenticationProvider.m; sourceTree = ""; };
117 | 81EDD4B41B58AC7D002F69C0 /* ParseFacebookUtilsV4.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParseFacebookUtilsV4.h; sourceTree = ""; };
118 | 81FE7F721C1778FC00E6BD34 /* ParseFacebookUtilsV4-tvOS.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "ParseFacebookUtilsV4-tvOS.xcconfig"; sourceTree = ""; };
119 | 81FE7F8B1C17790400E6BD34 /* ParseFacebookUtilsV4.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ParseFacebookUtilsV4.framework; sourceTree = BUILT_PRODUCTS_DIR; };
120 | D2AAC07E0554694100DB518D /* ParseFacebookUtilsV4.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ParseFacebookUtilsV4.framework; sourceTree = BUILT_PRODUCTS_DIR; };
121 | EE2574ED5D739401DB71A44B /* Pods_ParseFacebookUtilsV4_UnitTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ParseFacebookUtilsV4_UnitTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
122 | F52CD64A1B5838560051AB86 /* ParseFacebookUtilsV4-iOS.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "ParseFacebookUtilsV4-iOS.xcconfig"; sourceTree = ""; };
123 | F52CD64B1B5838620051AB86 /* ParseFacebookUtilsV4-UnitTests.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "ParseFacebookUtilsV4-UnitTests.xcconfig"; sourceTree = ""; };
124 | F52CD64C1B58386F0051AB86 /* ParseFacebookTestApplicationV4.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ParseFacebookTestApplicationV4.xcconfig; sourceTree = ""; };
125 | F535C73B1B54B4A800A7D81E /* ParseFacebookTestApplicationV4.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ParseFacebookTestApplicationV4.app; sourceTree = BUILT_PRODUCTS_DIR; };
126 | F5E3229A1B549C2C00E319F9 /* FacebookAuthenticationProviderTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FacebookAuthenticationProviderTests.m; sourceTree = ""; };
127 | F5E3229C1B5583A800E319F9 /* FacebookUtilsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FacebookUtilsTests.m; sourceTree = ""; };
128 | /* End PBXFileReference section */
129 |
130 | /* Begin PBXFrameworksBuildPhase section */
131 | 81CB98C31AB7905D00136FA5 /* Frameworks */ = {
132 | isa = PBXFrameworksBuildPhase;
133 | buildActionMask = 2147483647;
134 | files = (
135 | 81CB98E11AB7922C00136FA5 /* SystemConfiguration.framework in Frameworks */,
136 | 81CB98DF1AB7922600136FA5 /* AudioToolbox.framework in Frameworks */,
137 | 81CB98DD1AB7921C00136FA5 /* libsqlite3.dylib in Frameworks */,
138 | 81CB98CC1AB7905D00136FA5 /* ParseFacebookUtilsV4.framework in Frameworks */,
139 | 81CB98D81AB791FB00136FA5 /* Bolts.framework in Frameworks */,
140 | 81CB98D91AB7920700136FA5 /* FBSDKCoreKit.framework in Frameworks */,
141 | 81CB98DA1AB7920700136FA5 /* FBSDKLoginKit.framework in Frameworks */,
142 | 81CB98DB1AB7920E00136FA5 /* Parse.framework in Frameworks */,
143 | F3648F2B62FE91B5B2C740C9 /* Pods_ParseFacebookUtilsV4_UnitTests.framework in Frameworks */,
144 | );
145 | runOnlyForDeploymentPostprocessing = 0;
146 | };
147 | 81FE7F811C17790400E6BD34 /* Frameworks */ = {
148 | isa = PBXFrameworksBuildPhase;
149 | buildActionMask = 2147483647;
150 | files = (
151 | 81EA09C01C178D0600B0F875 /* Bolts.framework in Frameworks */,
152 | 81EA09C31C178D0600B0F875 /* Parse.framework in Frameworks */,
153 | 81EA09C11C178D0600B0F875 /* FBSDKCoreKit.framework in Frameworks */,
154 | 81EA09C21C178D0600B0F875 /* FBSDKTVOSKit.framework in Frameworks */,
155 | );
156 | runOnlyForDeploymentPostprocessing = 0;
157 | };
158 | D2AAC07C0554694100DB518D /* Frameworks */ = {
159 | isa = PBXFrameworksBuildPhase;
160 | buildActionMask = 2147483647;
161 | files = (
162 | 813DFC951AB251F700F25A08 /* Parse.framework in Frameworks */,
163 | 81DA69311AB25A36008C3B7F /* FBSDKCoreKit.framework in Frameworks */,
164 | 81DA69321AB25A37008C3B7F /* FBSDKLoginKit.framework in Frameworks */,
165 | 813DFC931AB2515A00F25A08 /* Bolts.framework in Frameworks */,
166 | );
167 | runOnlyForDeploymentPostprocessing = 0;
168 | };
169 | F535C7381B54B4A800A7D81E /* Frameworks */ = {
170 | isa = PBXFrameworksBuildPhase;
171 | buildActionMask = 2147483647;
172 | files = (
173 | );
174 | runOnlyForDeploymentPostprocessing = 0;
175 | };
176 | /* End PBXFrameworksBuildPhase section */
177 |
178 | /* Begin PBXGroup section */
179 | 034768DFFF38A50411DB9C8B /* Products */ = {
180 | isa = PBXGroup;
181 | children = (
182 | D2AAC07E0554694100DB518D /* ParseFacebookUtilsV4.framework */,
183 | 81CB98C61AB7905D00136FA5 /* ParseFacebookUtilsV4-UnitTests.xctest */,
184 | F535C73B1B54B4A800A7D81E /* ParseFacebookTestApplicationV4.app */,
185 | 81FE7F8B1C17790400E6BD34 /* ParseFacebookUtilsV4.framework */,
186 | );
187 | name = Products;
188 | sourceTree = "";
189 | };
190 | 0867D691FE84028FC02AAC07 = {
191 | isa = PBXGroup;
192 | children = (
193 | F52CD63A1B58383C0051AB86 /* Configurations */,
194 | 813DFC7E1AB2510300F25A08 /* ParseFacebookUtilsV4 */,
195 | 813DFC961AB2524C00F25A08 /* Resources */,
196 | 81CB98D21AB7906D00136FA5 /* Tests */,
197 | 0867D69AFE84028FC02AAC07 /* Frameworks */,
198 | 034768DFFF38A50411DB9C8B /* Products */,
199 | 8C6FD7306DE656C87CF08305 /* Pods */,
200 | );
201 | indentWidth = 4;
202 | name = Breakpad;
203 | sourceTree = "";
204 | };
205 | 0867D69AFE84028FC02AAC07 /* Frameworks */ = {
206 | isa = PBXGroup;
207 | children = (
208 | 813DFC8F1AB2513D00F25A08 /* User Frameworks */,
209 | 813DFC8E1AB2513300F25A08 /* System Frameworks */,
210 | EE2574ED5D739401DB71A44B /* Pods_ParseFacebookUtilsV4_UnitTests.framework */,
211 | );
212 | name = Frameworks;
213 | sourceTree = "";
214 | };
215 | 8121EA9E1D39862400AC0B02 /* Shared */ = {
216 | isa = PBXGroup;
217 | children = (
218 | 8121EA9F1D39862400AC0B02 /* Common.xcconfig */,
219 | 8121EAA01D39862400AC0B02 /* Platform */,
220 | 8121EAA51D39862400AC0B02 /* Product */,
221 | 8121EAAA1D39862400AC0B02 /* Project */,
222 | 8121EAAD1D39862400AC0B02 /* Warnings.xcconfig */,
223 | );
224 | path = Shared;
225 | sourceTree = "";
226 | };
227 | 8121EAA01D39862400AC0B02 /* Platform */ = {
228 | isa = PBXGroup;
229 | children = (
230 | 8121EAA11D39862400AC0B02 /* iOS.xcconfig */,
231 | 8121EAA21D39862400AC0B02 /* macOS.xcconfig */,
232 | 8121EAA31D39862400AC0B02 /* tvOS.xcconfig */,
233 | 8121EAA41D39862400AC0B02 /* watchOS.xcconfig */,
234 | );
235 | path = Platform;
236 | sourceTree = "";
237 | };
238 | 8121EAA51D39862400AC0B02 /* Product */ = {
239 | isa = PBXGroup;
240 | children = (
241 | 8121EAA61D39862400AC0B02 /* Application.xcconfig */,
242 | 8121EAA71D39862400AC0B02 /* DynamicFramework.xcconfig */,
243 | 8121EAA81D39862400AC0B02 /* LogicTests.xcconfig */,
244 | 8121EAA91D39862400AC0B02 /* StaticFramework.xcconfig */,
245 | );
246 | path = Product;
247 | sourceTree = "";
248 | };
249 | 8121EAAA1D39862400AC0B02 /* Project */ = {
250 | isa = PBXGroup;
251 | children = (
252 | 8121EAAB1D39862400AC0B02 /* Debug.xcconfig */,
253 | 8121EAAC1D39862400AC0B02 /* Release.xcconfig */,
254 | );
255 | path = Project;
256 | sourceTree = "";
257 | };
258 | 813DFC7E1AB2510300F25A08 /* ParseFacebookUtilsV4 */ = {
259 | isa = PBXGroup;
260 | children = (
261 | 813DFC7F1AB2510300F25A08 /* Internal */,
262 | 81EDD4B41B58AC7D002F69C0 /* ParseFacebookUtilsV4.h */,
263 | 813DFC841AB2510300F25A08 /* PFFacebookUtils.h */,
264 | 81643D761AB79ABD00DD3E65 /* PFFacebookUtils_Private.h */,
265 | 813DFC851AB2510300F25A08 /* PFFacebookUtils.m */,
266 | );
267 | name = ParseFacebookUtilsV4;
268 | path = ParseFacebookUtils;
269 | sourceTree = "";
270 | };
271 | 813DFC7F1AB2510300F25A08 /* Internal */ = {
272 | isa = PBXGroup;
273 | children = (
274 | 81EA09C41C178DED00B0F875 /* AuthenticationProvider */,
275 | 81E35FD21BAA6F8400348526 /* PFFacebookPrivateUtilities.h */,
276 | 81E35FD31BAA6F8400348526 /* PFFacebookPrivateUtilities.m */,
277 | );
278 | path = Internal;
279 | sourceTree = "";
280 | };
281 | 813DFC8E1AB2513300F25A08 /* System Frameworks */ = {
282 | isa = PBXGroup;
283 | children = (
284 | 81CB98E01AB7922C00136FA5 /* SystemConfiguration.framework */,
285 | 81CB98DE1AB7922600136FA5 /* AudioToolbox.framework */,
286 | 81CB98DC1AB7921C00136FA5 /* libsqlite3.dylib */,
287 | );
288 | name = "System Frameworks";
289 | sourceTree = "";
290 | };
291 | 813DFC8F1AB2513D00F25A08 /* User Frameworks */ = {
292 | isa = PBXGroup;
293 | children = (
294 | 81EA09B91C178CEE00B0F875 /* iOS */,
295 | 81EA09BB1C178D0600B0F875 /* tvOS */,
296 | );
297 | name = "User Frameworks";
298 | sourceTree = "";
299 | };
300 | 813DFC961AB2524C00F25A08 /* Resources */ = {
301 | isa = PBXGroup;
302 | children = (
303 | 81E41FB51C178BA200F5BF3F /* Info-iOS.plist */,
304 | 81E41FB61C178BA200F5BF3F /* Info-tvOS.plist */,
305 | 81B3F22A1AC9CA5300A92677 /* Localizable.strings */,
306 | );
307 | path = Resources;
308 | sourceTree = "";
309 | };
310 | 815FC5951BBF74890006AF6E /* TestApplication */ = {
311 | isa = PBXGroup;
312 | children = (
313 | 815FC5961BBF74890006AF6E /* Classes */,
314 | 815FC5981BBF74890006AF6E /* Resources */,
315 | );
316 | path = TestApplication;
317 | sourceTree = "";
318 | };
319 | 815FC5961BBF74890006AF6E /* Classes */ = {
320 | isa = PBXGroup;
321 | children = (
322 | 815FC5971BBF74890006AF6E /* main.m */,
323 | );
324 | path = Classes;
325 | sourceTree = "";
326 | };
327 | 815FC5981BBF74890006AF6E /* Resources */ = {
328 | isa = PBXGroup;
329 | children = (
330 | 815FC5991BBF74890006AF6E /* Info.plist */,
331 | );
332 | path = Resources;
333 | sourceTree = "";
334 | };
335 | 81930A3A1BBE1A0600A5E4BB /* Other */ = {
336 | isa = PBXGroup;
337 | children = (
338 | 81930A3B1BBE1A0600A5E4BB /* TestCase */,
339 | );
340 | path = Other;
341 | sourceTree = "";
342 | };
343 | 81930A3B1BBE1A0600A5E4BB /* TestCase */ = {
344 | isa = PBXGroup;
345 | children = (
346 | 81930A3C1BBE1A0600A5E4BB /* PFFacebookTestCase.h */,
347 | 81930A3D1BBE1A0600A5E4BB /* PFFacebookTestCase.m */,
348 | );
349 | path = TestCase;
350 | sourceTree = "";
351 | };
352 | 81CB98D21AB7906D00136FA5 /* Tests */ = {
353 | isa = PBXGroup;
354 | children = (
355 | F535C7311B54B45400A7D81E /* Unit */,
356 | 81930A3A1BBE1A0600A5E4BB /* Other */,
357 | 815FC5951BBF74890006AF6E /* TestApplication */,
358 | );
359 | path = Tests;
360 | sourceTree = "";
361 | };
362 | 81EA09B91C178CEE00B0F875 /* iOS */ = {
363 | isa = PBXGroup;
364 | children = (
365 | 81DA692F1AB25A36008C3B7F /* FBSDKCoreKit.framework */,
366 | 81DA69301AB25A36008C3B7F /* FBSDKLoginKit.framework */,
367 | 813DFC941AB251F700F25A08 /* Parse.framework */,
368 | 813DFC921AB2515A00F25A08 /* Bolts.framework */,
369 | );
370 | name = iOS;
371 | sourceTree = "";
372 | };
373 | 81EA09BB1C178D0600B0F875 /* tvOS */ = {
374 | isa = PBXGroup;
375 | children = (
376 | 81EA09BC1C178D0600B0F875 /* Bolts.framework */,
377 | 81EA09BF1C178D0600B0F875 /* Parse.framework */,
378 | 81EA09BD1C178D0600B0F875 /* FBSDKCoreKit.framework */,
379 | 81EA09BE1C178D0600B0F875 /* FBSDKTVOSKit.framework */,
380 | );
381 | name = tvOS;
382 | path = Vendor/tvOS;
383 | sourceTree = "";
384 | };
385 | 81EA09C41C178DED00B0F875 /* AuthenticationProvider */ = {
386 | isa = PBXGroup;
387 | children = (
388 | 81EA09C91C178DED00B0F875 /* PFFacebookAuthenticationProvider.h */,
389 | 81EA09CA1C178DED00B0F875 /* PFFacebookAuthenticationProvider.m */,
390 | 81EA09C51C178DED00B0F875 /* iOS */,
391 | 81EA09CB1C178DED00B0F875 /* tvOS */,
392 | );
393 | path = AuthenticationProvider;
394 | sourceTree = "";
395 | };
396 | 81EA09C51C178DED00B0F875 /* iOS */ = {
397 | isa = PBXGroup;
398 | children = (
399 | 81EA09C61C178DED00B0F875 /* PFFacebookMobileAuthenticationProvider.h */,
400 | 81EA09C71C178DED00B0F875 /* PFFacebookMobileAuthenticationProvider.m */,
401 | 81EA09C81C178DED00B0F875 /* PFFacebookMobileAuthenticationProvider_Private.h */,
402 | );
403 | path = iOS;
404 | sourceTree = "";
405 | };
406 | 81EA09CB1C178DED00B0F875 /* tvOS */ = {
407 | isa = PBXGroup;
408 | children = (
409 | 81EA09CC1C178DED00B0F875 /* PFFacebookDeviceAuthenticationProvider.h */,
410 | 81EA09CD1C178DED00B0F875 /* PFFacebookDeviceAuthenticationProvider.m */,
411 | );
412 | path = tvOS;
413 | sourceTree = "";
414 | };
415 | 8C6FD7306DE656C87CF08305 /* Pods */ = {
416 | isa = PBXGroup;
417 | children = (
418 | );
419 | name = Pods;
420 | sourceTree = "";
421 | };
422 | F52CD63A1B58383C0051AB86 /* Configurations */ = {
423 | isa = PBXGroup;
424 | children = (
425 | F52CD64A1B5838560051AB86 /* ParseFacebookUtilsV4-iOS.xcconfig */,
426 | F52CD64B1B5838620051AB86 /* ParseFacebookUtilsV4-UnitTests.xcconfig */,
427 | F52CD64C1B58386F0051AB86 /* ParseFacebookTestApplicationV4.xcconfig */,
428 | 81FE7F721C1778FC00E6BD34 /* ParseFacebookUtilsV4-tvOS.xcconfig */,
429 | 8121EA9E1D39862400AC0B02 /* Shared */,
430 | );
431 | path = Configurations;
432 | sourceTree = "";
433 | };
434 | F535C7311B54B45400A7D81E /* Unit */ = {
435 | isa = PBXGroup;
436 | children = (
437 | F5E3229A1B549C2C00E319F9 /* FacebookAuthenticationProviderTests.m */,
438 | F5E3229C1B5583A800E319F9 /* FacebookUtilsTests.m */,
439 | );
440 | path = Unit;
441 | sourceTree = "";
442 | };
443 | /* End PBXGroup section */
444 |
445 | /* Begin PBXHeadersBuildPhase section */
446 | 81FE7F761C17790400E6BD34 /* Headers */ = {
447 | isa = PBXHeadersBuildPhase;
448 | buildActionMask = 2147483647;
449 | files = (
450 | 81FE7F771C17790400E6BD34 /* PFFacebookUtils.h in Headers */,
451 | 81EA09D91C178DED00B0F875 /* PFFacebookDeviceAuthenticationProvider.h in Headers */,
452 | 81EA09D51C178DED00B0F875 /* PFFacebookAuthenticationProvider.h in Headers */,
453 | 81FE7F781C17790400E6BD34 /* ParseFacebookUtilsV4.h in Headers */,
454 | 81FE7F791C17790400E6BD34 /* PFFacebookPrivateUtilities.h in Headers */,
455 | 81FE7F7B1C17790400E6BD34 /* PFFacebookUtils_Private.h in Headers */,
456 | );
457 | runOnlyForDeploymentPostprocessing = 0;
458 | };
459 | D2AAC07A0554694100DB518D /* Headers */ = {
460 | isa = PBXHeadersBuildPhase;
461 | buildActionMask = 2147483647;
462 | files = (
463 | 813DFC8A1AB2510300F25A08 /* PFFacebookUtils.h in Headers */,
464 | 81EA09D41C178DED00B0F875 /* PFFacebookAuthenticationProvider.h in Headers */,
465 | 81EA09CE1C178DED00B0F875 /* PFFacebookMobileAuthenticationProvider.h in Headers */,
466 | 81EDD4B51B58AC7D002F69C0 /* ParseFacebookUtilsV4.h in Headers */,
467 | 81E35FD41BAA6F8400348526 /* PFFacebookPrivateUtilities.h in Headers */,
468 | 81643D771AB79ABD00DD3E65 /* PFFacebookUtils_Private.h in Headers */,
469 | 81EA09D21C178DED00B0F875 /* PFFacebookMobileAuthenticationProvider_Private.h in Headers */,
470 | );
471 | runOnlyForDeploymentPostprocessing = 0;
472 | };
473 | /* End PBXHeadersBuildPhase section */
474 |
475 | /* Begin PBXNativeTarget section */
476 | 81CB98C51AB7905D00136FA5 /* ParseFacebookUtilsV4-UnitTests */ = {
477 | isa = PBXNativeTarget;
478 | buildConfigurationList = 81CB98D11AB7905D00136FA5 /* Build configuration list for PBXNativeTarget "ParseFacebookUtilsV4-UnitTests" */;
479 | buildPhases = (
480 | 947535AF3D7FE64739018338 /* [CP] Check Pods Manifest.lock */,
481 | 81CB98C21AB7905D00136FA5 /* Sources */,
482 | 81CB98C31AB7905D00136FA5 /* Frameworks */,
483 | 81CB98C41AB7905D00136FA5 /* Resources */,
484 | 59A0049CBA9158822CB055BC /* [CP] Copy Pods Resources */,
485 | A72EB79485B8A201DDE9573A /* [CP] Embed Pods Frameworks */,
486 | );
487 | buildRules = (
488 | );
489 | dependencies = (
490 | F52CD61A1B58311F0051AB86 /* PBXTargetDependency */,
491 | 81CB98CE1AB7905D00136FA5 /* PBXTargetDependency */,
492 | );
493 | name = "ParseFacebookUtilsV4-UnitTests";
494 | productName = "ParseFacebookUtilsV4-Tests";
495 | productReference = 81CB98C61AB7905D00136FA5 /* ParseFacebookUtilsV4-UnitTests.xctest */;
496 | productType = "com.apple.product-type.bundle.unit-test";
497 | };
498 | 81FE7F731C17790400E6BD34 /* ParseFacebookUtilsV4-tvOS */ = {
499 | isa = PBXNativeTarget;
500 | buildConfigurationList = 81FE7F881C17790400E6BD34 /* Build configuration list for PBXNativeTarget "ParseFacebookUtilsV4-tvOS" */;
501 | buildPhases = (
502 | 81FE7F741C17790400E6BD34 /* Fetch latest Dependencies */,
503 | 81FE7F751C17790400E6BD34 /* Generate Localizable Strings */,
504 | 81FE7F761C17790400E6BD34 /* Headers */,
505 | 81FE7F7D1C17790400E6BD34 /* Sources */,
506 | 81FE7F811C17790400E6BD34 /* Frameworks */,
507 | 81FE7F861C17790400E6BD34 /* Resources */,
508 | );
509 | buildRules = (
510 | );
511 | dependencies = (
512 | );
513 | name = "ParseFacebookUtilsV4-tvOS";
514 | productName = Breakpad;
515 | productReference = 81FE7F8B1C17790400E6BD34 /* ParseFacebookUtilsV4.framework */;
516 | productType = "com.apple.product-type.framework";
517 | };
518 | D2AAC07D0554694100DB518D /* ParseFacebookUtilsV4-iOS */ = {
519 | isa = PBXNativeTarget;
520 | buildConfigurationList = 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "ParseFacebookUtilsV4-iOS" */;
521 | buildPhases = (
522 | 81F035FB1BC332C00055BFDE /* Fetch latest Dependencies */,
523 | 81B3F2291AC9CA2600A92677 /* Generate Localizable Strings */,
524 | D2AAC07A0554694100DB518D /* Headers */,
525 | D2AAC07B0554694100DB518D /* Sources */,
526 | D2AAC07C0554694100DB518D /* Frameworks */,
527 | 8139B1341A7BF6B5002BEF84 /* Resources */,
528 | );
529 | buildRules = (
530 | );
531 | dependencies = (
532 | );
533 | name = "ParseFacebookUtilsV4-iOS";
534 | productName = Breakpad;
535 | productReference = D2AAC07E0554694100DB518D /* ParseFacebookUtilsV4.framework */;
536 | productType = "com.apple.product-type.framework";
537 | };
538 | F535C73A1B54B4A800A7D81E /* ParseFacebookTestApplicationV4 */ = {
539 | isa = PBXNativeTarget;
540 | buildConfigurationList = F535C75B1B54B4A800A7D81E /* Build configuration list for PBXNativeTarget "ParseFacebookTestApplicationV4" */;
541 | buildPhases = (
542 | F535C7371B54B4A800A7D81E /* Sources */,
543 | F535C7381B54B4A800A7D81E /* Frameworks */,
544 | F535C7391B54B4A800A7D81E /* Resources */,
545 | );
546 | buildRules = (
547 | );
548 | dependencies = (
549 | );
550 | name = ParseFacebookTestApplicationV4;
551 | productName = ParseFacebookTestApplicationV4;
552 | productReference = F535C73B1B54B4A800A7D81E /* ParseFacebookTestApplicationV4.app */;
553 | productType = "com.apple.product-type.application";
554 | };
555 | /* End PBXNativeTarget section */
556 |
557 | /* Begin PBXProject section */
558 | 0867D690FE84028FC02AAC07 /* Project object */ = {
559 | isa = PBXProject;
560 | attributes = {
561 | CLASSPREFIX = PF;
562 | LastUpgradeCheck = 0730;
563 | ORGANIZATIONNAME = "Parse, LLC";
564 | TargetAttributes = {
565 | 81CB98C51AB7905D00136FA5 = {
566 | CreatedOnToolsVersion = 6.2;
567 | TestTargetID = F535C73A1B54B4A800A7D81E;
568 | };
569 | F535C73A1B54B4A800A7D81E = {
570 | CreatedOnToolsVersion = 6.4;
571 | };
572 | };
573 | };
574 | buildConfigurationList = 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "ParseFacebookUtils" */;
575 | compatibilityVersion = "Xcode 3.2";
576 | developmentRegion = English;
577 | hasScannedForEncodings = 1;
578 | knownRegions = (
579 | English,
580 | Japanese,
581 | French,
582 | German,
583 | da,
584 | de,
585 | es,
586 | fr,
587 | it,
588 | ja,
589 | nl,
590 | no,
591 | sl,
592 | sv,
593 | tr,
594 | en,
595 | Base,
596 | );
597 | mainGroup = 0867D691FE84028FC02AAC07;
598 | productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
599 | projectDirPath = "";
600 | projectRoot = "";
601 | targets = (
602 | D2AAC07D0554694100DB518D /* ParseFacebookUtilsV4-iOS */,
603 | 81CB98C51AB7905D00136FA5 /* ParseFacebookUtilsV4-UnitTests */,
604 | F535C73A1B54B4A800A7D81E /* ParseFacebookTestApplicationV4 */,
605 | 81FE7F731C17790400E6BD34 /* ParseFacebookUtilsV4-tvOS */,
606 | );
607 | };
608 | /* End PBXProject section */
609 |
610 | /* Begin PBXResourcesBuildPhase section */
611 | 8139B1341A7BF6B5002BEF84 /* Resources */ = {
612 | isa = PBXResourcesBuildPhase;
613 | buildActionMask = 2147483647;
614 | files = (
615 | 81B3F22B1AC9CA5300A92677 /* Localizable.strings in Resources */,
616 | );
617 | runOnlyForDeploymentPostprocessing = 0;
618 | };
619 | 81CB98C41AB7905D00136FA5 /* Resources */ = {
620 | isa = PBXResourcesBuildPhase;
621 | buildActionMask = 2147483647;
622 | files = (
623 | );
624 | runOnlyForDeploymentPostprocessing = 0;
625 | };
626 | 81FE7F861C17790400E6BD34 /* Resources */ = {
627 | isa = PBXResourcesBuildPhase;
628 | buildActionMask = 2147483647;
629 | files = (
630 | 81FE7F871C17790400E6BD34 /* Localizable.strings in Resources */,
631 | );
632 | runOnlyForDeploymentPostprocessing = 0;
633 | };
634 | F535C7391B54B4A800A7D81E /* Resources */ = {
635 | isa = PBXResourcesBuildPhase;
636 | buildActionMask = 2147483647;
637 | files = (
638 | );
639 | runOnlyForDeploymentPostprocessing = 0;
640 | };
641 | /* End PBXResourcesBuildPhase section */
642 |
643 | /* Begin PBXShellScriptBuildPhase section */
644 | 59A0049CBA9158822CB055BC /* [CP] Copy Pods Resources */ = {
645 | isa = PBXShellScriptBuildPhase;
646 | buildActionMask = 2147483647;
647 | files = (
648 | );
649 | inputPaths = (
650 | );
651 | name = "[CP] Copy Pods Resources";
652 | outputPaths = (
653 | );
654 | runOnlyForDeploymentPostprocessing = 0;
655 | shellPath = /bin/sh;
656 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ParseFacebookUtilsV4-UnitTests/Pods-ParseFacebookUtilsV4-UnitTests-resources.sh\"\n";
657 | showEnvVarsInLog = 0;
658 | };
659 | 81B3F2291AC9CA2600A92677 /* Generate Localizable Strings */ = {
660 | isa = PBXShellScriptBuildPhase;
661 | buildActionMask = 2147483647;
662 | files = (
663 | );
664 | inputPaths = (
665 | );
666 | name = "Generate Localizable Strings";
667 | outputPaths = (
668 | );
669 | runOnlyForDeploymentPostprocessing = 0;
670 | shellPath = /bin/sh;
671 | shellScript = "# Generate localizable strings\nfind $PROJECT_DIR -name '*.m' -print0 | xargs -0 genstrings -q -o $PROJECT_DIR/Resources\necho \"Finished converting images\"";
672 | };
673 | 81F035FB1BC332C00055BFDE /* Fetch latest Dependencies */ = {
674 | isa = PBXShellScriptBuildPhase;
675 | buildActionMask = 2147483647;
676 | files = (
677 | );
678 | inputPaths = (
679 | );
680 | name = "Fetch latest Dependencies";
681 | outputPaths = (
682 | );
683 | runOnlyForDeploymentPostprocessing = 0;
684 | shellPath = /bin/sh;
685 | shellScript = "if [ ! -d $SRCROOT/Vendor ]; then\n mkdir $SRCROOT/Vendor\nfi\n\ncd $SRCROOT/Vendor\n\nif [[ ! -d \"Parse.framework\" || ! -d \"Bolts.framework\" ]]; then\n ARCHIVE_NAME=Parse-iOS.zip\n\n LATEST_TAG=$(bash -l -c \"bundle exec pod spec cat Parse\" | grep version | head -n 1 | cut -d '\"' -f 4)\n ARCHIVE_URL=\"https://github.com/ParsePlatform/Parse-SDK-iOS-OSX/releases/download/${LATEST_TAG}/${ARCHIVE_NAME}\"\n curl -L $ARCHIVE_URL -o $ARCHIVE_NAME\n\n unzip $ARCHIVE_NAME\n rm $ARCHIVE_NAME\nfi\n\nif [[ ! -d \"FBSDKCoreKit.framework\" || ! -d \"FBSDKLoginKit.framework\" ]]; then\n ARCHIVE_NAME=FBSDK.zip\n\n ARCHIVE_URL=\"https://origincache.facebook.com/developers/resources/?id=facebook-ios-sdk-current.zip\"\n curl $ARCHIVE_URL -o $ARCHIVE_NAME\n\n unzip $ARCHIVE_NAME -d fbsdk\n mv fbsdk/FBSDKCoreKit.framework .\n mv fbsdk/FBSDKLoginKit.framework .\n\n rm $ARCHIVE_NAME\n rm -r fbsdk\nfi\n";
686 | showEnvVarsInLog = 0;
687 | };
688 | 81FE7F741C17790400E6BD34 /* Fetch latest Dependencies */ = {
689 | isa = PBXShellScriptBuildPhase;
690 | buildActionMask = 2147483647;
691 | files = (
692 | );
693 | inputPaths = (
694 | );
695 | name = "Fetch latest Dependencies";
696 | outputPaths = (
697 | );
698 | runOnlyForDeploymentPostprocessing = 0;
699 | shellPath = /bin/sh;
700 | shellScript = "if [ ! -d $SRCROOT/Vendor/tvOS ]; then\n mkdir $SRCROOT/Vendor/tvOS\nfi\n\ncd $SRCROOT/Vendor/tvOS\n\nif [[ ! -d \"Parse.framework\" || ! -d \"Bolts.framework\" ]]; then\n ARCHIVE_NAME=Parse-tvOS.zip\n\n LATEST_TAG=$(bash -l -c \"bundle exec pod spec cat Parse\" | grep version | head -n 1 | cut -d '\"' -f 4)\n ARCHIVE_URL=\"https://github.com/ParsePlatform/Parse-SDK-iOS-OSX/releases/download/${LATEST_TAG}/${ARCHIVE_NAME}\"\n curl -L $ARCHIVE_URL -o $ARCHIVE_NAME\n\n unzip $ARCHIVE_NAME\n rm $ARCHIVE_NAME\nfi\n\nif [[ ! -d \"FBSDKCoreKit.framework\" || ! -d \"FBSDKTVOSKit.framework\" ]]; then\n ARCHIVE_NAME=FBSDK.zip\n\n ARCHIVE_URL=\"https://origincache.facebook.com/developers/resources/?id=FacebookSDKs-tvOS-current.zip\"\n curl $ARCHIVE_URL -o $ARCHIVE_NAME\n\n unzip $ARCHIVE_NAME -d fbsdk\n mv fbsdk/FBSDKCoreKit.framework .\n mv fbsdk/FBSDKTVOSKit.framework .\n\n rm $ARCHIVE_NAME\n rm -r fbsdk\nfi\n";
701 | showEnvVarsInLog = 0;
702 | };
703 | 81FE7F751C17790400E6BD34 /* Generate Localizable Strings */ = {
704 | isa = PBXShellScriptBuildPhase;
705 | buildActionMask = 2147483647;
706 | files = (
707 | );
708 | inputPaths = (
709 | );
710 | name = "Generate Localizable Strings";
711 | outputPaths = (
712 | );
713 | runOnlyForDeploymentPostprocessing = 0;
714 | shellPath = /bin/sh;
715 | shellScript = "# Generate localizable strings\nfind $PROJECT_DIR -name '*.m' -print0 | xargs -0 genstrings -q -o $PROJECT_DIR/Resources\necho \"Finished converting images\"";
716 | };
717 | 947535AF3D7FE64739018338 /* [CP] Check Pods Manifest.lock */ = {
718 | isa = PBXShellScriptBuildPhase;
719 | buildActionMask = 2147483647;
720 | files = (
721 | );
722 | inputPaths = (
723 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
724 | "${PODS_ROOT}/Manifest.lock",
725 | );
726 | name = "[CP] Check Pods Manifest.lock";
727 | outputPaths = (
728 | "$(DERIVED_FILE_DIR)/Pods-ParseFacebookUtilsV4-UnitTests-checkManifestLockResult.txt",
729 | );
730 | runOnlyForDeploymentPostprocessing = 0;
731 | shellPath = /bin/sh;
732 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
733 | showEnvVarsInLog = 0;
734 | };
735 | A72EB79485B8A201DDE9573A /* [CP] Embed Pods Frameworks */ = {
736 | isa = PBXShellScriptBuildPhase;
737 | buildActionMask = 2147483647;
738 | files = (
739 | );
740 | inputPaths = (
741 | "${SRCROOT}/Pods/Target Support Files/Pods-ParseFacebookUtilsV4-UnitTests/Pods-ParseFacebookUtilsV4-UnitTests-frameworks.sh",
742 | "${BUILT_PRODUCTS_DIR}/OCMock/OCMock.framework",
743 | );
744 | name = "[CP] Embed Pods Frameworks";
745 | outputPaths = (
746 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OCMock.framework",
747 | );
748 | runOnlyForDeploymentPostprocessing = 0;
749 | shellPath = /bin/sh;
750 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ParseFacebookUtilsV4-UnitTests/Pods-ParseFacebookUtilsV4-UnitTests-frameworks.sh\"\n";
751 | showEnvVarsInLog = 0;
752 | };
753 | /* End PBXShellScriptBuildPhase section */
754 |
755 | /* Begin PBXSourcesBuildPhase section */
756 | 81CB98C21AB7905D00136FA5 /* Sources */ = {
757 | isa = PBXSourcesBuildPhase;
758 | buildActionMask = 2147483647;
759 | files = (
760 | 81930A3E1BBE1A0600A5E4BB /* PFFacebookTestCase.m in Sources */,
761 | F5E3229D1B5583A800E319F9 /* FacebookUtilsTests.m in Sources */,
762 | F5E3229B1B549C2C00E319F9 /* FacebookAuthenticationProviderTests.m in Sources */,
763 | );
764 | runOnlyForDeploymentPostprocessing = 0;
765 | };
766 | 81FE7F7D1C17790400E6BD34 /* Sources */ = {
767 | isa = PBXSourcesBuildPhase;
768 | buildActionMask = 2147483647;
769 | files = (
770 | 81EA09DB1C178DED00B0F875 /* PFFacebookDeviceAuthenticationProvider.m in Sources */,
771 | 81EA09D71C178DED00B0F875 /* PFFacebookAuthenticationProvider.m in Sources */,
772 | 81FE7F7E1C17790400E6BD34 /* PFFacebookUtils.m in Sources */,
773 | 81FE7F801C17790400E6BD34 /* PFFacebookPrivateUtilities.m in Sources */,
774 | );
775 | runOnlyForDeploymentPostprocessing = 0;
776 | };
777 | D2AAC07B0554694100DB518D /* Sources */ = {
778 | isa = PBXSourcesBuildPhase;
779 | buildActionMask = 2147483647;
780 | files = (
781 | 81EA09D61C178DED00B0F875 /* PFFacebookAuthenticationProvider.m in Sources */,
782 | 813DFC8B1AB2510300F25A08 /* PFFacebookUtils.m in Sources */,
783 | 81EA09D01C178DED00B0F875 /* PFFacebookMobileAuthenticationProvider.m in Sources */,
784 | 81E35FD51BAA6F8400348526 /* PFFacebookPrivateUtilities.m in Sources */,
785 | );
786 | runOnlyForDeploymentPostprocessing = 0;
787 | };
788 | F535C7371B54B4A800A7D81E /* Sources */ = {
789 | isa = PBXSourcesBuildPhase;
790 | buildActionMask = 2147483647;
791 | files = (
792 | 815FC59A1BBF74890006AF6E /* main.m in Sources */,
793 | );
794 | runOnlyForDeploymentPostprocessing = 0;
795 | };
796 | /* End PBXSourcesBuildPhase section */
797 |
798 | /* Begin PBXTargetDependency section */
799 | 81CB98CE1AB7905D00136FA5 /* PBXTargetDependency */ = {
800 | isa = PBXTargetDependency;
801 | target = D2AAC07D0554694100DB518D /* ParseFacebookUtilsV4-iOS */;
802 | targetProxy = 81CB98CD1AB7905D00136FA5 /* PBXContainerItemProxy */;
803 | };
804 | F52CD61A1B58311F0051AB86 /* PBXTargetDependency */ = {
805 | isa = PBXTargetDependency;
806 | target = F535C73A1B54B4A800A7D81E /* ParseFacebookTestApplicationV4 */;
807 | targetProxy = F52CD6191B58311F0051AB86 /* PBXContainerItemProxy */;
808 | };
809 | /* End PBXTargetDependency section */
810 |
811 | /* Begin XCBuildConfiguration section */
812 | 1DEB921F08733DC00010E9CD /* Debug */ = {
813 | isa = XCBuildConfiguration;
814 | baseConfigurationReference = F52CD64A1B5838560051AB86 /* ParseFacebookUtilsV4-iOS.xcconfig */;
815 | buildSettings = {
816 | };
817 | name = Debug;
818 | };
819 | 1DEB922008733DC00010E9CD /* Release */ = {
820 | isa = XCBuildConfiguration;
821 | baseConfigurationReference = F52CD64A1B5838560051AB86 /* ParseFacebookUtilsV4-iOS.xcconfig */;
822 | buildSettings = {
823 | };
824 | name = Release;
825 | };
826 | 1DEB922308733DC00010E9CD /* Debug */ = {
827 | isa = XCBuildConfiguration;
828 | baseConfigurationReference = 8121EAAB1D39862400AC0B02 /* Debug.xcconfig */;
829 | buildSettings = {
830 | PARSE_DIR = "$(PROJECT_DIR)/..";
831 | };
832 | name = Debug;
833 | };
834 | 1DEB922408733DC00010E9CD /* Release */ = {
835 | isa = XCBuildConfiguration;
836 | baseConfigurationReference = 8121EAAC1D39862400AC0B02 /* Release.xcconfig */;
837 | buildSettings = {
838 | PARSE_DIR = "$(PROJECT_DIR)/..";
839 | };
840 | name = Release;
841 | };
842 | 81CB98CF1AB7905D00136FA5 /* Debug */ = {
843 | isa = XCBuildConfiguration;
844 | baseConfigurationReference = F52CD64B1B5838620051AB86 /* ParseFacebookUtilsV4-UnitTests.xcconfig */;
845 | buildSettings = {
846 | };
847 | name = Debug;
848 | };
849 | 81CB98D01AB7905D00136FA5 /* Release */ = {
850 | isa = XCBuildConfiguration;
851 | baseConfigurationReference = F52CD64B1B5838620051AB86 /* ParseFacebookUtilsV4-UnitTests.xcconfig */;
852 | buildSettings = {
853 | };
854 | name = Release;
855 | };
856 | 81FE7F891C17790400E6BD34 /* Debug */ = {
857 | isa = XCBuildConfiguration;
858 | baseConfigurationReference = 81FE7F721C1778FC00E6BD34 /* ParseFacebookUtilsV4-tvOS.xcconfig */;
859 | buildSettings = {
860 | };
861 | name = Debug;
862 | };
863 | 81FE7F8A1C17790400E6BD34 /* Release */ = {
864 | isa = XCBuildConfiguration;
865 | baseConfigurationReference = 81FE7F721C1778FC00E6BD34 /* ParseFacebookUtilsV4-tvOS.xcconfig */;
866 | buildSettings = {
867 | };
868 | name = Release;
869 | };
870 | F535C75C1B54B4A800A7D81E /* Debug */ = {
871 | isa = XCBuildConfiguration;
872 | baseConfigurationReference = F52CD64C1B58386F0051AB86 /* ParseFacebookTestApplicationV4.xcconfig */;
873 | buildSettings = {
874 | };
875 | name = Debug;
876 | };
877 | F535C75D1B54B4A800A7D81E /* Release */ = {
878 | isa = XCBuildConfiguration;
879 | baseConfigurationReference = F52CD64C1B58386F0051AB86 /* ParseFacebookTestApplicationV4.xcconfig */;
880 | buildSettings = {
881 | };
882 | name = Release;
883 | };
884 | /* End XCBuildConfiguration section */
885 |
886 | /* Begin XCConfigurationList section */
887 | 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "ParseFacebookUtilsV4-iOS" */ = {
888 | isa = XCConfigurationList;
889 | buildConfigurations = (
890 | 1DEB921F08733DC00010E9CD /* Debug */,
891 | 1DEB922008733DC00010E9CD /* Release */,
892 | );
893 | defaultConfigurationIsVisible = 0;
894 | defaultConfigurationName = Release;
895 | };
896 | 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "ParseFacebookUtils" */ = {
897 | isa = XCConfigurationList;
898 | buildConfigurations = (
899 | 1DEB922308733DC00010E9CD /* Debug */,
900 | 1DEB922408733DC00010E9CD /* Release */,
901 | );
902 | defaultConfigurationIsVisible = 0;
903 | defaultConfigurationName = Release;
904 | };
905 | 81CB98D11AB7905D00136FA5 /* Build configuration list for PBXNativeTarget "ParseFacebookUtilsV4-UnitTests" */ = {
906 | isa = XCConfigurationList;
907 | buildConfigurations = (
908 | 81CB98CF1AB7905D00136FA5 /* Debug */,
909 | 81CB98D01AB7905D00136FA5 /* Release */,
910 | );
911 | defaultConfigurationIsVisible = 0;
912 | defaultConfigurationName = Release;
913 | };
914 | 81FE7F881C17790400E6BD34 /* Build configuration list for PBXNativeTarget "ParseFacebookUtilsV4-tvOS" */ = {
915 | isa = XCConfigurationList;
916 | buildConfigurations = (
917 | 81FE7F891C17790400E6BD34 /* Debug */,
918 | 81FE7F8A1C17790400E6BD34 /* Release */,
919 | );
920 | defaultConfigurationIsVisible = 0;
921 | defaultConfigurationName = Release;
922 | };
923 | F535C75B1B54B4A800A7D81E /* Build configuration list for PBXNativeTarget "ParseFacebookTestApplicationV4" */ = {
924 | isa = XCConfigurationList;
925 | buildConfigurations = (
926 | F535C75C1B54B4A800A7D81E /* Debug */,
927 | F535C75D1B54B4A800A7D81E /* Release */,
928 | );
929 | defaultConfigurationIsVisible = 0;
930 | defaultConfigurationName = Release;
931 | };
932 | /* End XCConfigurationList section */
933 | };
934 | rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
935 | }
936 |
--------------------------------------------------------------------------------