Compare commits

...

7 Commits

Author SHA1 Message Date
1f625585b9 - upgrade libraries
- add + (instancetype _Nonnull) formDataFromFilepath:(NSString * _Nonnull) filePath name:(NSString * _Nonnull) name fileName:(NSString * _Nonnull) fileName mimeType:(NSString * _Nonnull) mimeType;
- add + (instancetype _Nonnull) formDataFromFileUrl:(NSURL * _Nonnull) fileUrl name:(NSString * _Nonnull) name fileName:(NSString * _Nonnull) fileName mimeType:(NSString * _Nonnull) mimeType;
2018-01-12 15:59:30 +01:00
872d8a78dd - add getEnvironment in PNObjectConfig 2018-01-10 17:34:16 +01:00
f42c646dcb - Uniform facebookID to facebookId naming in all classes 2017-08-27 17:39:25 +02:00
304c38f5e5 - Upgrade libraries 2017-08-27 17:20:52 +02:00
b38733b07a
- Upgrade libraries 2017-08-27 17:20:31 +02:00
d799b6eead - Fix Facebook user 2017-02-14 21:09:28 +01:00
0f7d60d908 - Fix Facebook 2017-02-14 21:00:03 +01:00
200 changed files with 13189 additions and 4438 deletions

View File

@ -328,13 +328,16 @@
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-PNObject_Tests-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../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";
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";
showEnvVarsInLog = 0;
};
614EA73ED5E0ED0F8684468C /* [CP] Copy Pods Resources */ = {
@ -343,9 +346,12 @@
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-PNObject_Example/Pods-PNObject_Example-resources.sh",
"${PODS_ROOT}/FBSDKCoreKit/FacebookSDKStrings.bundle",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
@ -388,13 +394,16 @@
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-PNObject_Example-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../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";
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";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */

View File

@ -1,3 +1,5 @@
platform :ios, '9.0'
target 'PNObject_Example' do
pod 'PNObject', :path => '../'
pod 'PureLayout'

View File

@ -14,30 +14,31 @@ PODS:
- AFNetworking/Serialization (3.1.0)
- AFNetworking/UIKit (3.1.0):
- AFNetworking/NSURLSession
- Bolts (1.8.4):
- Bolts/AppLinks (= 1.8.4)
- Bolts/Tasks (= 1.8.4)
- Bolts/AppLinks (1.8.4):
- Bolts (1.9.0):
- Bolts/AppLinks (= 1.9.0)
- Bolts/Tasks (= 1.9.0)
- Bolts/AppLinks (1.9.0):
- Bolts/Tasks
- Bolts/Tasks (1.8.4)
- Bolts/Tasks (1.9.0)
- CodFis-Helper (0.1.3)
- DDDKeychainWrapper (1.0.0)
- DJLocalization (1.2.2):
- DJLocalization/Core (= 1.2.2)
- DJLocalization/Core (1.2.2)
- Expecta (1.0.5)
- FBSDKCoreKit (4.19.0):
- Expecta (1.0.6)
- FBSDKCoreKit (4.29.0):
- Bolts (~> 1.7)
- FBSDKLoginKit (4.19.0):
- FBSDKLoginKit (4.29.0):
- FBSDKCoreKit
- FBSDKShareKit (4.19.0):
- FBSDKShareKit (4.29.0):
- FBSDKCoreKit
- NSDataAES (0.2.2)
- NSDate_Utils (1.0.5)
- NSDate_Utils (1.1.0):
- DJLocalization
- NSString-Helper (1.0.5)
- nv-ios-http-status (0.0.1)
- PEAR-FileManager-iOS (1.3.1)
- PNObject (1.3.0):
- PNObject (1.3.4):
- AFNetworking
- CodFis-Helper
- DDDKeychainWrapper
@ -55,7 +56,7 @@ PODS:
- UIDevice-Utils
- PureLayout (3.0.2)
- RZDataBinding (2.1.0)
- Specta (1.0.5)
- Specta (1.0.7)
- StrongestPasswordValidator (0.1.2)
- UIDevice-Utils (1.0.0)
@ -67,30 +68,30 @@ DEPENDENCIES:
EXTERNAL SOURCES:
PNObject:
:path: "../"
:path: ../
SPEC CHECKSUMS:
AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67
Bolts: 8a7995239dbe724f9cba2248b766d48b7ebdd322
Bolts: ac6567323eac61e203f6a9763667d0f711be34c8
CodFis-Helper: 28be4c74d7202542459d72354f59b1215871de87
DDDKeychainWrapper: e681a4daba6448786fa83b4941f58102a33b1897
DJLocalization: 0c84029af375647d4104a42ae36be87194c46c47
Expecta: e1c022fcd33910b6be89c291d2775b3fe27a89fe
FBSDKCoreKit: 894b2b6eda6a4c8c4204e92e59cc355709ef045c
FBSDKLoginKit: 83ca4d8f12a2022570af9fd6aacf27f6b425b99f
FBSDKShareKit: 5953758366278430dc322d5cdc906db361ed7f81
Expecta: 3b6bd90a64b9a1dcb0b70aa0e10a7f8f631667d5
FBSDKCoreKit: 6f139173dc63a1deaff4430a55f2fe5bb222d2af
FBSDKLoginKit: 56a057ca6822535ea0faa25f57a7c41edb697fd4
FBSDKShareKit: 18a2cd118aef11dd657fe7e8b64bae5c719088b2
NSDataAES: 967ea3337476a80e9838a533c25d570a06855ed0
NSDate_Utils: b0ab72ccec6df25297766bd64b0cd0c124521a45
NSDate_Utils: c858a89da6e204ecf53aca48dbccb4da4d25bc9e
NSString-Helper: 459e1b6a62b3bf7db10f01b0d102548608e945c4
nv-ios-http-status: b6c2b5fc8656cc19e0d3000dadce2080b99d0e2f
PEAR-FileManager-iOS: 3bc403f68a53483f5629aa822f4649e40275c4d3
PNObject: d085a7b5f0dc2a06ac60012556ba1dd44ab6c66d
PNObject: 8dc560680a7a48060ed309b019ca4fc41505cc07
PureLayout: 4d550abe49a94f24c2808b9b95db9131685fe4cd
RZDataBinding: 6981e90ddaae2f5e02028323b1043f8c31013109
Specta: ac94d110b865115fe60ff2c6d7281053c6f8e8a2
Specta: 3e1bd89c3517421982dc4d1c992503e48bd5fe66
StrongestPasswordValidator: 921e42615bdf353513c6f925bffd4fc29865dbd7
UIDevice-Utils: ff37bd042127117572d6ce4c5ff074f4f54ab5ed
PODFILE CHECKSUM: db08ccdd0a68e33d4a1cceb1843643fbab2f2a8e
PODFILE CHECKSUM: fcd5d1cf3426c7c9c5b3e5edcd4b8e5402ee7f2e
COCOAPODS: 1.2.0
COCOAPODS: 1.3.1

View File

@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN
/*!
A block that will be called when a token is cancelled.
*/
typedef void(^BFCancellationBlock)();
typedef void(^BFCancellationBlock)(void);
/*!
The consumer view of a CancellationToken.

View File

@ -37,7 +37,7 @@ NS_ASSUME_NONNULL_BEGIN
Returns a new executor that uses the given block to execute continuations.
@param block The block to use.
*/
+ (instancetype)executorWithBlock:(void(^)(void(^block)()))block;
+ (instancetype)executorWithBlock:(void(^)(void(^block)(void)))block;
/*!
Returns a new executor that runs continuations on the given queue.
@ -55,7 +55,7 @@ NS_ASSUME_NONNULL_BEGIN
Runs the given block using this executor's particular strategy.
@param block The block to execute.
*/
- (void)execute:(void(^)())block;
- (void)execute:(void(^)(void))block;
@end

View File

@ -34,12 +34,12 @@ __attribute__((noinline)) static size_t remaining_stack_size(size_t *restrict to
// NOTE: If the function is inlined, this value could be incorrect
uint8_t *frameAddr = __builtin_frame_address(0);
return (*totalSize) - (endStack - frameAddr);
return (*totalSize) - (size_t)(endStack - frameAddr);
}
@interface BFExecutor ()
@property (nonatomic, copy) void(^block)(void(^block)());
@property (nonatomic, copy) void(^block)(void(^block)(void));
@end
@ -51,7 +51,7 @@ __attribute__((noinline)) static size_t remaining_stack_size(size_t *restrict to
static BFExecutor *defaultExecutor = NULL;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
defaultExecutor = [self executorWithBlock:^void(void(^block)()) {
defaultExecutor = [self executorWithBlock:^void(void(^block)(void)) {
// We prefer to run everything possible immediately, so that there is callstack information
// when debugging. However, we don't want the stack to get too deep, so if the remaining stack space
// is less than 10% of the total space, we dispatch to another GCD queue.
@ -74,7 +74,7 @@ __attribute__((noinline)) static size_t remaining_stack_size(size_t *restrict to
static BFExecutor *immediateExecutor = NULL;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
immediateExecutor = [self executorWithBlock:^void(void(^block)()) {
immediateExecutor = [self executorWithBlock:^void(void(^block)(void)) {
block();
}];
});
@ -85,7 +85,7 @@ __attribute__((noinline)) static size_t remaining_stack_size(size_t *restrict to
static BFExecutor *mainThreadExecutor = NULL;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
mainThreadExecutor = [self executorWithBlock:^void(void(^block)()) {
mainThreadExecutor = [self executorWithBlock:^void(void(^block)(void)) {
if (![NSThread isMainThread]) {
dispatch_async(dispatch_get_main_queue(), block);
} else {
@ -98,25 +98,25 @@ __attribute__((noinline)) static size_t remaining_stack_size(size_t *restrict to
return mainThreadExecutor;
}
+ (instancetype)executorWithBlock:(void(^)(void(^block)()))block {
+ (instancetype)executorWithBlock:(void(^)(void(^block)(void)))block {
return [[self alloc] initWithBlock:block];
}
+ (instancetype)executorWithDispatchQueue:(dispatch_queue_t)queue {
return [self executorWithBlock:^void(void(^block)()) {
return [self executorWithBlock:^void(void(^block)(void)) {
dispatch_async(queue, block);
}];
}
+ (instancetype)executorWithOperationQueue:(NSOperationQueue *)queue {
return [self executorWithBlock:^void(void(^block)()) {
return [self executorWithBlock:^void(void(^block)(void)) {
[queue addOperation:[NSBlockOperation blockOperationWithBlock:block]];
}];
}
#pragma mark - Initializer
- (instancetype)initWithBlock:(void(^)(void(^block)()))block {
- (instancetype)initWithBlock:(void(^)(void(^block)(void)))block {
self = [super init];
if (!self) return self;
@ -127,7 +127,7 @@ __attribute__((noinline)) static size_t remaining_stack_size(size_t *restrict to
#pragma mark - Execution
- (void)execute:(void(^)())block {
- (void)execute:(void(^)(void))block {
self.block(block);
}

View File

@ -0,0 +1,25 @@
/*
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#import <Foundation/Foundation.h>
#pragma once
/**
This exists to use along with `BFTask` and `BFTaskCompletionSource`.
Instead of returning a `BFTask` with no generic type, or a generic type of 'NSNull'
when there is no usable result from a task, we use the type 'BFVoid', which will always have a value of `nil`.
This allows you to provide a more enforced API contract to the caller,
as sending any message to `BFVoid` will result in a compile time error.
*/
@class _BFVoid_Nonexistant;
typedef _BFVoid_Nonexistant *BFVoid;

View File

@ -1,32 +0,0 @@
/*
* Copyright (c) 2016, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#pragma once
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
/**
Returns whether all instances of `BFTask` should automatically @try/@catch exceptions in continuation blocks. Default: `YES`.
@return Boolean value indicating whether exceptions are being caught.
*/
extern BOOL BFTaskCatchesExceptions(void)
__attribute__((deprecated("This is temporary API and will be removed in a future release.")));
/**
Set whether all instances of `BFTask` should automatically @try/@catch exceptions in continuation blocks. Default: `YES`.
@param catchExceptions Boolean value indicating whether exceptions shoudl be caught.
*/
extern void BFTaskSetCatchesExceptions(BOOL catchExceptions)
__attribute__((deprecated("This is a temporary API and will be removed in a future release.")));
NS_ASSUME_NONNULL_END

View File

@ -1,24 +0,0 @@
/*
* Copyright (c) 2016, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import "BFTask+Exceptions.h"
NS_ASSUME_NONNULL_BEGIN
static BOOL taskCatchExceptions = YES;
BOOL BFTaskCatchesExceptions(void) {
return taskCatchExceptions;
}
void BFTaskSetCatchesExceptions(BOOL catchExceptions) {
taskCatchExceptions = catchExceptions;
}
NS_ASSUME_NONNULL_END

View File

@ -11,6 +11,7 @@
#import <Foundation/Foundation.h>
#import <Bolts/BFCancellationToken.h>
#import <Bolts/BFGeneric.h>
NS_ASSUME_NONNULL_BEGIN
@ -24,29 +25,12 @@ extern NSString *const BFTaskErrorDomain;
*/
extern NSInteger const kBFMultipleErrorsError;
/*!
An exception that is thrown if there was multiple exceptions on <BFTask taskForCompletionOfAllTasks:>.
@deprecated `BFTask` exception handling is deprecated and will be removed in a future release.
*/
extern NSString *const BFTaskMultipleExceptionsException
__attribute__((deprecated("`BFTask` exception handling is deprecated and will be removed in a future release.")));
/*!
An error userInfo key used if there were multiple errors on <BFTask taskForCompletionOfAllTasks:>.
Value type is `NSArray<NSError *> *`.
*/
extern NSString *const BFTaskMultipleErrorsUserInfoKey;
/*!
An error userInfo key used if there were multiple exceptions on <BFTask taskForCompletionOfAllTasks:>.
Value type is `NSArray<NSException *> *`.
@deprecated `BFTask` exception handling is deprecated and will be removed in a future release.
*/
extern NSString *const BFTaskMultipleExceptionsUserInfoKey
__attribute__((deprecated("`BFTask` exception handling is deprecated and will be removed in a future release.")));
@class BFExecutor;
@class BFTask;
@ -74,15 +58,6 @@ typedef __nullable id(^BFContinuationBlock)(BFTask<ResultType> *t);
*/
+ (instancetype)taskWithError:(NSError *)error;
/*!
Creates a task that is already completed with the given exception.
@param exception The exception for the task.
@deprecated `BFTask` exception handling is deprecated and will be removed in a future release.
*/
+ (instancetype)taskWithException:(NSException *)exception
__attribute__((deprecated("`BFTask` exception handling is deprecated and will be removed in a future release.")));
/*!
Creates a task that is already cancelled.
*/
@ -105,7 +80,7 @@ __attribute__((deprecated("`BFTask` exception handling is deprecated and will be
/*!
Returns a task that will be completed once there is at least one successful task.
The first task to successuly complete will set the result, all other tasks results are
The first task to successuly complete will set the result, all other tasks results are
ignored.
@param tasks An `NSArray` of the tasks to use as an input.
*/
@ -116,7 +91,7 @@ __attribute__((deprecated("`BFTask` exception handling is deprecated and will be
@param millis The approximate number of milliseconds to wait before the
task will be finished (with result == nil).
*/
+ (instancetype)taskWithDelay:(int)millis;
+ (BFTask<BFVoid> *)taskWithDelay:(int)millis;
/*!
Returns a task that will be completed a certain amount of time in the future.
@ -124,7 +99,7 @@ __attribute__((deprecated("`BFTask` exception handling is deprecated and will be
task will be finished (with result == nil).
@param token The cancellation token (optional).
*/
+ (instancetype)taskWithDelay:(int)millis cancellationToken:(nullable BFCancellationToken *)token;
+ (BFTask<BFVoid> *)taskWithDelay:(int)millis cancellationToken:(nullable BFCancellationToken *)token;
/*!
Returns a task that will be completed after the given block completes with
@ -136,7 +111,7 @@ __attribute__((deprecated("`BFTask` exception handling is deprecated and will be
If block returns a BFTask, then the task returned from
this method will not be completed until that task is completed.
*/
+ (instancetype)taskFromExecutor:(BFExecutor *)executor withBlock:(nullable id (^)())block;
+ (instancetype)taskFromExecutor:(BFExecutor *)executor withBlock:(nullable id (^)(void))block;
// Properties that will be set on the task once it is completed.
@ -150,21 +125,13 @@ __attribute__((deprecated("`BFTask` exception handling is deprecated and will be
*/
@property (nullable, nonatomic, strong, readonly) NSError *error;
/*!
The exception of a failed task.
@deprecated `BFTask` exception handling is deprecated and will be removed in a future release.
*/
@property (nullable, nonatomic, strong, readonly) NSException *exception
__attribute__((deprecated("`BFTask` exception handling is deprecated and will be removed in a future release.")));
/*!
Whether this task has been cancelled.
*/
@property (nonatomic, assign, readonly, getter=isCancelled) BOOL cancelled;
/*!
Whether this task has completed due to an error or exception.
Whether this task has completed due to an error.
*/
@property (nonatomic, assign, readonly, getter=isFaulted) BOOL faulted;
@ -184,7 +151,7 @@ __attribute__((deprecated("`BFTask` exception handling is deprecated and will be
If block returns a BFTask, then the task returned from
this method will not be completed until that task is completed.
*/
- (BFTask *)continueWithBlock:(BFContinuationBlock)block;
- (BFTask *)continueWithBlock:(BFContinuationBlock)block NS_SWIFT_NAME(continueWith(block:));
/*!
Enqueues the given block to be run once this task is complete.
@ -198,7 +165,8 @@ __attribute__((deprecated("`BFTask` exception handling is deprecated and will be
If block returns a BFTask, then the task returned from
this method will not be completed until that task is completed.
*/
- (BFTask *)continueWithBlock:(BFContinuationBlock)block cancellationToken:(nullable BFCancellationToken *)cancellationToken;
- (BFTask *)continueWithBlock:(BFContinuationBlock)block
cancellationToken:(nullable BFCancellationToken *)cancellationToken NS_SWIFT_NAME(continueWith(block:cancellationToken:));
/*!
Enqueues the given block to be run once this task is complete.
@ -209,7 +177,9 @@ __attribute__((deprecated("`BFTask` exception handling is deprecated and will be
If block returns a BFTask, then the task returned from
this method will not be completed until that task is completed.
*/
- (BFTask *)continueWithExecutor:(BFExecutor *)executor withBlock:(BFContinuationBlock)block;
- (BFTask *)continueWithExecutor:(BFExecutor *)executor
withBlock:(BFContinuationBlock)block NS_SWIFT_NAME(continueWith(executor:block:));
/*!
Enqueues the given block to be run once this task is complete.
@param executor A BFExecutor responsible for determining how the
@ -222,11 +192,12 @@ __attribute__((deprecated("`BFTask` exception handling is deprecated and will be
*/
- (BFTask *)continueWithExecutor:(BFExecutor *)executor
block:(BFContinuationBlock)block
cancellationToken:(nullable BFCancellationToken *)cancellationToken;
cancellationToken:(nullable BFCancellationToken *)cancellationToken
NS_SWIFT_NAME(continueWith(executor:block:cancellationToken:));
/*!
Identical to continueWithBlock:, except that the block is only run
if this task did not produce a cancellation, error, or exception.
if this task did not produce a cancellation or an error.
If it did, then the failure will be propagated to the returned
task.
@param block The block to be run once this task is complete.
@ -234,11 +205,11 @@ __attribute__((deprecated("`BFTask` exception handling is deprecated and will be
If block returns a BFTask, then the task returned from
this method will not be completed until that task is completed.
*/
- (BFTask *)continueWithSuccessBlock:(BFContinuationBlock)block;
- (BFTask *)continueWithSuccessBlock:(BFContinuationBlock)block NS_SWIFT_NAME(continueOnSuccessWith(block:));
/*!
Identical to continueWithBlock:, except that the block is only run
if this task did not produce a cancellation, error, or exception.
if this task did not produce a cancellation or an error.
If it did, then the failure will be propagated to the returned
task.
@param block The block to be run once this task is complete.
@ -247,13 +218,14 @@ __attribute__((deprecated("`BFTask` exception handling is deprecated and will be
If block returns a BFTask, then the task returned from
this method will not be completed until that task is completed.
*/
- (BFTask *)continueWithSuccessBlock:(BFContinuationBlock)block cancellationToken:(nullable BFCancellationToken *)cancellationToken;
- (BFTask *)continueWithSuccessBlock:(BFContinuationBlock)block
cancellationToken:(nullable BFCancellationToken *)cancellationToken
NS_SWIFT_NAME(continueOnSuccessWith(block:cancellationToken:));
/*!
Identical to continueWithExecutor:withBlock:, except that the block
is only run if this task did not produce a cancellation, error, or
exception. If it did, then the failure will be propagated to the
returned task.
is only run if this task did not produce a cancellation, error, or an error.
If it did, then the failure will be propagated to the returned task.
@param executor A BFExecutor responsible for determining how the
continuation block will be run.
@param block The block to be run once this task is complete.
@ -261,13 +233,13 @@ __attribute__((deprecated("`BFTask` exception handling is deprecated and will be
If block returns a BFTask, then the task returned from
this method will not be completed until that task is completed.
*/
- (BFTask *)continueWithExecutor:(BFExecutor *)executor withSuccessBlock:(BFContinuationBlock)block;
- (BFTask *)continueWithExecutor:(BFExecutor *)executor
withSuccessBlock:(BFContinuationBlock)block NS_SWIFT_NAME(continueOnSuccessWith(executor:block:));
/*!
Identical to continueWithExecutor:withBlock:, except that the block
is only run if this task did not produce a cancellation, error, or
exception. If it did, then the failure will be propagated to the
returned task.
is only run if this task did not produce a cancellation or an error.
If it did, then the failure will be propagated to the returned task.
@param executor A BFExecutor responsible for determining how the
continuation block will be run.
@param block The block to be run once this task is complete.
@ -278,7 +250,8 @@ __attribute__((deprecated("`BFTask` exception handling is deprecated and will be
*/
- (BFTask *)continueWithExecutor:(BFExecutor *)executor
successBlock:(BFContinuationBlock)block
cancellationToken:(nullable BFCancellationToken *)cancellationToken;
cancellationToken:(nullable BFCancellationToken *)cancellationToken
NS_SWIFT_NAME(continueOnSuccessWith(executor:block:cancellationToken:));
/*!
Waits until this operation is completed.

View File

@ -13,7 +13,6 @@
#import <libkern/OSAtomic.h>
#import "Bolts.h"
#import "BFTask+Exceptions.h"
NS_ASSUME_NONNULL_BEGIN
@ -24,15 +23,12 @@ __attribute__ ((noinline)) void warnBlockingOperationOnMainThread() {
NSString *const BFTaskErrorDomain = @"bolts";
NSInteger const kBFMultipleErrorsError = 80175001;
NSString *const BFTaskMultipleExceptionsException = @"BFMultipleExceptionsException";
NSString *const BFTaskMultipleErrorsUserInfoKey = @"errors";
NSString *const BFTaskMultipleExceptionsUserInfoKey = @"exceptions";
@interface BFTask () {
id _result;
NSError *_error;
NSException *_exception;
}
@property (nonatomic, assign, readwrite, getter=isCancelled) BOOL cancelled;
@ -60,7 +56,7 @@ NSString *const BFTaskMultipleExceptionsUserInfoKey = @"exceptions";
return self;
}
- (instancetype)initWithResult:(id)result {
- (instancetype)initWithResult:(nullable id)result {
self = [super init];
if (!self) return self;
@ -78,15 +74,6 @@ NSString *const BFTaskMultipleExceptionsUserInfoKey = @"exceptions";
return self;
}
- (instancetype)initWithException:(NSException *)exception {
self = [super init];
if (!self) return self;
[self trySetException:exception];
return self;
}
- (instancetype)initCancelled {
self = [super init];
if (!self) return self;
@ -106,10 +93,6 @@ NSString *const BFTaskMultipleExceptionsUserInfoKey = @"exceptions";
return [[self alloc] initWithError:error];
}
+ (instancetype)taskWithException:(NSException *)exception {
return [[self alloc] initWithException:exception];
}
+ (instancetype)cancelledTask {
return [[self alloc] initCancelled];
}
@ -123,19 +106,11 @@ NSString *const BFTaskMultipleExceptionsUserInfoKey = @"exceptions";
__block int32_t cancelled = 0;
NSObject *lock = [[NSObject alloc] init];
NSMutableArray *errors = [NSMutableArray array];
NSMutableArray *exceptions = [NSMutableArray array];
BFTaskCompletionSource *tcs = [BFTaskCompletionSource taskCompletionSource];
for (BFTask *task in tasks) {
[task continueWithBlock:^id(BFTask *t) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if (t.exception) {
@synchronized (lock) {
[exceptions addObject:t.exception];
#pragma clang diagnostic pop
}
} else if (t.error) {
if (t.error) {
@synchronized (lock) {
[errors addObject:t.error];
}
@ -144,19 +119,7 @@ NSString *const BFTaskMultipleExceptionsUserInfoKey = @"exceptions";
}
if (OSAtomicDecrement32Barrier(&total) == 0) {
if (exceptions.count > 0) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if (exceptions.count == 1) {
tcs.exception = [exceptions firstObject];
} else {
NSException *exception = [NSException exceptionWithName:BFTaskMultipleExceptionsException
reason:@"There were multiple exceptions."
userInfo:@{ BFTaskMultipleExceptionsUserInfoKey: exceptions }];
tcs.exception = exception;
}
#pragma clang diagnostic pop
} else if (errors.count > 0) {
if (errors.count > 0) {
if (errors.count == 1) {
tcs.error = [errors firstObject];
} else {
@ -178,7 +141,7 @@ NSString *const BFTaskMultipleExceptionsUserInfoKey = @"exceptions";
}
+ (instancetype)taskForCompletionOfAllTasksWithResults:(nullable NSArray<BFTask *> *)tasks {
return [[self taskForCompletionOfAllTasks:tasks] continueWithSuccessBlock:^id(BFTask *task) {
return [[self taskForCompletionOfAllTasks:tasks] continueWithSuccessBlock:^id(BFTask * __unused task) {
return [tasks valueForKey:@"result"];
}];
}
@ -195,19 +158,11 @@ NSString *const BFTaskMultipleExceptionsUserInfoKey = @"exceptions";
NSObject *lock = [NSObject new];
NSMutableArray<NSError *> *errors = [NSMutableArray new];
NSMutableArray<NSException *> *exceptions = [NSMutableArray new];
BFTaskCompletionSource *source = [BFTaskCompletionSource taskCompletionSource];
for (BFTask *task in tasks) {
[task continueWithBlock:^id(BFTask *t) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if (t.exception != nil) {
@synchronized(lock) {
[exceptions addObject:t.exception];
#pragma clang diagnostic pop
}
} else if (t.error != nil) {
if (t.error != nil) {
@synchronized(lock) {
[errors addObject:t.error];
}
@ -223,18 +178,6 @@ NSString *const BFTaskMultipleExceptionsUserInfoKey = @"exceptions";
OSAtomicCompareAndSwap32Barrier(0, 1, &completed)) {
if (cancelled > 0) {
[source cancel];
} else if (exceptions.count > 0) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if (exceptions.count == 1) {
source.exception = exceptions.firstObject;
} else {
NSException *exception = [NSException exceptionWithName:BFTaskMultipleExceptionsException
reason:@"There were multiple exceptions."
userInfo:@{ BFTaskMultipleExceptionsUserInfoKey: exceptions }];
source.exception = exception;
#pragma clang diagnostic pop
}
} else if (errors.count > 0) {
if (errors.count == 1) {
source.error = errors.firstObject;
@ -254,7 +197,7 @@ NSString *const BFTaskMultipleExceptionsUserInfoKey = @"exceptions";
}
+ (instancetype)taskWithDelay:(int)millis {
+ (BFTask<BFVoid> *)taskWithDelay:(int)millis {
BFTaskCompletionSource *tcs = [BFTaskCompletionSource taskCompletionSource];
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, millis * NSEC_PER_MSEC);
dispatch_after(popTime, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^(void){
@ -263,7 +206,7 @@ NSString *const BFTaskMultipleExceptionsUserInfoKey = @"exceptions";
return tcs.task;
}
+ (instancetype)taskWithDelay:(int)millis cancellationToken:(nullable BFCancellationToken *)token {
+ (BFTask<BFVoid> *)taskWithDelay:(int)millis cancellationToken:(nullable BFCancellationToken *)token {
if (token.cancellationRequested) {
return [BFTask cancelledTask];
}
@ -280,7 +223,7 @@ NSString *const BFTaskMultipleExceptionsUserInfoKey = @"exceptions";
return tcs.task;
}
+ (instancetype)taskFromExecutor:(BFExecutor *)executor withBlock:(nullable id (^)())block {
+ (instancetype)taskFromExecutor:(BFExecutor *)executor withBlock:(nullable id (^)(void))block {
return [[self taskWithResult:nil] continueWithExecutor:executor withBlock:^id(BFTask *task) {
return block();
}];
@ -325,25 +268,6 @@ NSString *const BFTaskMultipleExceptionsUserInfoKey = @"exceptions";
}
}
- (nullable NSException *)exception {
@synchronized(self.lock) {
return _exception;
}
}
- (BOOL)trySetException:(NSException *)exception {
@synchronized(self.lock) {
if (self.completed) {
return NO;
}
self.completed = YES;
self.faulted = YES;
_exception = exception;
[self runContinuations];
return YES;
}
}
- (BOOL)isCancelled {
@synchronized(self.lock) {
return _cancelled;
@ -379,7 +303,7 @@ NSString *const BFTaskMultipleExceptionsUserInfoKey = @"exceptions";
[self.condition lock];
[self.condition broadcast];
[self.condition unlock];
for (void (^callback)() in self.callbacks) {
for (void (^callback)(void) in self.callbacks) {
callback();
}
[self.callbacks removeAllObjects];
@ -404,34 +328,12 @@ NSString *const BFTaskMultipleExceptionsUserInfoKey = @"exceptions";
return;
}
id result = nil;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if (BFTaskCatchesExceptions()) {
@try {
result = block(self);
} @catch (NSException *exception) {
NSLog(@"[Bolts] Warning: `BFTask` caught an exception in the continuation block."
@" This behavior is discouraged and will be removed in a future release."
@" Caught Exception: %@", exception);
tcs.exception = exception;
return;
}
} else {
result = block(self);
}
#pragma clang diagnostic pop
id result = block(self);
if ([result isKindOfClass:[BFTask class]]) {
id (^setupWithTask) (BFTask *) = ^id(BFTask *task) {
if (cancellationToken.cancellationRequested || task.cancelled) {
[tcs cancel];
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
} else if (task.exception) {
tcs.exception = task.exception;
#pragma clang diagnostic pop
} else if (task.error) {
tcs.error = task.error;
} else {

View File

@ -12,7 +12,7 @@
NS_ASSUME_NONNULL_BEGIN
@class BFTask<ResultType>;
@class BFTask<__covariant ResultType>;
/*!
A BFTaskCompletionSource represents the producer side of tasks.
@ -36,24 +36,14 @@ NS_ASSUME_NONNULL_BEGIN
Attempting to set this for a completed task will raise an exception.
@param result The result of the task.
*/
- (void)setResult:(nullable ResultType)result;
- (void)setResult:(nullable ResultType)result NS_SWIFT_NAME(set(result:));
/*!
Completes the task by setting the error.
Attempting to set this for a completed task will raise an exception.
@param error The error for the task.
*/
- (void)setError:(NSError *)error;
/*!
Completes the task by setting an exception.
Attempting to set this for a completed task will raise an exception.
@param exception The exception for the task.
@deprecated `BFTask` exception handling is deprecated and will be removed in a future release.
*/
- (void)setException:(NSException *)exception
__attribute__((deprecated("`BFTask` exception handling is deprecated and will be removed in a future release.")));
- (void)setError:(NSError *)error NS_SWIFT_NAME(set(error:));
/*!
Completes the task by marking it as cancelled.
@ -65,24 +55,14 @@ __attribute__((deprecated("`BFTask` exception handling is deprecated and will be
Sets the result of the task if it wasn't already completed.
@returns whether the new value was set.
*/
- (BOOL)trySetResult:(nullable ResultType)result;
- (BOOL)trySetResult:(nullable ResultType)result NS_SWIFT_NAME(trySet(result:));
/*!
Sets the error of the task if it wasn't already completed.
@param error The error for the task.
@returns whether the new value was set.
*/
- (BOOL)trySetError:(NSError *)error;
/*!
Sets the exception of the task if it wasn't already completed.
@param exception The exception for the task.
@returns whether the new value was set.
@deprecated `BFTask` exception handling is deprecated and will be removed in a future release.
*/
- (BOOL)trySetException:(NSException *)exception
__attribute__((deprecated("`BFTask` exception handling is deprecated and will be removed in a future release.")));
- (BOOL)trySetError:(NSError *)error NS_SWIFT_NAME(trySet(error:));
/*!
Sets the cancellation state of the task if it wasn't already completed.

View File

@ -18,7 +18,6 @@ NS_ASSUME_NONNULL_BEGIN
- (BOOL)trySetResult:(nullable id)result;
- (BOOL)trySetError:(NSError *)error;
- (BOOL)trySetException:(NSException *)exception;
- (BOOL)trySetCancelled;
@end
@ -56,13 +55,6 @@ NS_ASSUME_NONNULL_BEGIN
}
}
- (void)setException:(NSException *)exception {
if (![self.task trySetException:exception]) {
[NSException raise:NSInternalInconsistencyException
format:@"Cannot set the exception on a completed task."];
}
}
- (void)cancel {
if (![self.task trySetCancelled]) {
[NSException raise:NSInternalInconsistencyException
@ -78,10 +70,6 @@ NS_ASSUME_NONNULL_BEGIN
return [self.task trySetError:error];
}
- (BOOL)trySetException:(NSException *)exception {
return [self.task trySetException:exception];
}
- (BOOL)trySetCancelled {
return [self.task trySetCancelled];
}

View File

@ -12,8 +12,8 @@
#import <Bolts/BFCancellationTokenRegistration.h>
#import <Bolts/BFCancellationTokenSource.h>
#import <Bolts/BFExecutor.h>
#import <Bolts/BFGeneric.h>
#import <Bolts/BFTask.h>
#import <Bolts/BFTask+Exceptions.h>
#import <Bolts/BFTaskCompletionSource.h>
#if __has_include(<Bolts/BFAppLink.h>) && TARGET_OS_IPHONE && !TARGET_OS_WATCH && !TARGET_OS_TV

View File

@ -12,6 +12,6 @@
NS_ASSUME_NONNULL_BEGIN
NSString *const BoltsFrameworkVersionString = @"1.8.4";
NSString *const BoltsFrameworkVersionString = @"1.9.0";
NS_ASSUME_NONNULL_END

View File

@ -33,6 +33,7 @@ typedef NS_ENUM(NSInteger, BFAppLinkNavigationType) {
custom requests with additional navigation and app data attached to them by
creating BFAppLinkNavigations themselves.
*/
NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extension")
@interface BFAppLinkNavigation : NSObject
/*!

View File

@ -25,6 +25,6 @@
@param url The URL to resolve into an App Link.
@returns A BFTask that will return a BFAppLink for the given URL.
*/
- (BFTask *)appLinkFromURLInBackground:(NSURL *)url;
- (BFTask *)appLinkFromURLInBackground:(NSURL *)url NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extension");
@end

View File

@ -40,6 +40,7 @@
A controller class that implements default behavior for a BFAppLinkReturnToRefererView, including
the ability to display the view above the navigation bar for navigation-based apps.
*/
NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extension")
@interface BFAppLinkReturnToRefererController : NSObject <BFAppLinkReturnToRefererViewDelegate>
/*!

View File

@ -48,6 +48,7 @@ typedef NS_ENUM(NSUInteger, BFIncludeStatusBarInSize) {
rather than navigating away. If the view is provided an App Link that does not contain
referer data, it will have zero size and no UI will be displayed.
*/
NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extension")
@interface BFAppLinkReturnToRefererView : UIView
/*!

View File

@ -143,7 +143,7 @@ static NSString *const BFWebViewAppLinkResolverShouldFallbackKey = @"should_fall
}];
}
- (BFTask *)appLinkFromURLInBackground:(NSURL *)url {
- (BFTask *)appLinkFromURLInBackground:(NSURL *)url NS_EXTENSION_UNAVAILABLE_IOS("") {
return [[self followRedirects:url] continueWithExecutor:[BFExecutor mainThreadExecutor]
withSuccessBlock:^id(BFTask *task) {
NSData *responseData = task.result[@"data"];
@ -200,7 +200,7 @@ static NSString *const BFWebViewAppLinkResolverShouldFallbackKey = @"should_fall
continue;
}
NSMutableDictionary *root = al;
for (int i = 1; i < nameComponents.count; i++) {
for (NSUInteger i = 1; i < nameComponents.count; i++) {
NSMutableArray *children = root[nameComponents[i]];
if (!children) {
children = [NSMutableArray array];
@ -237,26 +237,17 @@ static NSString *const BFWebViewAppLinkResolverShouldFallbackKey = @"should_fall
NSMutableArray *linkTargets = [NSMutableArray array];
NSArray *platformData = nil;
switch (UI_USER_INTERFACE_IDIOM()) {
case UIUserInterfaceIdiomPad:
platformData = @[ appLinkDict[BFWebViewAppLinkResolverIPadKey] ?: @{},
appLinkDict[BFWebViewAppLinkResolverIOSKey] ?: @{} ];
break;
case UIUserInterfaceIdiomPhone:
platformData = @[ appLinkDict[BFWebViewAppLinkResolverIPhoneKey] ?: @{},
appLinkDict[BFWebViewAppLinkResolverIOSKey] ?: @{} ];
break;
#ifdef __TVOS_9_0
case UIUserInterfaceIdiomTV:
#endif
#ifdef __IPHONE_9_3
case UIUserInterfaceIdiomCarPlay:
#endif
case UIUserInterfaceIdiomUnspecified:
default:
// Future-proofing. Other User Interface idioms should only hit ios.
platformData = @[ appLinkDict[BFWebViewAppLinkResolverIOSKey] ?: @{} ];
break;
const UIUserInterfaceIdiom idiom = UI_USER_INTERFACE_IDIOM();
if (idiom == UIUserInterfaceIdiomPad) {
platformData = @[ appLinkDict[BFWebViewAppLinkResolverIPadKey] ?: @{},
appLinkDict[BFWebViewAppLinkResolverIOSKey] ?: @{} ];
} else if (idiom == UIUserInterfaceIdiomPhone) {
platformData = @[ appLinkDict[BFWebViewAppLinkResolverIPhoneKey] ?: @{},
appLinkDict[BFWebViewAppLinkResolverIOSKey] ?: @{} ];
} else {
// Future-proofing. Other User Interface idioms should only hit ios.
platformData = @[ appLinkDict[BFWebViewAppLinkResolverIOSKey] ?: @{} ];
}
for (NSArray *platformObjects in platformData) {

View File

@ -9,9 +9,9 @@
#ifndef Expecta_EXPDefines_h
#define Expecta_EXPDefines_h
typedef void (^EXPBasicBlock)();
typedef id (^EXPIdBlock)();
typedef BOOL (^EXPBoolBlock)();
typedef NSString *(^EXPStringBlock)();
typedef void (^EXPBasicBlock)(void);
typedef id (^EXPIdBlock)(void);
typedef BOOL (^EXPBoolBlock)(void);
typedef NSString *(^EXPStringBlock)(void);
#endif

View File

@ -4,12 +4,16 @@
EXPMatcherImplementationBegin(respondTo, (SEL expected)) {
BOOL actualIsNil = (actual == nil);
BOOL expectedIsNull = (expected == NULL);
prerequisite (^BOOL {
return !(actualIsNil || expectedIsNull);
});
match(^BOOL {
if ([actual respondsToSelector:@selector(instancesRespondToSelector:)] &&
[actual instancesRespondToSelector:expected]) {
return YES;
}
return [actual respondsToSelector:expected];
});

View File

@ -1,13 +1,8 @@
#Expecta
[![Build Status](http://img.shields.io/travis/specta/expecta/master.svg?style=flat)](https://travis-ci.org/specta/expecta)
[![Pod Version](http://img.shields.io/cocoapods/v/Expecta.svg?style=flat)](http://cocoadocs.org/docsets/Expecta/)
[![Pod Platform](http://img.shields.io/cocoapods/p/Expecta.svg?style=flat)](http://cocoadocs.org/docsets/Expecta/)
[![Pod License](http://img.shields.io/cocoapods/l/Expecta.svg?style=flat)](https://www.apache.org/licenses/LICENSE-2.0.html)
# Expecta [![Build Status](http://img.shields.io/travis/specta/expecta/master.svg?style=flat)](https://travis-ci.org/specta/expecta) [![Pod Version](http://img.shields.io/cocoapods/v/Expecta.svg?style=flat)](http://cocoadocs.org/docsets/Expecta/)
A matcher framework for Objective-C and Cocoa.
## Introduction
## FEATURES
The main advantage of using Expecta over other matcher frameworks is that you do not have to specify the data types. Also, the syntax of Expecta matchers is much more readable and does not suffer from parenthesitis.
@ -18,63 +13,10 @@ expect([bar isBar]).to.equal(YES);
expect(baz).to.equal(3.14159);
```
Expecta is framework-agnostic: it works well with XCTest and XCTest-compatible test frameworks such as [Specta](http://github.com/petejkim/specta/).
Expecta is framework-agnostic: it works well with XCTest and XCTest-compatible test frameworks such as [Specta](http://github.com/petejkim/specta/), or [Kiwi](https://github.com/kiwi-bdd/Kiwi/).
## Installation
You can setup Expecta using [Carthage](https://github.com/Carthage/Carthage), [CocoaPods](http://github.com/CocoaPods/CocoaPods) or [completely manually](#setting-up-manually).
### Carthage
1. Add Expecta to your project's `Cartfile.private`:
```ruby
github "specta/expecta" "master"
```
2. Run `carthage update` in your project directory.
3. Drag the appropriate **Expecta.framework** for your platform (located in `Carthage/Build/`) into your applications Xcode project, and add it to your test target(s).
### CocoaPods
1. Add Expecta to your project's `Podfile`:
```ruby
target :MyApp do
# Your app's dependencies
end
target :MyAppTests do
pod 'Expecta', '~> 1.0.0'
end
```
2. Run `pod update` or `pod install` in your project directory.
### Setting Up Manually
1. Clone Expecta from Github.
2. Run `rake` in your project directory to build the frameworks and libraries.
3. Add a Cocoa or Cocoa Touch Unit Testing Bundle target to your Xcode project if you don't already have one.
4. For **OS X projects**, copy and add `Expecta.framework` in the `Products/osx` folder to your project's test target.
For **iOS projects**, copy and add `Expecta.framework` in the `Products/ios` folder to your project's test target.
You can also use `libExpecta.a` if you prefer to link Expecta as a static library — iOS 7.x and below require this.
6. Add `-ObjC` and `-all_load` to the **Other Linker Flags** build setting for the test target in your Xcode project.
7. You can now use Expecta in your test classes by adding the following import:
```objective-c
@import Expecta; // If you're using Expecta.framework
// OR
#import <Expecta/Expecta.h> // If you're using the static library, or the framework
```
## Built-in Matchers
## MATCHERS
> `expect(x).to.equal(y);` compares objects or primitives x and y and passes if they are identical (==) or equivalent isEqual:).
@ -132,13 +74,13 @@ You can setup Expecta using [Carthage](https://github.com/Carthage/Carthage), [C
> `expect(x).to.match(y);` passes if an instance of NSString `x` matches regular expression (given as NSString) `y` one or more times.
## Inverting Matchers
### Inverting Matchers
Every matcher's criteria can be inverted by prepending `.notTo` or `.toNot`:
>`expect(x).notTo.equal(y);` compares objects or primitives x and y and passes if they are *not* equivalent.
## Asynchronous Testing
### Asynchronous Testing
Every matcher can be made to perform asynchronous testing by prepending `.will`, `.willNot` or `after(...)`:
@ -172,14 +114,14 @@ describe(@"Foo", ^{
});
```
## Forced Failing
### Forced Failing
You can fail a test by using the `failure` attribute. This can be used to test branching.
> `failure(@"This should not happen");` outright fails a test.
## Writing New Matchers
### WRITING NEW MATCHERS
Writing a new matcher is easy with special macros provided by Expecta. Take a look at how `.beKindOf()` matcher is defined:
@ -246,7 +188,7 @@ EXPMatcherImplementationBegin(beKindOf, (Class expected)) {
EXPMatcherImplementationEnd
```
## Dynamic Predicate Matchers
## DYNAMIC PREDICATE MATCHERS
It is possible to add predicate matchers by simply defining the matcher interface, with the matcher implementation being handled at runtime by delegating to the predicate method on your object.
@ -282,6 +224,68 @@ You can now write your assertion as follows:
expect(lightSwitch).isTurnedOn();
```
## INSTALLATION
You can setup Expecta using [CocoaPods](http://github.com/CocoaPods/CocoaPods), [Carthage](https://github.com/Carthage/Carthage) or [completely manually](#setting-up-manually).
### CocoaPods
1. Add Expecta to your project's `Podfile`:
```ruby
target :MyApp do
# your app dependencies
target :MyAppTests do
inherit! search_paths
pod 'Expecta', '~> 1.0'
end
end
```
### Carthage
1. Add Expecta to your project's `Cartfile.private`:
```ruby
github "specta/expecta" "master"
```
2. Run `carthage update` in your project directory.
3. Drag the appropriate **Expecta.framework** for your platform (located in `Carthage/Build/`) into your applications Xcode project, and add it to your test target(s).
2. Run `pod update` or `pod install` in your project directory.
### Setting Up Manually
1. Clone Expecta from Github.
2. Run `rake` in your project directory to build the frameworks and libraries.
3. Add a Cocoa or Cocoa Touch Unit Testing Bundle target to your Xcode project if you don't already have one.
4. For **OS X projects**, copy and add `Expecta.framework` in the `Products/osx` folder to your project's test target.
For **iOS projects**, copy and add `Expecta.framework` in the `Products/ios` folder to your project's test target.
You can also use `libExpecta.a` if you prefer to link Expecta as a static library — iOS 7.x and below require this.
6. Add `-ObjC` and `-all_load` to the **Other Linker Flags** build setting for the test target in your Xcode project.
7. You can now use Expecta in your test classes by adding the following import:
```objective-c
@import Expecta; // If you're using Expecta.framework
// OR
#import <Expecta/Expecta.h> // If you're using the static library, or the framework
```
## STATUS
Expecta, and Specta are considered done projects, there are no plans for _active_ development on the project at the moment aside from ensuring future Xcode compatability.
Therefore it is a stable dependency, but will not be moving into the Swift world. If you are looking for that, we recommend you consider [Quick](https://github.com/quick/quick) and [Nimble](https://github.com/quick/nimble).
## Contribution Guidelines
* Please use only spaces and indent 2 spaces at a time.
@ -290,4 +294,4 @@ expect(lightSwitch).isTurnedOn();
## License
Copyright (c) 2012-2015 [Specta Team](https://github.com/specta?tab=members). This software is licensed under the [MIT License](http://github.com/specta/specta/raw/master/LICENSE).
Copyright (c) 2012-2016 [Specta Team](https://github.com/specta?tab=members). This software is licensed under the [MIT License](http://github.com/specta/specta/raw/master/LICENSE).

View File

@ -97,6 +97,14 @@ FBSDK_EXTERN NSString *const FBSDKAppEventNameViewedContent;
of methods on `FBSDKAppEvents`. Common event names are provided in the `FBAppEventName*` constants.
*/
/**
* Parameter key used to specify data for the one or more pieces of content being logged about.
* Data should be a JSON encoded string.
* Example:
* "[{\"id\": \"1234\", \"quantity\": 2, \"item_price\": 5.99}, {\"id\": \"5678\", \"quantity\": 1, \"item_price\": 9.99}]"
*/
FBSDK_EXTERN NSString *const FBSDKAppEventParameterNameContent;
/** Parameter key used to specify an ID for the specific piece of content being logged about. Could be an EAN, article identifier, etc., depending on the nature of the app. */
FBSDK_EXTERN NSString *const FBSDKAppEventParameterNameContentID;
@ -405,11 +413,11 @@ FBSDK_EXTERN NSString *const FBSDKAppEventParameterValueNo;
*/
/**
Sets a device token to register the current application installation for push notifications.
Sets and sends device token to register the current application for push notifications.
Sets a device token from `NSData` representation that you get from `UIApplicationDelegate.-application:didRegisterForRemoteNotificationsWithDeviceToken:`.
Sets and sends a device token from `NSData` representation that you get from `UIApplicationDelegate.-application:didRegisterForRemoteNotificationsWithDeviceToken:`.
- Parameter deviceToken: Device token data.
*/

View File

@ -47,7 +47,7 @@ NSString *const FBSDKAppEventNameViewedContent = @"fb_mobile_content_v
NSString *const FBSDKAppEventNameSearched = @"fb_mobile_search";
NSString *const FBSDKAppEventNameRated = @"fb_mobile_rate";
NSString *const FBSDKAppEventNameCompletedTutorial = @"fb_mobile_tutorial_completion";
NSString *const FBSDKAppEventParameterLaunchSource = @"fb_mobile_launch_source";
NSString *const FBSDKAppEventParameterLaunchSource = @"fb_mobile_launch_source";
// Ecommerce related
NSString *const FBSDKAppEventNameAddedToCart = @"fb_mobile_add_to_cart";
@ -67,6 +67,7 @@ NSString *const FBSDKAppEventNameSpentCredits = @"fb_mobile_spent_cre
NSString *const FBSDKAppEventParameterNameCurrency = @"fb_currency";
NSString *const FBSDKAppEventParameterNameRegistrationMethod = @"fb_registration_method";
NSString *const FBSDKAppEventParameterNameContentType = @"fb_content_type";
NSString *const FBSDKAppEventParameterNameContent = @"fb_content";
NSString *const FBSDKAppEventParameterNameContentID = @"fb_content_id";
NSString *const FBSDKAppEventParameterNameSearchString = @"fb_search_string";
NSString *const FBSDKAppEventParameterNameSuccess = @"fb_success";
@ -153,6 +154,8 @@ NSString *const FBSDKAppEventParameterDialogOutcome = @"fb_dialog_
NSString *const FBSDKAppEventParameterDialogErrorMessage = @"fb_dialog_outcome_error_message";
NSString *const FBSDKAppEventParameterDialogMode = @"fb_dialog_mode";
NSString *const FBSDKAppEventParameterDialogShareContentType = @"fb_dialog_share_content_type";
NSString *const FBSDKAppEventParameterDialogShareContentUUID = @"fb_dialog_share_content_uuid";
NSString *const FBSDKAppEventParameterDialogShareContentPageID = @"fb_dialog_share_content_page_id";
NSString *const FBSDKAppEventParameterShareTrayActivityName = @"fb_share_tray_activity";
NSString *const FBSDKAppEventParameterShareTrayResult = @"fb_share_tray_result";
NSString *const FBSDKAppEventParameterLogTime = @"_logTime";
@ -173,11 +176,15 @@ NSString *const FBSDKAppEventsDialogShareModeFeedBrowser = @"FeedBrowser";
NSString *const FBSDKAppEventsDialogShareModeFeedWeb = @"FeedWeb";
NSString *const FBSDKAppEventsDialogShareModeUnknown = @"Unknown";
NSString *const FBSDKAppEventsDialogShareContentTypeOpenGraph = @"OpenGraph";
NSString *const FBSDKAppEventsDialogShareContentTypeStatus = @"Status";
NSString *const FBSDKAppEventsDialogShareContentTypePhoto = @"Photo";
NSString *const FBSDKAppEventsDialogShareContentTypeVideo = @"Video";
NSString *const FBSDKAppEventsDialogShareContentTypeUnknown = @"Unknown";
NSString *const FBSDKAppEventsDialogShareContentTypeOpenGraph = @"OpenGraph";
NSString *const FBSDKAppEventsDialogShareContentTypeStatus = @"Status";
NSString *const FBSDKAppEventsDialogShareContentTypePhoto = @"Photo";
NSString *const FBSDKAppEventsDialogShareContentTypeVideo = @"Video";
NSString *const FBSDKAppEventsDialogShareContentTypeCamera = @"Camera";
NSString *const FBSDKAppEventsDialogShareContentTypeMessengerGenericTemplate = @"GenericTemplate";
NSString *const FBSDKAppEventsDialogShareContentTypeMessengerMediaTemplate = @"MediaTemplate";
NSString *const FBSDKAppEventsDialogShareContentTypeMessengerOpenGraphMusicTemplate = @"OpenGraphMusicTemplate";
NSString *const FBSDKAppEventsDialogShareContentTypeUnknown = @"Unknown";
NSString *const FBSDKAppEventsLoggingResultNotification = @"com.facebook.sdk:FBSDKAppEventsLoggingResultNotification";
@ -185,9 +192,11 @@ NSString *const FBSDKAppEventsOverrideAppIDBundleKey = @"FacebookLoggingOverride
//
// Push Notifications
//
// Activities Endpoint Parameter
static NSString *const FBSDKActivitesParameterPushDeviceToken = @"device_token";
// Event Name
// Event Names
static NSString *const FBSDKAppEventNamePushTokenObtained = @"fb_mobile_obtain_push_token";
static NSString *const FBSDKAppEventNamePushOpened = @"fb_mobile_push_opened";
// Event Parameter
static NSString *const FBSDKAppEventParameterPushCampaign = @"fb_push_campaign";
@ -326,7 +335,7 @@ static NSString *g_overrideAppID = nil;
[[FBSDKAppEvents singleton] instanceLogEvent:eventName
valueToSum:valueToSum
parameters:parameters
isImplicitlyLogged:NO
isImplicitlyLogged:(BOOL)parameters[FBSDKAppEventParameterImplicitlyLogged]
accessToken:accessToken];
}
@ -423,7 +432,22 @@ static NSString *g_overrideAppID = nil;
+ (void)setPushNotificationsDeviceToken:(NSData *)deviceToken
{
[FBSDKAppEvents singleton].pushNotificationsDeviceTokenString = [FBSDKInternalUtility hexadecimalStringFromData:deviceToken];
NSString *deviceTokenString = [FBSDKInternalUtility hexadecimalStringFromData:deviceToken];
if (deviceTokenString == nil) {
[FBSDKAppEvents singleton].pushNotificationsDeviceTokenString = nil;
return;
}
if (![deviceTokenString isEqualToString:([FBSDKAppEvents singleton].pushNotificationsDeviceTokenString)]) {
[FBSDKAppEvents singleton].pushNotificationsDeviceTokenString = deviceTokenString;
[FBSDKAppEvents logEvent:FBSDKAppEventNamePushTokenObtained];
// Unless the behavior is set to only allow explicit flushing, we go ahead and flush the event
if ([FBSDKAppEvents flushBehavior] != FBSDKAppEventsFlushBehaviorExplicitOnly) {
[[FBSDKAppEvents singleton] flushForReason:FBSDKAppEventsFlushReasonEagerlyFlushingEvent];
}
}
}
+ (FBSDKAppEventsFlushBehavior)flushBehavior
@ -507,7 +531,7 @@ static NSString *g_overrideAppID = nil;
return;
}
NSDictionary *params = @{ @"data" : dataJSONString };
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc] initWithGraphPath:[NSString stringWithFormat:@"%@/user_properties", [FBSDKSettings appID]]
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc] initWithGraphPath:[NSString stringWithFormat:@"%@/user_properties", [[self singleton] appID]]
parameters:params
tokenString:[FBSDKAccessToken currentAccessToken].tokenString
HTTPMethod:@"POST"
@ -668,7 +692,6 @@ static NSString *g_overrideAppID = nil;
if (isImplicitlyLogged) {
eventDictionary[FBSDKAppEventParameterImplicitlyLogged] = @"1";
}
[FBSDKInternalUtility dictionary:eventDictionary setObject:_userID forKey:@"_app_user_id"];
NSString *currentViewControllerName;
if ([NSThread isMainThread]) {
@ -766,6 +789,7 @@ static NSString *g_overrideAppID = nil;
[FBSDKAppEventsUtility ensureOnMainThread:NSStringFromSelector(_cmd) className:NSStringFromClass([self class])];
[self fetchServerConfiguration:^(void) {
NSString *receipt_data = [appEventsState extractReceiptData];
NSString *JSONString = [appEventsState JSONStringForEvents:_serverConfiguration.implicitLoggingEnabled];
NSData *encodedEvents = [JSONString dataUsingEncoding:NSUTF8StringEncoding];
if (!encodedEvents) {
@ -777,6 +801,11 @@ static NSString *g_overrideAppID = nil;
activityParametersDictionaryForEvent:@"CUSTOM_APP_EVENTS"
implicitEventsOnly:appEventsState.areAllEventsImplicit
shouldAccessAdvertisingID:_serverConfiguration.advertisingIDEnabled];
NSInteger length = [receipt_data length];
if (length > 0) {
postParameters[@"receipt_data"] = receipt_data;
}
postParameters[@"custom_events_file"] = encodedEvents;
if (appEventsState.numSkipped > 0) {
postParameters[@"num_skipped_events"] = [NSString stringWithFormat:@"%lu", (unsigned long)appEventsState.numSkipped];

View File

@ -25,6 +25,7 @@
#import <Bolts/BFTask.h>
#import <Bolts/BFTaskCompletionSource.h>
#import "FBSDKAccessToken.h"
#import "FBSDKGraphRequest+Internal.h"
#import "FBSDKGraphRequestConnection.h"
#import "FBSDKInternalUtility.h"

View File

@ -50,13 +50,13 @@
- Parameter annotation: The annotation as passed to [UIApplicationDelegate application:openURL:sourceApplication:annotation:].
- Returns: YES if the url was intended for the Facebook SDK, NO if not.
*/
*/
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation;
#if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_9_3
#if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_9_0
/**
Call this method from the [UIApplicationDelegate application:openURL:options:] method
of the AppDelegate for your app. It should be invoked for the proper processing of responses during interaction

View File

@ -21,6 +21,10 @@
#import <objc/runtime.h>
#if !TARGET_OS_TV
#import <SafariServices/SafariServices.h>
#endif
#import "FBSDKAppEvents+Internal.h"
#import "FBSDKConstants.h"
#import "FBSDKDynamicFrameworkLoader.h"
@ -51,6 +55,9 @@ static NSString *const FBSDKAppLinkInboundEvent = @"fb_al_inbound";
FBSDKBridgeAPIRequest *_pendingRequest;
FBSDKBridgeAPICallbackBlock _pendingRequestCompletionBlock;
id<FBSDKURLOpening> _pendingURLOpen;
#ifdef __IPHONE_11_0
SFAuthenticationSession *_authenticationSession NS_AVAILABLE_IOS(11_0);
#endif
#endif
BOOL _expectingBackground;
UIViewController *_safariViewController;
@ -123,7 +130,7 @@ static NSString *const FBSDKAppLinkInboundEvent = @"fb_al_inbound";
#pragma mark - UIApplicationDelegate
#if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_9_3
#if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_9_0
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
@ -165,6 +172,12 @@ static NSString *const FBSDKAppLinkInboundEvent = @"fb_al_inbound";
completion:completePendingOpenURLBlock];
_safariViewController = nil;
} else {
#ifdef __IPHONE_11_0
if (_authenticationSession != nil) {
[_authenticationSession cancel];
_authenticationSession = nil;
}
#endif
completePendingOpenURLBlock();
}
if ([pendingURLOpen canOpenURL:url
@ -189,6 +202,7 @@ static NSString *const FBSDKAppLinkInboundEvent = @"fb_al_inbound";
// fetch app settings
[FBSDKServerConfigurationManager loadServerConfigurationWithCompletionBlock:NULL];
[self _logSDKInitialize];
#if !TARGET_OS_TV
FBSDKProfile *cachedProfile = [FBSDKProfile fetchCachedProfile];
[FBSDKProfile setCurrentProfile:cachedProfile];
@ -227,7 +241,13 @@ static NSString *const FBSDKAppLinkInboundEvent = @"fb_al_inbound";
// _expectingBackground can be YES if the caller started doing work (like login)
// within the app delegate's lifecycle like openURL, in which case there
// might have been a "didBecomeActive" event pending that we want to ignore.
if (!_expectingBackground && !_safariViewController && !_isDismissingSafariViewController) {
BOOL notExpectingBackground = !_expectingBackground && !_safariViewController && !_isDismissingSafariViewController;
#if !TARGET_OS_TV
#ifdef __IPHONE_11_0
notExpectingBackground = notExpectingBackground && !_authenticationSession;
#endif
#endif
if (notExpectingBackground) {
_active = YES;
#if !TARGET_OS_TV
[_pendingURLOpen applicationDidBecomeActive:[notification object]];
@ -243,7 +263,7 @@ static NSString *const FBSDKAppLinkInboundEvent = @"fb_al_inbound";
#if !TARGET_OS_TV
- (void)openURL:(NSURL *)url sender:(id<FBSDKURLOpening>)sender handler:(void(^)(BOOL))handler
- (void)openURL:(NSURL *)url sender:(id<FBSDKURLOpening>)sender handler:(void(^)(BOOL, NSError *))handler
{
_expectingBackground = YES;
_pendingURLOpen = sender;
@ -251,7 +271,9 @@ static NSString *const FBSDKAppLinkInboundEvent = @"fb_al_inbound";
// Dispatch openURL calls to prevent hangs if we're inside the current app delegate's openURL flow already
NSOperatingSystemVersion iOS10Version = { .majorVersion = 10, .minorVersion = 0, .patchVersion = 0 };
if ([FBSDKInternalUtility isOSRunTimeVersionAtLeast:iOS10Version]) {
[[UIApplication sharedApplication] openURL:url options:@{} completionHandler:handler];
[[UIApplication sharedApplication] openURL:url options:@{} completionHandler:^(BOOL success) {
handler(success, nil);
}];
} else {
BOOL opened = [[UIApplication sharedApplication] openURL:url];
@ -264,7 +286,7 @@ static NSString *const FBSDKAppLinkInboundEvent = @"fb_al_inbound";
}
}
if (handler) {
handler(opened);
handler(opened, nil);
}
}
});
@ -287,7 +309,7 @@ static NSString *const FBSDKAppLinkInboundEvent = @"fb_al_inbound";
}
_pendingRequest = request;
_pendingRequestCompletionBlock = [completionBlock copy];
void (^handler)(BOOL) = ^(BOOL openedURL) {
void (^handler)(BOOL, NSError *) = ^(BOOL openedURL, NSError *anError) {
if (!openedURL) {
_pendingRequest = nil;
_pendingRequestCompletionBlock = nil;
@ -315,7 +337,7 @@ static NSString *const FBSDKAppLinkInboundEvent = @"fb_al_inbound";
- (void)openURLWithSafariViewController:(NSURL *)url
sender:(id<FBSDKURLOpening>)sender
fromViewController:(UIViewController *)fromViewController
handler:(void(^)(BOOL))handler
handler:(void(^)(BOOL, NSError *))handler
{
if (![url.scheme hasPrefix:@"http"]) {
[self openURL:url sender:sender handler:handler];
@ -325,6 +347,23 @@ static NSString *const FBSDKAppLinkInboundEvent = @"fb_al_inbound";
_expectingBackground = NO;
_pendingURLOpen = sender;
#ifdef __IPHONE_11_0
if ([sender isAuthenticationURL:url]) {
Class SFAuthenticationSessionClass = fbsdkdfl_SFAuthenticationSessionClass();
if (SFAuthenticationSessionClass != nil) {
_authenticationSession = [[SFAuthenticationSessionClass alloc] initWithURL:url callbackURLScheme:[FBSDKInternalUtility appURLScheme] completionHandler:^ (NSURL *aURL, NSError *error) {
handler(error == nil, error);
if (error == nil) {
[self application:[UIApplication sharedApplication] openURL:aURL sourceApplication:@"com.apple" annotation:nil];
}
_authenticationSession = nil;
}];
[_authenticationSession start];
return;
}
}
#endif
// trying to dynamically load SFSafariViewController class
// so for the cases when it is available we can send users through Safari View Controller flow
// in cases it is not available regular flow will be selected
@ -332,6 +371,12 @@ static NSString *const FBSDKAppLinkInboundEvent = @"fb_al_inbound";
if (SFSafariViewControllerClass) {
UIViewController *parent = fromViewController ?: [FBSDKInternalUtility topMostViewController];
if (parent == nil) {
[FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors
formatString:@"There are no valid ViewController to present SafariViewController with", nil];
return;
}
NSURLComponents *components = [NSURLComponents componentsWithURL:url resolvingAgainstBaseURL:NO];
NSURLQueryItem *sfvcQueryItem = [[NSURLQueryItem alloc] initWithName:@"sfvc" value:@"1"];
[components setQueryItems:[components.queryItems arrayByAddingObject:sfvcQueryItem]];
@ -360,7 +405,7 @@ static NSString *const FBSDKAppLinkInboundEvent = @"fb_al_inbound";
// Assuming Safari View Controller always opens
if (handler) {
handler(YES);
handler(YES, nil);
}
} else {
[self openURL:url sender:sender handler:handler];
@ -415,12 +460,14 @@ static NSString *const FBSDKAppLinkInboundEvent = @"fb_al_inbound";
return;
}
NSDictionary * applinkData = [FBSDKInternalUtility objectForJSONString:applinkDataString error:NULL];
NSDictionary *applinkData = [FBSDKInternalUtility objectForJSONString:applinkDataString error:NULL];
if (!applinkData) {
return;
}
NSURL *targetURL = [NSURL URLWithString:applinkData[@"target_url"]];
NSString *targetURLString = applinkData[@"target_url"];
NSURL *targetURL = [targetURLString isKindOfClass:[NSString class]] ? [NSURL URLWithString:targetURLString] : nil;
NSMutableDictionary *logData = [[NSMutableDictionary alloc] init];
[FBSDKInternalUtility dictionary:logData setObject:[targetURL absoluteString] forKey:@"targetURL"];
[FBSDKInternalUtility dictionary:logData setObject:[targetURL host] forKey:@"targetURLHost"];
@ -440,6 +487,31 @@ static NSString *const FBSDKAppLinkInboundEvent = @"fb_al_inbound";
accessToken:nil];
}
- (void)_logSDKInitialize
{
NSMutableDictionary *params = [NSMutableDictionary new];
[params setObject:@1 forKey:@"core_lib_included"];
if (objc_lookUpClass("FBSDKShareDialog") != nil) {
[params setObject:@1 forKey:@"share_lib_included"];
}
if (objc_lookUpClass("FBSDKLoginManager") != nil) {
[params setObject:@1 forKey:@"login_lib_included"];
}
if (objc_lookUpClass("FBSDKPlacesManager") != nil) {
[params setObject:@1 forKey:@"places_lib_included"];
}
if (objc_lookUpClass("FBSDKMessengerButton") != nil) {
[params setObject:@1 forKey:@"messenger_lib_included"];
}
if (objc_lookUpClass("FBSDKMessengerButton") != nil) {
[params setObject:@1 forKey:@"messenger_lib_included"];
}
if (objc_lookUpClass("FBSDKTVInterfaceFactory.m") != nil) {
[params setObject:@1 forKey:@"tv_lib_included"];
}
[FBSDKAppEvents logEvent:@"fb_sdk_initialize" parameters:params];
}
#pragma mark -- (non-tvos)
#if !TARGET_OS_TV
- (BOOL)_handleBridgeAPIResponseURL:(NSURL *)responseURL sourceApplication:(NSString *)sourceApplication

View File

@ -148,7 +148,7 @@ FBSDK_EXTERN NSString *const FBSDKErrorArgumentCollectionKey;
FBSDK_EXTERN NSString *const FBSDKErrorArgumentNameKey;
/**
The userInfo key for the invalid argument value for errors with FBSDKInvalidArgumentErrorCode.
The userInfo key for the invalid argument value for errors with FBSDKInvalidArgumentErrorCode.
*/
FBSDK_EXTERN NSString *const FBSDKErrorArgumentValueKey;

View File

@ -44,5 +44,5 @@
#import <FBSDKCoreKit/FBSDKDeviceViewControllerBase.h>
#endif
#define FBSDK_VERSION_STRING @"4.19.0"
#define FBSDK_TARGET_PLATFORM_VERSION @"v2.8"
#define FBSDK_VERSION_STRING @"4.29.0"
#define FBSDK_TARGET_PLATFORM_VERSION @"v2.11"

View File

@ -87,7 +87,7 @@ NSURLSessionDataDelegate
@property (nonatomic, retain) NSMutableArray *requests;
@property (nonatomic, assign) FBSDKGraphRequestConnectionState state;
@property (nonatomic, strong) FBSDKLogger *logger;
@property (nonatomic, assign) unsigned long requestStartTime;
@property (nonatomic, assign) uint64_t requestStartTime;
@end
@ -540,7 +540,7 @@ NSURLSessionDataDelegate
error = [FBSDKError errorWithCode:FBSDKGraphRequestProtocolMismatchErrorCode
message:@"Unexpected number of results returned from server."];
} else {
[_logger appendFormat:@"Response <#%lu>\nDuration: %lu msec\nSize: %lu kB\nResponse Body:\n%@\n\n",
[_logger appendFormat:@"Response <#%lu>\nDuration: %llu msec\nSize: %lu kB\nResponse Body:\n%@\n\n",
(unsigned long)[_logger loggerSerialNumber],
[FBSDKInternalUtility currentTimeInMilliseconds] - _requestStartTime,
(unsigned long)[data length],
@ -824,7 +824,7 @@ NSURLSessionDataDelegate
if ([result isKindOfClass:[NSDictionary class]]) {
NSDictionary *errorDictionary = [FBSDKTypeUtility dictionaryValue:result[@"body"]][@"error"];
if (errorDictionary) {
if ([errorDictionary isKindOfClass:[NSDictionary class]]) {
NSMutableDictionary *userInfo = [NSMutableDictionary dictionary];
[FBSDKInternalUtility dictionary:userInfo setObject:errorDictionary[@"code"] forKey:FBSDKGraphRequestErrorGraphErrorCode];
[FBSDKInternalUtility dictionary:userInfo setObject:errorDictionary[@"error_subcode"] forKey:FBSDKGraphRequestErrorGraphErrorSubcode];

View File

@ -88,7 +88,7 @@ static FBSDKProfile *g_currentProfile;
{
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
NSString *path = [self imagePathForPictureMode:FBSDKProfilePictureModeNormal size:size];
NSString *path = [self imagePathForPictureMode:mode size:size];
#pragma clang diagnostic pop
return [FBSDKInternalUtility facebookURLWithHostPrefix:@"graph"
path:path
@ -278,9 +278,14 @@ static FBSDKProfile *g_currentProfile;
{
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
NSData *data = [userDefaults objectForKey:FBSDKProfileUserDefaultsKey];
return (data != nil)
? [NSKeyedUnarchiver unarchiveObjectWithData:data]
: nil;
if (data != nil) {
@try {
return [NSKeyedUnarchiver unarchiveObjectWithData:data];
} @catch (NSException *exception) {
return nil;
}
}
return nil;
}
@end

View File

@ -18,6 +18,7 @@
#import "FBSDKSettings+Internal.h"
#import "FBSDKAccessTokenCache.h"
#import "FBSDKCoreKit.h"
#define FBSDKSETTINGS_PLIST_CONFIGURATION_SETTING_IMPL(TYPE, PLIST_KEY, GETTER, SETTER, DEFAULT_VALUE) \
@ -44,7 +45,7 @@ NSString *const FBSDKLoggingBehaviorGraphAPIDebugWarning = @"graph_api_debug_war
NSString *const FBSDKLoggingBehaviorGraphAPIDebugInfo = @"graph_api_debug_info";
NSString *const FBSDKLoggingBehaviorNetworkRequests = @"network_requests";
static FBSDKAccessTokenCache *g_tokenCache;
static NSObject<FBSDKAccessTokenCaching> *g_tokenCache;
static NSMutableSet *g_loggingBehavior;
static NSString *g_legacyUserDefaultTokenInformationKeyName = @"FBAccessTokenInformationKey";
static NSString *const FBSDKSettingsLimitEventAndDataUsage = @"com.facebook.sdk:FBSDKSettingsLimitEventAndDataUsage";
@ -177,12 +178,12 @@ FBSDKSETTINGS_PLIST_CONFIGURATION_SETTING_IMPL(NSNumber, FacebookAutoLogAppEvent
#pragma mark - Internal
+ (FBSDKAccessTokenCache *)accessTokenCache
+ (NSObject<FBSDKAccessTokenCaching> *)accessTokenCache
{
return g_tokenCache;
}
- (void)setAccessTokenCache:(FBSDKAccessTokenCache *)cache
+ (void)setAccessTokenCache:(NSObject<FBSDKAccessTokenCaching> *)cache
{
if (g_tokenCache != cache) {
g_tokenCache = cache;

View File

@ -105,6 +105,8 @@ FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKEventAppInviteShareDialogShow
FBSDK_EXTERN NSString *const FBSDKAppEventParameterDialogMode;
FBSDK_EXTERN NSString *const FBSDKAppEventParameterDialogShareContentType;
FBSDK_EXTERN NSString *const FBSDKAppEventParameterDialogShareContentUUID;
FBSDK_EXTERN NSString *const FBSDKAppEventParameterDialogShareContentPageID;
/*! Use to log parameters for share tray use */
FBSDK_EXTERN NSString *const FBSDKAppEventParameterShareTrayActivityName;
@ -120,6 +122,10 @@ FBSDK_EXTERN NSString *const FBSDKAppEventsDialogShareContentTypeOpenGraph;
FBSDK_EXTERN NSString *const FBSDKAppEventsDialogShareContentTypeStatus;
FBSDK_EXTERN NSString *const FBSDKAppEventsDialogShareContentTypePhoto;
FBSDK_EXTERN NSString *const FBSDKAppEventsDialogShareContentTypeVideo;
FBSDK_EXTERN NSString *const FBSDKAppEventsDialogShareContentTypeCamera;
FBSDK_EXTERN NSString *const FBSDKAppEventsDialogShareContentTypeMessengerGenericTemplate;
FBSDK_EXTERN NSString *const FBSDKAppEventsDialogShareContentTypeMessengerMediaTemplate;
FBSDK_EXTERN NSString *const FBSDKAppEventsDialogShareContentTypeMessengerOpenGraphMusicTemplate;
FBSDK_EXTERN NSString *const FBSDKAppEventsDialogShareContentTypeUnknown;

View File

@ -34,5 +34,6 @@
- (BOOL)isCompatibleWithAppEventsState:(FBSDKAppEventsState *)appEventsState;
- (BOOL)isCompatibleWithTokenString:(NSString *)tokenString appID:(NSString *)appID;
- (NSString *)JSONStringForEvents:(BOOL)includeImplicitEvents;
- (NSString *)extractReceiptData;
@end

View File

@ -29,6 +29,8 @@
#define FBSDK_APPEVENTSSTATE_EVENTS_KEY @"events"
#define FBSDK_APPEVENTSSTATE_NUMSKIPPED_KEY @"numSkipped"
#define FBSDK_APPEVENTSSTATE_TOKENSTRING_KEY @"tokenString"
#define FBSDK_APPEVENTSTATE_RECEIPTDATA_KEY @"receipt_data"
#define FBSDK_APPEVENTSTATE_RECEIPTID_KEY @"receipt_id"
@implementation FBSDKAppEventsState
{
@ -122,6 +124,26 @@
}
}
- (NSString *)extractReceiptData {
NSMutableString *receipts_string = [NSMutableString string];
NSInteger transactionId = 1;
for (NSMutableDictionary* events in _mutableEvents) {
NSMutableDictionary *event = events[@"event"];
NSString* receipt = event[@"receipt_data"];
// Add receipt id as the identifier for receipt data in event parameter.
// Receipt data will be sent as post parameter rather than the event parameter
if (receipt) {
NSString* idKey = [NSString stringWithFormat:@"receipt_%ld", (long)transactionId];
event[FBSDK_APPEVENTSTATE_RECEIPTID_KEY] = idKey;
NSString* receiptWithId = [NSString stringWithFormat:@"%@::%@;;;", idKey, receipt];
[receipts_string appendString:receiptWithId];
transactionId++;
}
}
return receipts_string;
}
- (BOOL)areAllEventsImplicit
{
for (NSDictionary *event in _mutableEvents) {
@ -153,9 +175,14 @@
if (!includeImplicitEvents && [eventAndImplicitFlag[FBSDK_APPEVENTSTATE_ISIMPLICIT_KEY] boolValue]) {
continue;
}
[events addObject:eventAndImplicitFlag[@"event"]];
NSMutableDictionary *event = eventAndImplicitFlag[@"event"];
NSAssert(event != nil, @"event cannot be nil");
[event removeObjectForKey:FBSDK_APPEVENTSTATE_RECEIPTDATA_KEY];
[events addObject:event];
}
return [FBSDKInternalUtility JSONStringForObject:events error:NULL invalidObjectHandler:NULL];
}
@end

View File

@ -62,6 +62,11 @@
parameters[@"application_tracking_enabled"] = [@(!FBSDKSettings.limitEventAndDataUsage) stringValue];
NSString *userID = [FBSDKAppEvents userID];
if (userID) {
parameters[@"app_user_id"] = userID;
}
[FBSDKAppEventsDeviceInfo extendDictionaryWithDeviceInfo:parameters];
static dispatch_once_t fetchBundleOnce;

View File

@ -25,7 +25,7 @@
#import "FBSDKLogger.h"
#import "FBSDKSettings.h"
static NSString *const FBSDKAppEventParameterImplicitlyLoggedPurchase = @"_implicitlyLoggedPurchaseEvent";
static NSString *const FBSDKAppEventParameterImplicitlyLoggedPurchase = @"_implicitlyLogged";
static NSString *const FBSDKAppEventNamePurchaseFailed = @"fb_mobile_purchase_failed";
static NSString *const FBSDKAppEventParameterNameProductTitle = @"fb_content_title";
static NSString *const FBSDKAppEventParameterNameTransactionID = @"fb_transaction_id";
@ -121,6 +121,10 @@ static NSMutableArray *g_pendingRequestors;
- (void)handleTransaction:(SKPaymentTransaction *)transaction
{
// Ignore restored transaction
if (transaction.originalTransaction != nil) {
return;
}
FBSDKPaymentProductRequestor *productRequest = [[FBSDKPaymentProductRequestor alloc] initWithTransaction:transaction];
[productRequest resolveProducts];
}
@ -207,18 +211,18 @@ static NSMutableArray *g_pendingRequestors;
SKPayment *payment = self.transaction.payment;
NSMutableDictionary *eventParameters = [NSMutableDictionary dictionaryWithDictionary: @{
FBSDKAppEventParameterNameContentID: payment.productIdentifier ?: @"",
FBSDKAppEventParameterNameNumItems: @(payment.quantity),
}];
FBSDKAppEventParameterNameContentID: payment.productIdentifier ?: @"",
FBSDKAppEventParameterNameNumItems: @(payment.quantity),
}];
double totalAmount = 0;
if (product) {
totalAmount = payment.quantity * product.price.doubleValue;
[eventParameters addEntriesFromDictionary: @{
FBSDKAppEventParameterNameCurrency: [product.priceLocale objectForKey:NSLocaleCurrencyCode],
FBSDKAppEventParameterNameNumItems: @(payment.quantity),
FBSDKAppEventParameterNameProductTitle: [self getTruncatedString:product.localizedTitle],
FBSDKAppEventParameterNameDescription: [self getTruncatedString:product.localizedDescription],
}];
FBSDKAppEventParameterNameCurrency: [product.priceLocale objectForKey:NSLocaleCurrencyCode],
FBSDKAppEventParameterNameNumItems: @(payment.quantity),
FBSDKAppEventParameterNameProductTitle: [self getTruncatedString:product.localizedTitle],
FBSDKAppEventParameterNameDescription: [self getTruncatedString:product.localizedDescription],
}];
if (transactionID) {
[eventParameters setObject:transactionID forKey:FBSDKAppEventParameterNameTransactionID];
}
@ -266,10 +270,19 @@ static NSMutableArray *g_pendingRequestors;
valueToSum:(double)valueToSum
parameters:(NSDictionary *)parameters {
NSMutableDictionary *eventParameters = [NSMutableDictionary dictionaryWithDictionary:parameters];
[eventParameters setObject:@"1" forKey:FBSDKAppEventParameterImplicitlyLoggedPurchase];
if ([eventName isEqualToString:FBSDKAppEventNamePurchased]) {
NSData* receipt = [self fetchDeviceReceipt];
if (receipt) {
NSString *base64encodedReceipt = [receipt base64EncodedStringWithOptions:0];
eventParameters[@"receipt_data"] = base64encodedReceipt;
}
}
[eventParameters setObject:@"1"forKey:FBSDKAppEventParameterImplicitlyLoggedPurchase];
[FBSDKAppEvents logEvent:eventName
valueToSum:valueToSum
parameters:parameters];
parameters:eventParameters];
// Unless the behavior is set to only allow explicit flushing, we go ahead and flush, since purchase events
// are relatively rare and relatively high value and worth getting across on wire right away.
@ -278,4 +291,11 @@ static NSMutableArray *g_pendingRequestors;
}
}
// Fetch the current receipt for this application.
- (NSData*)fetchDeviceReceipt {
NSURL *receiptURL = [[NSBundle bundleForClass:[self class]] appStoreReceiptURL];
NSData *receipt = [NSData dataWithContentsOfURL:receiptURL];
return receipt;
}
@end

View File

@ -79,7 +79,7 @@ static const long INACTIVE_SECONDS_QUANTA[] =
* do to other device activity, like a text message, so this class allows those interruptions to be smoothed
* out and the time actually spent in the app excluding this interruption time to be accumulated. Also,
* once a certain amount of time has gone by where the app is not in the foreground, we consider the
* session to be complete, and a new session beginning. When this occurs, we log an 'activate app' event
* session to be complete, and a new session beginning. When this occurs, we log a 'deactivate app' event
* with the duration of the previous session as the 'value' of this event, along with the number of
* interruptions from that previous session as an event parameter.
*/

View File

@ -60,7 +60,8 @@ NSString *const FBSDKBridgeAPIVersionKey = @"version";
_protocolMap = @{
@(FBSDKBridgeAPIProtocolTypeNative): @{
FBSDK_CANOPENURL_FACEBOOK:[[FBSDKBridgeAPIProtocolNativeV1 alloc] initWithAppScheme:@"fbapi20130214"],
FBSDK_CANOPENURL_MESSENGER:[[FBSDKBridgeAPIProtocolNativeV1 alloc] initWithAppScheme:@"fb-messenger-api20140430"]
FBSDK_CANOPENURL_MESSENGER:[[FBSDKBridgeAPIProtocolNativeV1 alloc] initWithAppScheme:@"fb-messenger-share-api"],
FBSDK_CANOPENURL_MSQRD_PLAYER:[[FBSDKBridgeAPIProtocolNativeV1 alloc] initWithAppScheme:@"msqrdplayer-api20170208"]
},
@(FBSDKBridgeAPIProtocolTypeWeb): @{
@"https": [[FBSDKBridgeAPIProtocolWebV1 alloc] init],

View File

@ -36,4 +36,6 @@
- (void)applicationDidBecomeActive:(UIApplication *)application;
- (BOOL)isAuthenticationURL:(NSURL *)url;
@end

View File

@ -43,9 +43,9 @@ typedef void(^FBSDKBridgeAPICallbackBlock)(FBSDKBridgeAPIResponse *response);
- (void)openURLWithSafariViewController:(NSURL *)url
sender:(id<FBSDKURLOpening>)sender
fromViewController:(UIViewController *)fromViewController
handler:(void(^)(BOOL))handler;
handler:(void(^)(BOOL, NSError *))handler;
- (void)openURL:(NSURL *)url sender:(id<FBSDKURLOpening>)sender handler:(void(^)(BOOL))handler;
- (void)openURL:(NSURL *)url sender:(id<FBSDKURLOpening>)sender handler:(void(^)(BOOL, NSError *))handler;
#endif

View File

@ -61,6 +61,7 @@
#import "FBSDKInternalUtility.h"
#import "FBSDKLogger.h"
#import "FBSDKMath.h"
#import "FBSDKSettings+Internal.h"
#import "FBSDKTypeUtility.h"
#import "Network/FBSDKGraphRequest+Internal.h"
#import "Network/FBSDKGraphRequestConnection+Internal.h"

View File

@ -179,6 +179,7 @@ FBSDK_EXTERN Class fbsdkdfl_ASIdentifierManagerClass(void);
#pragma mark - SafariServices Classes
FBSDK_EXTERN Class fbsdkdfl_SFSafariViewControllerClass(void);
FBSDK_EXTERN Class fbsdkdfl_SFAuthenticationSessionClass(void);
#pragma mark - Accounts Constants

View File

@ -21,7 +21,8 @@
#define FBSDK_CANOPENURL_FACEBOOK @"fbauth2"
#define FBSDK_CANOPENURL_FBAPI @"fbapi"
#define FBSDK_CANOPENURL_MESSENGER @"fb-messenger-api"
#define FBSDK_CANOPENURL_MESSENGER @"fb-messenger-share-api"
#define FBSDK_CANOPENURL_MSQRD_PLAYER @"msqrdplayer"
#define FBSDK_CANOPENURL_SHARE_EXTENSION @"fbshareextension"
typedef NS_ENUM(int32_t, FBSDKUIKitVersion)
@ -88,7 +89,7 @@ typedef NS_ENUM(int32_t, FBSDKUIKitVersion)
Changes in the system clock will affect this value.
- Returns: The number of milliseconds since the Unix Epoch.
*/
+ (unsigned long)currentTimeInMilliseconds;
+ (uint64_t)currentTimeInMilliseconds;
/**
Sets an object for a key in a dictionary if it is not nil.
@ -313,6 +314,11 @@ setJSONStringForObject:(id)object
*/
+ (BOOL)isRegisteredURLScheme:(NSString *)urlScheme;
/**
returns the current key window
*/
+ (UIWindow *)findWindow;
/**
returns currently displayed top view controller.
*/
@ -342,6 +348,7 @@ setJSONStringForObject:(id)object
+ (BOOL)isFacebookAppInstalled;
+ (BOOL)isMessengerAppInstalled;
+ (BOOL)isMSQRDPlayerAppInstalled;
+ (void)checkRegisteredCanOpenURLScheme:(NSString *)urlScheme;
+ (BOOL)isRegisteredCanOpenURLScheme:(NSString *)urlScheme;

View File

@ -110,11 +110,11 @@ typedef NS_ENUM(NSUInteger, FBSDKInternalUtilityVersionShift)
return value;
}
+ (unsigned long)currentTimeInMilliseconds
+ (uint64_t)currentTimeInMilliseconds
{
struct timeval time;
gettimeofday(&time, NULL);
return (time.tv_sec * 1000) + (time.tv_usec / 1000);
return ((uint64_t)time.tv_sec * 1000) + (time.tv_usec / 1000);
}
+ (BOOL)dictionary:(NSMutableDictionary *)dictionary
@ -493,11 +493,7 @@ static NSMapTable *_transientObjects;
dispatch_once(&onceToken, ^{
[FBSDKInternalUtility checkRegisteredCanOpenURLScheme:FBSDK_CANOPENURL_FACEBOOK];
});
NSURLComponents *components = [[NSURLComponents alloc] init];
components.scheme = FBSDK_CANOPENURL_FACEBOOK;
components.path = @"/";
return [[UIApplication sharedApplication]
canOpenURL:components.URL];
return [self _canOpenURLScheme:FBSDK_CANOPENURL_FACEBOOK];
}
+ (BOOL)isMessengerAppInstalled
@ -506,12 +502,16 @@ static NSMapTable *_transientObjects;
dispatch_once(&onceToken, ^{
[FBSDKInternalUtility checkRegisteredCanOpenURLScheme:FBSDK_CANOPENURL_MESSENGER];
});
NSURLComponents *components = [[NSURLComponents alloc] init];
components.scheme = FBSDK_CANOPENURL_MESSENGER;
components.path = @"/";
return [[UIApplication sharedApplication]
canOpenURL:components.URL];
return [self _canOpenURLScheme:FBSDK_CANOPENURL_MESSENGER];
}
+ (BOOL)isMSQRDPlayerAppInstalled
{
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
[FBSDKInternalUtility checkRegisteredCanOpenURLScheme:FBSDK_CANOPENURL_MSQRD_PLAYER];
});
return [self _canOpenURLScheme:FBSDK_CANOPENURL_MSQRD_PLAYER];
}
#pragma mark - Object Lifecycle
@ -583,6 +583,14 @@ static NSMapTable *_transientObjects;
return object;
}
+ (BOOL)_canOpenURLScheme:(NSString *)scheme
{
NSURLComponents *components = [[NSURLComponents alloc] init];
components.scheme = scheme;
components.path = @"/";
return [[UIApplication sharedApplication] canOpenURL:components.URL];
}
+ (void)validateAppID
{
if (![FBSDKSettings appID]) {
@ -622,10 +630,34 @@ static NSMapTable *_transientObjects;
}
}
+ (UIWindow *)findWindow
{
UIWindow *window = [UIApplication sharedApplication].keyWindow;
if (window == nil || window.windowLevel != UIWindowLevelNormal) {
for (window in [UIApplication sharedApplication].windows) {
if (window.windowLevel == UIWindowLevelNormal) {
break;
}
}
}
if (window == nil) {
[FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors
formatString:@"Unable to find a valid UIWindow", nil];
}
return window;
}
+ (UIViewController *)topMostViewController
{
UIViewController *topController = [UIApplication sharedApplication].keyWindow.rootViewController;
UIWindow *keyWindow = [self findWindow];
// SDK expects a key window at this point, if it is not, make it one
if (keyWindow != nil && !keyWindow.isKeyWindow) {
[FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors
formatString:@"Unable to obtain a key window, marking %@ as keyWindow", keyWindow.description];
[keyWindow makeKeyWindow];
}
UIViewController *topController = keyWindow.rootViewController;
while (topController.presentedViewController) {
topController = topController.presentedViewController;
}

View File

@ -163,11 +163,11 @@ static NSMutableDictionary *g_startTimesWithTags = nil;
// Only log if there's been an associated start time.
if (startTimeNumber) {
unsigned long elapsed = [FBSDKInternalUtility currentTimeInMilliseconds] - startTimeNumber.unsignedLongValue;
uint64_t elapsed = [FBSDKInternalUtility currentTimeInMilliseconds] - startTimeNumber.unsignedLongLongValue;
[g_startTimesWithTags removeObjectForKey:tagAsNumber]; // served its purpose, remove
// Log string is appended with "%d msec", with nothing intervening. This gives the most control to the caller.
logString = [NSString stringWithFormat:@"%@%lu msec", logString, elapsed];
logString = [NSString stringWithFormat:@"%@%llu msec", logString, elapsed];
[self singleShotLogEntry:loggingBehavior logEntry:logString];
}
@ -188,12 +188,12 @@ static NSMutableDictionary *g_startTimesWithTags = nil;
@"Unexpectedly large number of outstanding perf logging start times, something is likely wrong."];
}
unsigned long currTime = [FBSDKInternalUtility currentTimeInMilliseconds];
uint64_t currTime = [FBSDKInternalUtility currentTimeInMilliseconds];
// Treat the incoming object tag simply as an address, since it's only used to identify during lifetime. If
// we send in as an object, the dictionary will try to copy it.
unsigned long tagAsNumber = (unsigned long)(__bridge void *)timestampTag;
[g_startTimesWithTags setObject:[NSNumber numberWithUnsignedLong:currTime]
[g_startTimesWithTags setObject:@(currTime)
forKey:[NSNumber numberWithUnsignedLong:tagAsNumber]];
}
}

View File

@ -16,14 +16,15 @@
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#import "FBSDKAccessTokenCache.h"
#import "FBSDKSettings.h"
#import <FBSDKCoreKit/FBSDKSettings.h>
@protocol FBSDKAccessTokenCaching;
@interface FBSDKSettings(Internal)
+ (FBSDKAccessTokenCache *)accessTokenCache;
+ (NSObject<FBSDKAccessTokenCaching> *)accessTokenCache;
- (void)setAccessTokenCache;
+ (void)setAccessTokenCache:(NSObject<FBSDKAccessTokenCaching> *)accessTokenCache;
+ (NSString *)graphAPIDebugParamValue;

View File

@ -18,6 +18,7 @@
#import "FBSDKSystemAccountStoreAdapter.h"
#import "FBSDKAccessToken.h"
#import "FBSDKConstants.h"
#import "FBSDKDynamicFrameworkLoader.h"
#import "FBSDKError.h"

View File

@ -29,7 +29,7 @@
@property (nonatomic, retain) NSMutableData *data;
@property (nonatomic, copy) FBSDKURLConnectionHandler handler;
@property (nonatomic, retain) NSURLResponse *response;
@property (nonatomic) unsigned long requestStartTime;
@property (nonatomic, assign) uint64_t requestStartTime;
@property (nonatomic, readonly) NSUInteger loggerSerialNumber;
@end
@ -83,7 +83,7 @@
responseData:(NSData *)responseData {
// Basic FBSDKURLConnection logging just prints out the URL. FBSDKGraphRequest logging provides more details.
NSString *mimeType = [response MIMEType];
NSMutableString *mutableLogEntry = [NSMutableString stringWithFormat:@"FBSDKURLConnection <#%lu>:\n Duration: %lu msec\nResponse Size: %lu kB\n MIME type: %@\n",
NSMutableString *mutableLogEntry = [NSMutableString stringWithFormat:@"FBSDKURLConnection <#%lu>:\n Duration: %llu msec\nResponse Size: %lu kB\n MIME type: %@\n",
(unsigned long)self.loggerSerialNumber,
[FBSDKInternalUtility currentTimeInMilliseconds] - self.requestStartTime,
(unsigned long)[responseData length] / 1024,

View File

@ -27,7 +27,7 @@
@property (nonatomic, strong) NSURLSessionTask *task;
@property (nonatomic, copy) FBSDKURLSessionTaskHandler handler;
@property (nonatomic, assign) unsigned long requestStartTime;
@property (nonatomic, assign) uint64_t requestStartTime;
@property (nonatomic, assign, readonly) NSUInteger loggerSerialNumber;
@end
@ -85,7 +85,7 @@
responseData:(NSData *)responseData {
// Basic FBSDKURLSessionTask logging just prints out the URL. FBSDKGraphRequest logging provides more details.
NSString *mimeType = [response MIMEType];
NSMutableString *mutableLogEntry = [NSMutableString stringWithFormat:@"FBSDKURLSessionTask <#%lu>:\n Duration: %lu msec\nResponse Size: %lu kB\n MIME type: %@\n",
NSMutableString *mutableLogEntry = [NSMutableString stringWithFormat:@"FBSDKURLSessionTask <#%lu>:\n Duration: %llu msec\nResponse Size: %lu kB\n MIME type: %@\n",
(unsigned long)self.loggerSerialNumber,
[FBSDKInternalUtility currentTimeInMilliseconds] - self.requestStartTime,
(unsigned long)[responseData length] / 1024,

View File

@ -21,6 +21,7 @@
#import "FBSDKAccessToken.h"
#import "FBSDKDynamicFrameworkLoader.h"
#import "FBSDKInternalUtility.h"
#import "FBSDKLogger.h"
#import "FBSDKSettings.h"
#import "FBSDKTypeUtility.h"
#import "FBSDKWebDialogView.h"
@ -81,8 +82,10 @@ static FBSDKWebDialog *g_currentDialog = nil;
g_currentDialog = self;
UIWindow *window = [self _findWindow];
UIWindow *window = [FBSDKInternalUtility findWindow];
if (!window) {
[FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors
formatString:@"There are no valid ViewController to present FBSDKWebDialog", nil];
[self _failWithError:nil];
return NO;
}
@ -209,19 +212,6 @@ static FBSDKWebDialog *g_currentDialog = nil;
});
}
- (UIWindow *)_findWindow
{
UIWindow *window = [UIApplication sharedApplication].keyWindow;
if (window == nil || window.windowLevel != UIWindowLevelNormal) {
for (window in [UIApplication sharedApplication].windows) {
if (window.windowLevel == UIWindowLevelNormal) {
break;
}
}
}
return window;
}
- (NSURL *)_generateURL:(NSError **)errorRef
{
NSMutableDictionary *parameters = [[NSMutableDictionary alloc] init];
@ -241,8 +231,10 @@ static FBSDKWebDialog *g_currentDialog = nil;
- (BOOL)_showWebView
{
UIWindow *window = [self _findWindow];
UIWindow *window = [FBSDKInternalUtility findWindow];
if (!window) {
[FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors
formatString:@"There are no valid ViewController to present FBSDKWebDialog", nil];
[self _failWithError:nil];
return NO;
}

View File

@ -375,6 +375,12 @@ Class fbsdkdfl_SFSafariViewControllerClass(void)
return c;
}
Class fbsdkdfl_SFAuthenticationSessionClass(void)
{
_fbsdkdfl_SafariServices_get_c(SFAuthenticationSession);
return c;
}
#pragma mark - Accounts Constants
_fbsdkdfl_load_framework_once_impl_(Accounts)

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "Besoek %@ op jou slimfoon of rekenaar en voer hierdie kode in:";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "Besoek %@ en voer die kode in wat hierbo vertoon word.";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "Om jou rekening te verbind, maak die Facebook-toepassing op jou mobiele toestel oop en kontroleer vir kennisgewings.";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = "- OF -";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "Goed";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "Deel";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "Nie jy nie?";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "Bevestig aantekening";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "Gaan voort as %@";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "زر %@ على هاتفك الذكي أو الكمبيوتر ثم أدخل هذا الرمز:";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "تفضل بزيارة %@ وإدخال الرمز الموضح أدناه.";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "لربط حسابك، افتح تطبيق فيسبوك على جهازك المحمول ثم تفقد الإشعارات.";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = "- أو -";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "موافق";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "مشاركة";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "لست أنت؟";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "تأكيد تسجيل الدخول";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "متابعة باسم %@";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "আপনার কম্পিউটার বা স্মার্টফোন থেকে %@ এ যান এবং এই কোডটিকে প্রবেশ করান:";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "%@ -এ যান এবং উপরে যে কোডটি দেখানো হয়েছে সেটি লিখুন।";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "আপনার অ্যাকাউন্টে সংযোগ করতে, আপনার মোবাইল ডিভাইসে Facebook অ্যাপটি খুলুন এবং বিজ্ঞপ্তি চেক করুন।";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = "- অথবা -";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "ঠিক আছে";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "ভাগ করুন";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "আপনি নন?";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "লগ ইন নিশ্চিত করুন";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "%@ হিসেবে চালিয়ে যান";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "Přejděte ze smartphonu nebo počítače na %@ a zadejte tento kód:";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "Navštivte %@ a zadejte nahoře uvedený kód.";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "Účet si můžete připojit tak, že si na mobilním zařízení spustíte aplikaci Facebook a podíváte se do upozornění.";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = "- NEBO -";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "OK";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "Sdílet";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "Nejste to vy?";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "Potvrdit přihlášení";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "Pokračovat jako %@";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "Gå til %@ på din smartphone eller computer, og indtast denne kode:";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "Gå til %@, og indtast den kode, der er angivet ovenfor.";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "Du kan tilknytte din konto ved at åbne Facebook-appen på din mobilenhed og tjekke notifikationerne.";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = "- ELLER -";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "OK";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "Del";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "Ikke dig?";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "Bekræft login";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "Fortsæt som %@";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "Gehe über dein Smartphone oder deinen Computer zu %@ und gib diesen Code ein:";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "Besuche %@ und gib den oben angezeigten Code ein.";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "Um dein Konto zu verbinden, öffne die Facebook-App auf deinem Mobilgerät und prüfe, ob du Benachrichtigungen erhalten hast.";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = " ODER ";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "OK";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "Teilen";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "Nicht du?";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "Login bestätigen";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "Fortfahren als %@";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "Επισκεφτείτε τον ιστότοπο %@ από το smartphone ή τον υπολογιστή σας και πληκτρολογήστε αυτόν τον κωδικό:";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "Επισκεφτείτε τη διεύθυνση %@ και συμπληρώστε τον παραπάνω κωδικό.";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "Για να συνδεθείτε στο λογαριασμό σας, ανοίξτε την εφαρμογή Facebook στη φορητή συσκευή σας και ελέγξτε τις ειδοποιήσεις.";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = "- Ή -";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "OK";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "Κοινοποίηση";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "Δεν είστε εσείς;";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "Επιβεβαίωση σύνδεσης";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "Συνέχεια ως %@";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "Visit %@ on your smartphone or computer and enter this code:";
"DeviceLogin.LogInPrompt" = "Visit %@ and enter the code shown above.";
/* The 'or' string for smart login instructions */
"DeviceLogin.SmartLogInOrLabel" = "-- OR --";
/* The string for smart login instructions */
"DeviceLogin.SmartLogInPrompt" = "To connect your account, open the Facebook app on your mobile device and check for notifications.";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "OK";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "Share";
/* The title for the alert when smart login requires confirmation */
"SmartLogin.ConfirmationTitle" = "Confirm Login";
/* The format string to continue as <name> for the alert when smart login requires confirmation */
"SmartLogin.Continue" = "Continue as %@";
/* The cancel label for the alert when smart login requires confirmation */
"SmartLogin.NotYou" = "Not you?";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "Visita %@ en tu smartphone o computadora e ingresa este código:";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "Visita %@ e ingresa el código que se muestra arriba.";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "Para conectar tu cuenta, abre la aplicación de Facebook en tu dispositivo móvil y comprueba las notificaciones.";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = "- O -";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "Aceptar";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "Compartir";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "¿No eres tú?";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "Confirmar inicio de sesión";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "Continuar como %@";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "Visita %@ en tu smartphone u ordenador e introduce este código:";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "Visita %@ e introduce el código que se muestra arriba.";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "Para conectar tu cuenta, abre la aplicación de Facebook en tu dispositivo móvil y comprueba las notificaciones.";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = "- O -";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "Aceptar";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "Compartir";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "¿No eres tú?";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "Confirmar inicio de sesión";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "Continuar como %@";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "Siirry osoitteeseen %@ älypuhelimella tai tietokoneella ja anna seuraava koodi:";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "Siirry osoitteeseen %@ ja kirjoita oheinen koodi sivulle.";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "Pääset liittämään käyttäjätilisi avaamalla Facebook-sovelluksen mobiililaitteellasi ja tarkistamalla ilmoitukset.";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = "- TAI -";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "OK";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "Jaa";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "Etkö tämä ole sinä?";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "Vahvista sisäänkirjautuminen";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "Jatka nimellä %@";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "Puntahan ang %@ sa iyong smartphone o computer at ilagay ang code na ito:";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "Pumunta sa %@ at ilagay ang code na ipinapakita sa itaas.";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "Para ikonekta ang iyong account, buksan ang Facebook app sa iyong cellphone at tumingin ng mga notification.";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = "- O KAYA -";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "OK";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "Ibahagi";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "Hindi ikaw?";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "I-confirm ang Pag-log in";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "Magpatuloy bilang %@";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "Rendez-vous sur %@ sur votre smartphone ou votre ordinateur et entrez ce code :";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "Consultez la page %@ et saisissez le code indiqué ci-dessus.";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "Pour connecter votre compte, lancez lapplication Facebook sur votre appareil mobile et consultez les notifications.";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = "- OU -";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "OK";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "Partager";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "Ce nest pas vous ?";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "Confirmer la connexion";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "Continuer en tant que %@";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "તમારા સ્માર્ટફોન અથવા કમ્પ્યુટર પર %@ ની મુલાકાત લો અને આ કોડ દાખલ કરો:";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "%@ ની મુલાકાત લો અને ઉપર બતાવ્યા પ્રમાણે કોડ દાખલ કરો.";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "તમારા એકાઉન્ટ સાથે જોડાવા માટે, તમારા મોબાઇલ ઉપકરણ પર Facebook એપ્લિકેશન ખોલો અને સૂચનો માટે તપાસો.";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = "- અથવા -";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "ઠીક";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "શેર કરો";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "તમે નહિ?";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "લૉગિનની પુષ્ટિ કરો";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "%@ તરીકે ચાલુ રાખો";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "בקר ב-%@ בטלפון החכם או במחשב והזן קוד זה:";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "בקר ב-%@ והזן את הקוד המופיע למעלה.";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "כדי לחבר את החשבון שלך, פתח את אפליקציית פייסבוק במכשיר הנייד שלך ובדוק אם יש התראות.";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = "- או -";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "אישור";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "שתף";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "לא אתה?";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "אשר התחברות";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "המשך כ-%@";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "अपने स्मार्टफ़ोन या कंप्यूटर पर %@ पर जाएँ और यह कोड डालें:";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "%@ पर जाएँ और ऊपर दिया गया कोड दर्ज करें.";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "अपने खाते को कनेक्ट करने के लिए, अपने मोबाइल एप्लिकेशन में Facebook एप्लिकेशन खोलें और सूचनाओं के लिए जाँच करें.";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = "- या -";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "ठीक";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "साझा करें";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "आप नहीं हैं?";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "लॉग इन कन्फ़र्म करें";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "%@ के रूप में जारी रखें";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "Posjetite %@ na pametnom telefonu ili računalu i unesite ovaj kôd:";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "Posjetite adresu %@ i unesite gore prikazan kod.";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "Da biste povezali račun, otvorite aplikaciju Facebook na mobilnom uređaju i potražite obavijesti.";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = "- ILI -";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "U redu";
@ -20,7 +26,7 @@
"LikeButton.Like" = "Sviđa mi se";
/* The label for the FBSDKLikeButton when the object is currently liked. */
"LikeButton.Liked" = "Označeno sa "sviđa mi se"";
"LikeButton.Liked" = "Označeno sa \"sviđa mi se\"";
/* The label for the FBSDKLoginButton action sheet to cancel logging out */
"LoginButton.CancelLogout" = "Odustani";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "Dijeli";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "To niste vi?";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "Potvrda prijave";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "Nastavi kao %@";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "Keresd fel a(z) %@ oldalt a telefonodról vagy számítógépről, és írd be a következő kódot:";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "Keresd fel a %@ címet, és írd be a fent megjelenített kódot.";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "A fiók hozzákapcsolásához nyisd meg a Facebook alkalmazást a mobilkészülékeden, és nézd meg az értesítéseket.";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = "- VAGY -";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "OK";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "Megosztás";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "Nem te vagy az?";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "Bejelentkezés megerősítése";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "Folytatás mint %@";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "Buka %@ dari smartphone Anda atau komputer dan masukkan kode ini:";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "Kunjungi %@ dan masukkan kode yang ditampilkan di atas.";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "Untuk menghubungkan akun Anda, buka aplikasi Facebook di perangkat seluler Anda dan periksa pemberitahuan.";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = "- ATAU -";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "OK";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "Berbagi";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "Bukan Anda?";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "Konfirmasikan Masuk";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "Lanjutkan sebagai %@";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "Accedi a %@ nel tuo smartphone o computer e inserisci questo codice:";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "Visita %@ e inserisci il codice mostrato sopra.";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "Per collegare il tuo account, apri l'app Facebook sul tuo dispositivo mobile e controlla se hai notifiche.";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = "- OPPURE -";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "OK";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "Condividi";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "Non sei tu?";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "Conferma l'accesso";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "Continua come %@";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "スマートフォンまたはコンピュータから%@にアクセスし、次のコードを入力してください。";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "%@にアクセスし、上に表示されているコードを入力してください。";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "アカウントをリンクするには、お使いのモバイル機器でFacebookアプリを開き、お知らせをご確認ください。";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = "- または -";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "OK";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "シェア";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "別のユーザーとしてログイン";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "ログインの確認";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "%@として続行";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "스마트폰이나 컴퓨터에서 %@ 주소를 방문하여 다음 코드를 입력하세요.";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "%@를 방문하여 위에 표시된 코드를 입력하세요.";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "계정을 연결하려면 모바일 기기에서 Facebook 앱을 열고 알림을 확인하세요.";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = "- 또는 -";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "확인";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "공유하기";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "회원님이 아닌가요?";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "로그인 확인";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "%@님으로 계속";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "നിങ്ങളുടെ സ്‌മാർട്ട്ഫോണിലെ അല്ലെങ്കിൽ കമ്പ്യൂട്ടറിലെ %@ സന്ദർശിച്ച് ഇനിപ്പറയുന്ന കോഡ് നൽകുക:";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "%@ സന്ദർശിച്ച്‌ മുകളിൽ കാണിച്ച‌ കോഡ്‌ നൽകുക.";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "നിങ്ങളുടെ അക്കൗണ്ട്‌ കണക്‌റ്റുചെയ്യാൻ, നിങ്ങളുടെ മൊബൈൽ ഉപകരണത്തിലെ Facebook ആപ്പ്‌ തുറന്ന്‌ അറിയിപ്പുകൾ പരിശോധിക്കുക.";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = "- അല്ലെങ്കിൽ -";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "ശരി";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "പങ്കിടൂ";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "നിങ്ങൾ അല്ലേ?";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "ലോഗിൻ സ്ഥിരീകരിക്കുക";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "%@ ആയി തുടരുക";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "आपला स्‍मार्ट फोन किंवा संगणकावर %@ ला भेट द्या आणि हा कोड प्रविष्‍ट करा:";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "%@ वर भेट द्या आणि वर दर्शवलेला कोड प्रविष्ट करा.";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "तुमचे खाते कनेक्ट करण्यासाठी, तुमच्या मोबाईल उपकरणावर Facebook अॅप उघडा आणि सूचना तपासा.";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = "- किंवा -";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "ठीक";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "सामायिक करा";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "तुम्ही नाही?";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "लॉग इन पुष्टी करा";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "%@ म्हणून चालू ठेवा";

View File

@ -1,3 +1,12 @@
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "Lawati %@ dan masukkan kod yang ditunjukkan di atas.";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "Untuk menghubungkan akaun anda, buka apl Facebook di peranti mudah alih anda dan semak pemberitahuan.";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "Bukan anda?";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "OK";
@ -72,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "Kongsi";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "Sahkan Log Masuk";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "Teruskan sebagai %@";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = "- ATAU -";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "Gå til %@ på smarttelefonen eller datamaskinen din, og oppgi denne koden:";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "Gå til %@, og oppgi koden som vises ovenfor.";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "Koble til kontoen din ved å åpne Facebook-appen på mobilenheten din og se etter varsler.";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = "- ELLER -";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "OK";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "Del";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "Ikke deg?";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "Bekreft innlogging";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "Fortsett som %@";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "Ga op je smartphone of computer naar %@ en voer deze code in:";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "Ga naar %@ en voer de bovenstaande code in.";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "Om je account te verbinden, open je de Facebook-app op je mobiele apparaat en controleer of je meldingen ziet.";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = "- OF -";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "OK";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "Delen";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "Ben jij dit niet?";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "Aanmelden bevestigen";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "Doorgaan als %@";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "ਆਪਣੇ ਸਮਾਰਟਫ਼ੋਨ ਜਾਂ ਕੰਪਿਊਟਰ 'ਤੇ %@ ਵਿੱਚ ਜਾਓ ਅਤੇ ਇਸ ਕੋਡ ਨੂੰ ਦਾਖ਼ਲ ਕਰੋ:";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "%@ ਵਿੱਚ ਜਾਓ ਅਤੇ ਉੱਤੇ ਦਿਖਾਏ ਗਏ ਕੋਡ ਨੂੰ ਦਾਖ਼ਲ ਕਰੋ।";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "ਆਪਣੇ ਖਾਤੇ ਨਾਲ ਕਨੈਕਟ ਕਰਨ ਲਈ, ਆਪਣੀ ਮੋਬਾਈਲ ਡਿਵਾਈਸ 'ਤੇ Facebook ਐਪ ਨੂੰ ਖੋਲ੍ਹੋ ਅਤੇ ਸੂਚਨਾਵਾਂ ਨੂੰ ਦੇਖੋ।";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = "- ਜਾਂ -";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "ਠੀਕ";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "ਭੇਜੋ";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "ਕੀ ਤੁਸੀਂ ਨਹੀਂ ਹੋ?";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "ਲੌਗਇਨ ਦੀ ਪੁਸ਼ਟੀ ਕਰੋ";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "%@ ਵੱਜੋਂ ਜਾਰੀ ਰੱਖੋ";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "Przejdź do %@ na smartfonie lub komputerze i wprowadź ten kod:";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "Wejdź na stronę %@ i wprowadź podany powyżej kod.";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "Aby połączyć konto, otwórz aplikację Facebook na urządzeniu mobilnym i sprawdź powiadomienia.";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = "- LUB -";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "OK";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "Udostępnij";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "To nie Ty?";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "Potwierdź logowanie";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "Kontynuuj jako %@";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "Acesse %@ no seu smartphone ou computador e insira este código:";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "Acesse %@ e introduza o código mostrado acima.";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "Para conectar sua conta, abra o aplicativo Facebook em seu dispositivo móvel e verifique se tem notificações.";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = " OU ";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "OK";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "Compartilhar";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "Não é você?";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "Confirme o login";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "Continue como %@";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "Visita %@ no teu smartphone ou computador e insere este código:";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "Visita %@ e introduz o código mostrado acima.";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "Para ligares a tua conta, abre a app Facebook no teu dispositivo móvel e verifica se tens notificações.";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = " OU ";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "OK";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "Partilhar";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "Não és tu?";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "Confirmar Início de Sessão";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "Continuar como %@";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "Откройте «%@» на своем смартфофне или компьютере и введите этот код:";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "Откройте страницу %@ и введите представленный выше код.";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "Чтобы подключить аккаунт, откройте приложение Facebook на мобильном устройстве и проверьте уведомления.";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = "- ИЛИ -";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "OK";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "Поделиться";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "Это не вы?";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "Подтвердить вход";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "Продолжить как %@";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "Navštívte %@ v smartfóne alebo počítači a zadajte tento kód:";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "Navštívte stránku %@ a zadajte kód zobrazený vyššie.";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "Na pripojenie svojho účtu otvorte vo svojom mobilnom zariadení aplikáciu Facebook a skontrolujte upozornenia.";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = "- ALEBO -";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "OK";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "Zdieľať";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "Nie ste to vy?";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "Potvrdiť prihlásenie";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "Pokračovať ako %@";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "Besök %@ på din smartphone eller dator och ange den här koden:";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "Besök %@ och ange koden som visas ovan.";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "Koppla ditt konto genom att öppna Facebook-appen på din mobila enhet och söka efter aviseringar.";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = "- ELLER -";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "OK";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "Dela";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "Inte du?";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "Bekräfta inloggning";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "Fortsätt som %@";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "உங்கள் ஸ்மார்ட்ஃபோன் அல்லது கணினியில் %@ ஐப் பார்வையிட்டு, பின்வரும் குறியீட்டை உள்ளிடவும்:";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "%@ என்பதற்குச் சென்று மேலே தெரியும் குறியீட்டை உள்ளிடவும்.";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "உங்கள் கணக்குடன் இணைக்க, உங்கள் மொபைல் சாதனத்தில் Facebook பயன்பாட்டைத் திறந்து அறிவிப்புகளைப் பார்க்கவும்.";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = "- அல்லது -";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "சரி";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "பகிர்";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "நீங்கள் இல்லையா?";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "உள்நுழைவை உறுதிப்படுத்தவும்";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "%@ ஆகத் தொடரவும்";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "మీ స్మార్ట్‌ఫోన్ లేదా కంప్యూటర్‌లో %@ సందర్శించి, ఈ కోడ్‌ను నమోదు చేయండి:";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "%@ లింక్‌ను సందర్శించి, ఎగువ చూపిన కోడ్‌ను నమోదు చేయండి.";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "మీ ఖాతాను అనుసంధానించడానికి, మీ మొబైల్ పరికరంలో Facebook అనువర్తనాన్ని తెరిచి, నోటిఫికేషన్‌లను తనిఖీ చేయండి.";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = "- లేదా -";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "ఒప్పుకుంటున్నాను";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "భాగస్వామ్యం చేయండి";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "మీరు కాదా?";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "లాగిన్‌ను నిర్ధారించండి";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "%@ వలె కొనసాగండి";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "ไปที่ %@ ในสมาร์ทโฟนหรือคอมพิวเตอร์ของคุณ แล้วป้อนรหัสนี้:";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "ไปที่ %@ และใส่โค้ดที่แสดงด้านบน";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "หากต้องการเชื่อมต่อบัญชีผู้ใช้ของคุณ ให้เปิดแอพ Facebook บนอุปกรณ์มือถือของคุณและตรวจสอบการแจ้งเตือน";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = "- หรือ -";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "ตกลง";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "แชร์";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "หากไม่ใช่คุณ";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "ยืนยันการเข้าสู่ระบบ";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "ดำเนินการต่อในชื่อ %@";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "Akıllı telefonunda veya bilgisayarında %@ adresine git ve bu kodu gir:";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "%@ adresini ziyaret edin ve yukarıda görülen kodu girin.";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "Hesabınızı bağlamak için, mobil cihazınızda Facebook uygulamasınıın ve bildirimlerinizi kontrol edin.";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = "- YA DA -";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "Tamam";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "Paylaş";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "Sen değil misin?";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "Girişi Onayla";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "%@ olarak devam et";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "Truy cập %@ trên điện thoại thông minh hoặc máy tính và nhập mã sau:";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "Truy cập %@ và nhập mã hiển thị ở trên.";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "Để kết nối tài khoản của bạn, hãy mở ứng dụng Facebook trên thiết bị di động và kiểm tra thông báo.";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = "- HOẶC -";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "OK";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "Chia sẻ";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "Không phải bạn?";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "Xác nhận đăng nhập";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "Tiếp tục với tư cách %@";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "请用智能手机或电脑访问 %@,然后输入验证码:";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "请访问 %@ 并输入上方显示的验证码。";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "要关联你的帐户,请在移动设备上打开 Facebook 应用,并查看通知。";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = "- 或者 -";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "确定";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "分享";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "不是你?";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "确认登录";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "以%@的身份继续";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "在智能手機或電腦前往 %@ 並輸入此代碼:";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "前往 %@ 並輸入上方的程式碼。";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "若要連結您的帳戶,請在您的流動裝置上開啟 Facebook 應用程式並查看通知。";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = "- 或 -";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "確定";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "分享";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "這不是您?";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "確認登入";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "以%@的身分繼續";

View File

@ -1,5 +1,11 @@
/* The format string for device login instructions */
"DeviceLogin.LogInPrompt" = "使用您的智慧型手機或電腦前往 %@,然後輸入此代碼:";
/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */
"DeviceLogin.LogInPrompt" = "請前往 %@ 並輸入上方顯示的代碼。";
/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */
"DeviceLogin.SmartLogInPrompt" = "若要連結帳號,請從行動裝置開啟 Facebook 應用程式,並查看通知。";
/* Displayed as a separator between two options. First option is on a line above this, and second option is below */
"DeviceLogin.SmartLogInOrLabel" = "- 或 -";
/* The title of the label to dismiss the alert when presenting user facing error messages */
"ErrorRecovery.Alert.OK" = "是";
@ -75,3 +81,12 @@
/* The label for FBSDKShareButton */
"ShareButton.Share" = "分享";
/* Prompts a person if this is their current account */
"SmartLogin.NotYou" = "這不是您?";
/* Text on a button that a person presses to confirm that they are finished with the login experience */
"SmartLogin.ConfirmationTitle" = "確認登入";
/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */
"SmartLogin.Continue" = "以 %@ 身分繼續";

View File

@ -20,7 +20,7 @@ FEATURES
* Sharing - https://developers.facebook.com/docs/sharing
* App Links - https://developers.facebook.com/docs/applinks
* Graph API - https://developers.facebook.com/docs/ios/graph
* Analytics for Apps - https://developers.facebook.com/docs/analytics
* Analytics - https://developers.facebook.com/docs/analytics
GIVE FEEDBACK
-------------

View File

@ -110,7 +110,7 @@ typedef NS_ENUM(NSUInteger, FBSDKLoginButtonTooltipBehavior)
- Parameter result: The results of the login
- Parameter error: The error (if any) from the login
*/
- (void) loginButton:(FBSDKLoginButton *)loginButton
- (void)loginButton:(FBSDKLoginButton *)loginButton
didCompleteWithResult:(FBSDKLoginManagerLoginResult *)result
error:(NSError *)error;

View File

@ -32,6 +32,8 @@
static int const FBClientStateChallengeLength = 20;
static NSString *const FBSDKExpectedChallengeKey = @"expected_login_challenge";
static NSString *const FBSDKOauthPath = @"/dialog/oauth";
static NSString *const SFVCCanceledLogin = @"com.apple.SafariServices.Authentication";
typedef NS_ENUM(NSInteger, FBSDKLoginManagerState) {
FBSDKLoginManagerStateIdle,
@ -385,6 +387,8 @@ typedef NS_ENUM(NSInteger, FBSDKLoginManagerState) {
if (didPerformLogIn) {
[_logger startAuthMethod:authMethod];
_state = FBSDKLoginManagerStatePerformingLogin;
} else if (error && [error.domain isEqualToString:SFVCCanceledLogin]) {
[self handleImplicitCancelOfLogIn];
} else {
if (!error) {
error = [NSError errorWithDomain:FBSDKLoginErrorDomain code:FBSDKLoginUnknownErrorCode userInfo:nil];
@ -505,10 +509,10 @@ typedef NS_ENUM(NSInteger, FBSDKLoginManagerState) {
NSURL *authURL = [FBSDKInternalUtility URLWithScheme:scheme host:@"authorize" path:@"" queryParameters:mutableParams error:&error];
NSDate *start = [NSDate date];
[[FBSDKApplicationDelegate sharedInstance] openURL:authURL sender:self handler:^(BOOL openedURL) {
[[FBSDKApplicationDelegate sharedInstance] openURL:authURL sender:self handler:^(BOOL openedURL, NSError *anError) {
[_logger logNativeAppDialogResult:openedURL dialogDuration:-[start timeIntervalSinceNow]];
if (handler) {
handler(openedURL, error);
handler(openedURL, anError);
}
}];
}
@ -534,14 +538,14 @@ typedef NS_ENUM(NSInteger, FBSDKLoginManagerState) {
setObject:redirectURL
forKey:@"redirect_uri"];
authURL = [FBSDKInternalUtility facebookURLWithHostPrefix:@"m."
path:@"/dialog/oauth"
path:FBSDKOauthPath
queryParameters:browserParams
error:&error];
}
if (authURL) {
void(^handlerWrapper)(BOOL) = ^(BOOL didOpen) {
void(^handlerWrapper)(BOOL, NSError*) = ^(BOOL didOpen, NSError *anError) {
if (handler) {
handler(didOpen, authMethod, nil);
handler(didOpen, authMethod, anError);
}
};
if (useSafariViewController) {
@ -595,7 +599,7 @@ typedef NS_ENUM(NSInteger, FBSDKLoginManagerState) {
BOOL isFacebookURL = [[url scheme] hasPrefix:[NSString stringWithFormat:@"fb%@", [FBSDKSettings appID]]] &&
[[url host] isEqualToString:@"authorize"];
BOOL isExpectedSourceApplication = [sourceApplication hasPrefix:@"com.facebook"] || [sourceApplication hasPrefix:@"com.apple"];
BOOL isExpectedSourceApplication = [sourceApplication hasPrefix:@"com.facebook"] || [sourceApplication hasPrefix:@"com.apple"] || [sourceApplication hasPrefix:@"com.burbn"];
return isFacebookURL && isExpectedSourceApplication;
}
@ -607,6 +611,11 @@ typedef NS_ENUM(NSInteger, FBSDKLoginManagerState) {
}
}
- (BOOL)isAuthenticationURL:(NSURL *)url
{
return [url.path hasSuffix:FBSDKOauthPath];
}
@end
@implementation FBSDKLoginManager (Accounts)
@ -678,7 +687,7 @@ typedef NS_ENUM(NSInteger, FBSDKLoginManagerState) {
audience = nil;
}
unsigned long timePriorToSystemAuthUI = [FBSDKInternalUtility currentTimeInMilliseconds];
uint64_t timePriorToSystemAuthUI = [FBSDKInternalUtility currentTimeInMilliseconds];
// the FBSDKSystemAccountStoreAdapter completion handler maintains the strong reference during the the asynchronous operation
[[FBSDKSystemAccountStoreAdapter sharedInstance]

View File

@ -300,6 +300,7 @@ static NSString *const FBSDKLoginManagerLoggerTryWebView = @"tryFallback";
}
} else if (error) {
params[FBSDKLoginManagerLoggerParamErrorCodeKey] = @(error.code);
params[FBSDKLoginManagerLoggerParamErrorMessageKey] = error.localizedDescription;
}
[self logEvent:eventName params:params];

Some files were not shown because too many files have changed in this diff Show More