Skip to content
This repository has been archived by the owner on Oct 24, 2022. It is now read-only.

Commit

Permalink
Update Facebook iOS SDK 4.36.0
Browse files Browse the repository at this point in the history
  • Loading branch information
peterpeterparker committed Sep 6, 2018
1 parent 2671526 commit e5c3aba
Show file tree
Hide file tree
Showing 79 changed files with 821 additions and 597 deletions.
Binary file modified src/ios/Bolts.framework/Bolts
Binary file not shown.
1 change: 1 addition & 0 deletions src/ios/Bolts.framework/Headers/BFAppLinkNavigation.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

/*!
Expand Down
2 changes: 1 addition & 1 deletion src/ios/Bolts.framework/Headers/BFAppLinkResolving.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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>

/*!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

/*!
Expand Down
2 changes: 1 addition & 1 deletion src/ios/Bolts.framework/Headers/BFCancellationToken.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/ios/Bolts.framework/Headers/BFExecutor.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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

Expand Down
25 changes: 25 additions & 0 deletions src/ios/Bolts.framework/Headers/BFGeneric.h
Original file line number Diff line number Diff line change
@@ -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;
32 changes: 0 additions & 32 deletions src/ios/Bolts.framework/Headers/BFTask+Exceptions.h

This file was deleted.

83 changes: 28 additions & 55 deletions src/ios/Bolts.framework/Headers/BFTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#import <Foundation/Foundation.h>

#import <Bolts/BFCancellationToken.h>
#import <Bolts/BFGeneric.h>

NS_ASSUME_NONNULL_BEGIN

Expand All @@ -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;

Expand Down Expand Up @@ -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.
*/
Expand All @@ -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.
*/
Expand All @@ -116,15 +91,15 @@ __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.
@param millis The approximate number of milliseconds to wait before the
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
Expand All @@ -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.

Expand All @@ -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;

Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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
Expand All @@ -222,23 +192,24 @@ __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.
@returns A task that will be completed after block has run.
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.
Expand All @@ -247,27 +218,28 @@ __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.
@returns A task that will be completed after block has run.
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.
Expand All @@ -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.
Expand Down
30 changes: 5 additions & 25 deletions src/ios/Bolts.framework/Headers/BFTaskCompletionSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

NS_ASSUME_NONNULL_BEGIN

@class BFTask<ResultType>;
@class BFTask<__covariant ResultType>;

/*!
A BFTaskCompletionSource represents the producer side of tasks.
Expand All @@ -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.
Expand All @@ -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.
Expand Down
Loading

0 comments on commit e5c3aba

Please sign in to comment.