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

Commit e5c3aba

Browse files
Update Facebook iOS SDK 4.36.0
1 parent 2671526 commit e5c3aba

79 files changed

Lines changed: 821 additions & 597 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/ios/Bolts.framework/Bolts

-83.8 KB
Binary file not shown.

src/ios/Bolts.framework/Headers/BFAppLinkNavigation.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ typedef NS_ENUM(NSInteger, BFAppLinkNavigationType) {
3333
custom requests with additional navigation and app data attached to them by
3434
creating BFAppLinkNavigations themselves.
3535
*/
36+
NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extension")
3637
@interface BFAppLinkNavigation : NSObject
3738

3839
/*!

src/ios/Bolts.framework/Headers/BFAppLinkResolving.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525
@param url The URL to resolve into an App Link.
2626
@returns A BFTask that will return a BFAppLink for the given URL.
2727
*/
28-
- (BFTask *)appLinkFromURLInBackground:(NSURL *)url;
28+
- (BFTask *)appLinkFromURLInBackground:(NSURL *)url NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extension");
2929

3030
@end

src/ios/Bolts.framework/Headers/BFAppLinkReturnToRefererController.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
A controller class that implements default behavior for a BFAppLinkReturnToRefererView, including
4141
the ability to display the view above the navigation bar for navigation-based apps.
4242
*/
43+
NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extension")
4344
@interface BFAppLinkReturnToRefererController : NSObject <BFAppLinkReturnToRefererViewDelegate>
4445

4546
/*!

src/ios/Bolts.framework/Headers/BFAppLinkReturnToRefererView.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ typedef NS_ENUM(NSUInteger, BFIncludeStatusBarInSize) {
4848
rather than navigating away. If the view is provided an App Link that does not contain
4949
referer data, it will have zero size and no UI will be displayed.
5050
*/
51+
NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extension")
5152
@interface BFAppLinkReturnToRefererView : UIView
5253

5354
/*!

src/ios/Bolts.framework/Headers/BFCancellationToken.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN
1717
/*!
1818
A block that will be called when a token is cancelled.
1919
*/
20-
typedef void(^BFCancellationBlock)();
20+
typedef void(^BFCancellationBlock)(void);
2121

2222
/*!
2323
The consumer view of a CancellationToken.

src/ios/Bolts.framework/Headers/BFExecutor.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ NS_ASSUME_NONNULL_BEGIN
3737
Returns a new executor that uses the given block to execute continuations.
3838
@param block The block to use.
3939
*/
40-
+ (instancetype)executorWithBlock:(void(^)(void(^block)()))block;
40+
+ (instancetype)executorWithBlock:(void(^)(void(^block)(void)))block;
4141

4242
/*!
4343
Returns a new executor that runs continuations on the given queue.
@@ -55,7 +55,7 @@ NS_ASSUME_NONNULL_BEGIN
5555
Runs the given block using this executor's particular strategy.
5656
@param block The block to execute.
5757
*/
58-
- (void)execute:(void(^)())block;
58+
- (void)execute:(void(^)(void))block;
5959

6060
@end
6161

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Copyright (c) 2014, Facebook, Inc.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree. An additional grant
7+
* of patent rights can be found in the PATENTS file in the same directory.
8+
*
9+
*/
10+
11+
#import <Foundation/Foundation.h>
12+
13+
#pragma once
14+
15+
/**
16+
This exists to use along with `BFTask` and `BFTaskCompletionSource`.
17+
18+
Instead of returning a `BFTask` with no generic type, or a generic type of 'NSNull'
19+
when there is no usable result from a task, we use the type 'BFVoid', which will always have a value of `nil`.
20+
21+
This allows you to provide a more enforced API contract to the caller,
22+
as sending any message to `BFVoid` will result in a compile time error.
23+
*/
24+
@class _BFVoid_Nonexistant;
25+
typedef _BFVoid_Nonexistant *BFVoid;

src/ios/Bolts.framework/Headers/BFTask+Exceptions.h

Lines changed: 0 additions & 32 deletions
This file was deleted.

src/ios/Bolts.framework/Headers/BFTask.h

Lines changed: 28 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#import <Foundation/Foundation.h>
1212

1313
#import <Bolts/BFCancellationToken.h>
14+
#import <Bolts/BFGeneric.h>
1415

1516
NS_ASSUME_NONNULL_BEGIN
1617

@@ -24,29 +25,12 @@ extern NSString *const BFTaskErrorDomain;
2425
*/
2526
extern NSInteger const kBFMultipleErrorsError;
2627

27-
/*!
28-
An exception that is thrown if there was multiple exceptions on <BFTask taskForCompletionOfAllTasks:>.
29-
30-
@deprecated `BFTask` exception handling is deprecated and will be removed in a future release.
31-
*/
32-
extern NSString *const BFTaskMultipleExceptionsException
33-
__attribute__((deprecated("`BFTask` exception handling is deprecated and will be removed in a future release.")));
34-
3528
/*!
3629
An error userInfo key used if there were multiple errors on <BFTask taskForCompletionOfAllTasks:>.
3730
Value type is `NSArray<NSError *> *`.
3831
*/
3932
extern NSString *const BFTaskMultipleErrorsUserInfoKey;
4033

41-
/*!
42-
An error userInfo key used if there were multiple exceptions on <BFTask taskForCompletionOfAllTasks:>.
43-
Value type is `NSArray<NSException *> *`.
44-
45-
@deprecated `BFTask` exception handling is deprecated and will be removed in a future release.
46-
*/
47-
extern NSString *const BFTaskMultipleExceptionsUserInfoKey
48-
__attribute__((deprecated("`BFTask` exception handling is deprecated and will be removed in a future release.")));
49-
5034
@class BFExecutor;
5135
@class BFTask;
5236

@@ -74,15 +58,6 @@ typedef __nullable id(^BFContinuationBlock)(BFTask<ResultType> *t);
7458
*/
7559
+ (instancetype)taskWithError:(NSError *)error;
7660

77-
/*!
78-
Creates a task that is already completed with the given exception.
79-
@param exception The exception for the task.
80-
81-
@deprecated `BFTask` exception handling is deprecated and will be removed in a future release.
82-
*/
83-
+ (instancetype)taskWithException:(NSException *)exception
84-
__attribute__((deprecated("`BFTask` exception handling is deprecated and will be removed in a future release.")));
85-
8661
/*!
8762
Creates a task that is already cancelled.
8863
*/
@@ -105,7 +80,7 @@ __attribute__((deprecated("`BFTask` exception handling is deprecated and will be
10580

10681
/*!
10782
Returns a task that will be completed once there is at least one successful task.
108-
The first task to successuly complete will set the result, all other tasks results are
83+
The first task to successuly complete will set the result, all other tasks results are
10984
ignored.
11085
@param tasks An `NSArray` of the tasks to use as an input.
11186
*/
@@ -116,15 +91,15 @@ __attribute__((deprecated("`BFTask` exception handling is deprecated and will be
11691
@param millis The approximate number of milliseconds to wait before the
11792
task will be finished (with result == nil).
11893
*/
119-
+ (instancetype)taskWithDelay:(int)millis;
94+
+ (BFTask<BFVoid> *)taskWithDelay:(int)millis;
12095

12196
/*!
12297
Returns a task that will be completed a certain amount of time in the future.
12398
@param millis The approximate number of milliseconds to wait before the
12499
task will be finished (with result == nil).
125100
@param token The cancellation token (optional).
126101
*/
127-
+ (instancetype)taskWithDelay:(int)millis cancellationToken:(nullable BFCancellationToken *)token;
102+
+ (BFTask<BFVoid> *)taskWithDelay:(int)millis cancellationToken:(nullable BFCancellationToken *)token;
128103

129104
/*!
130105
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
136111
If block returns a BFTask, then the task returned from
137112
this method will not be completed until that task is completed.
138113
*/
139-
+ (instancetype)taskFromExecutor:(BFExecutor *)executor withBlock:(nullable id (^)())block;
114+
+ (instancetype)taskFromExecutor:(BFExecutor *)executor withBlock:(nullable id (^)(void))block;
140115

141116
// Properties that will be set on the task once it is completed.
142117

@@ -150,21 +125,13 @@ __attribute__((deprecated("`BFTask` exception handling is deprecated and will be
150125
*/
151126
@property (nullable, nonatomic, strong, readonly) NSError *error;
152127

153-
/*!
154-
The exception of a failed task.
155-
156-
@deprecated `BFTask` exception handling is deprecated and will be removed in a future release.
157-
*/
158-
@property (nullable, nonatomic, strong, readonly) NSException *exception
159-
__attribute__((deprecated("`BFTask` exception handling is deprecated and will be removed in a future release.")));
160-
161128
/*!
162129
Whether this task has been cancelled.
163130
*/
164131
@property (nonatomic, assign, readonly, getter=isCancelled) BOOL cancelled;
165132

166133
/*!
167-
Whether this task has completed due to an error or exception.
134+
Whether this task has completed due to an error.
168135
*/
169136
@property (nonatomic, assign, readonly, getter=isFaulted) BOOL faulted;
170137

@@ -184,7 +151,7 @@ __attribute__((deprecated("`BFTask` exception handling is deprecated and will be
184151
If block returns a BFTask, then the task returned from
185152
this method will not be completed until that task is completed.
186153
*/
187-
- (BFTask *)continueWithBlock:(BFContinuationBlock)block;
154+
- (BFTask *)continueWithBlock:(BFContinuationBlock)block NS_SWIFT_NAME(continueWith(block:));
188155

189156
/*!
190157
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
198165
If block returns a BFTask, then the task returned from
199166
this method will not be completed until that task is completed.
200167
*/
201-
- (BFTask *)continueWithBlock:(BFContinuationBlock)block cancellationToken:(nullable BFCancellationToken *)cancellationToken;
168+
- (BFTask *)continueWithBlock:(BFContinuationBlock)block
169+
cancellationToken:(nullable BFCancellationToken *)cancellationToken NS_SWIFT_NAME(continueWith(block:cancellationToken:));
202170

203171
/*!
204172
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
209177
If block returns a BFTask, then the task returned from
210178
this method will not be completed until that task is completed.
211179
*/
212-
- (BFTask *)continueWithExecutor:(BFExecutor *)executor withBlock:(BFContinuationBlock)block;
180+
- (BFTask *)continueWithExecutor:(BFExecutor *)executor
181+
withBlock:(BFContinuationBlock)block NS_SWIFT_NAME(continueWith(executor:block:));
182+
213183
/*!
214184
Enqueues the given block to be run once this task is complete.
215185
@param executor A BFExecutor responsible for determining how the
@@ -222,23 +192,24 @@ __attribute__((deprecated("`BFTask` exception handling is deprecated and will be
222192
*/
223193
- (BFTask *)continueWithExecutor:(BFExecutor *)executor
224194
block:(BFContinuationBlock)block
225-
cancellationToken:(nullable BFCancellationToken *)cancellationToken;
195+
cancellationToken:(nullable BFCancellationToken *)cancellationToken
196+
NS_SWIFT_NAME(continueWith(executor:block:cancellationToken:));
226197

227198
/*!
228199
Identical to continueWithBlock:, except that the block is only run
229-
if this task did not produce a cancellation, error, or exception.
200+
if this task did not produce a cancellation or an error.
230201
If it did, then the failure will be propagated to the returned
231202
task.
232203
@param block The block to be run once this task is complete.
233204
@returns A task that will be completed after block has run.
234205
If block returns a BFTask, then the task returned from
235206
this method will not be completed until that task is completed.
236207
*/
237-
- (BFTask *)continueWithSuccessBlock:(BFContinuationBlock)block;
208+
- (BFTask *)continueWithSuccessBlock:(BFContinuationBlock)block NS_SWIFT_NAME(continueOnSuccessWith(block:));
238209

239210
/*!
240211
Identical to continueWithBlock:, except that the block is only run
241-
if this task did not produce a cancellation, error, or exception.
212+
if this task did not produce a cancellation or an error.
242213
If it did, then the failure will be propagated to the returned
243214
task.
244215
@param block The block to be run once this task is complete.
@@ -247,27 +218,28 @@ __attribute__((deprecated("`BFTask` exception handling is deprecated and will be
247218
If block returns a BFTask, then the task returned from
248219
this method will not be completed until that task is completed.
249220
*/
250-
- (BFTask *)continueWithSuccessBlock:(BFContinuationBlock)block cancellationToken:(nullable BFCancellationToken *)cancellationToken;
221+
- (BFTask *)continueWithSuccessBlock:(BFContinuationBlock)block
222+
cancellationToken:(nullable BFCancellationToken *)cancellationToken
223+
NS_SWIFT_NAME(continueOnSuccessWith(block:cancellationToken:));
251224

252225
/*!
253226
Identical to continueWithExecutor:withBlock:, except that the block
254-
is only run if this task did not produce a cancellation, error, or
255-
exception. If it did, then the failure will be propagated to the
256-
returned task.
227+
is only run if this task did not produce a cancellation, error, or an error.
228+
If it did, then the failure will be propagated to the returned task.
257229
@param executor A BFExecutor responsible for determining how the
258230
continuation block will be run.
259231
@param block The block to be run once this task is complete.
260232
@returns A task that will be completed after block has run.
261233
If block returns a BFTask, then the task returned from
262234
this method will not be completed until that task is completed.
263235
*/
264-
- (BFTask *)continueWithExecutor:(BFExecutor *)executor withSuccessBlock:(BFContinuationBlock)block;
236+
- (BFTask *)continueWithExecutor:(BFExecutor *)executor
237+
withSuccessBlock:(BFContinuationBlock)block NS_SWIFT_NAME(continueOnSuccessWith(executor:block:));
265238

266239
/*!
267240
Identical to continueWithExecutor:withBlock:, except that the block
268-
is only run if this task did not produce a cancellation, error, or
269-
exception. If it did, then the failure will be propagated to the
270-
returned task.
241+
is only run if this task did not produce a cancellation or an error.
242+
If it did, then the failure will be propagated to the returned task.
271243
@param executor A BFExecutor responsible for determining how the
272244
continuation block will be run.
273245
@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
278250
*/
279251
- (BFTask *)continueWithExecutor:(BFExecutor *)executor
280252
successBlock:(BFContinuationBlock)block
281-
cancellationToken:(nullable BFCancellationToken *)cancellationToken;
253+
cancellationToken:(nullable BFCancellationToken *)cancellationToken
254+
NS_SWIFT_NAME(continueOnSuccessWith(executor:block:cancellationToken:));
282255

283256
/*!
284257
Waits until this operation is completed.

0 commit comments

Comments
 (0)