-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5f0eac0
commit c824ef0
Showing
147 changed files
with
9,647 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>AvailableLibraries</key> | ||
<array> | ||
<dict> | ||
<key>LibraryIdentifier</key> | ||
<string>ios-arm64_x86_64-simulator</string> | ||
<key>LibraryPath</key> | ||
<string>FBLPromises.framework</string> | ||
<key>SupportedArchitectures</key> | ||
<array> | ||
<string>arm64</string> | ||
<string>x86_64</string> | ||
</array> | ||
<key>SupportedPlatform</key> | ||
<string>ios</string> | ||
<key>SupportedPlatformVariant</key> | ||
<string>simulator</string> | ||
</dict> | ||
<dict> | ||
<key>LibraryIdentifier</key> | ||
<string>tvos-arm64_x86_64-simulator</string> | ||
<key>LibraryPath</key> | ||
<string>FBLPromises.framework</string> | ||
<key>SupportedArchitectures</key> | ||
<array> | ||
<string>arm64</string> | ||
<string>x86_64</string> | ||
</array> | ||
<key>SupportedPlatform</key> | ||
<string>tvos</string> | ||
<key>SupportedPlatformVariant</key> | ||
<string>simulator</string> | ||
</dict> | ||
<dict> | ||
<key>LibraryIdentifier</key> | ||
<string>ios-arm64</string> | ||
<key>LibraryPath</key> | ||
<string>FBLPromises.framework</string> | ||
<key>SupportedArchitectures</key> | ||
<array> | ||
<string>arm64</string> | ||
</array> | ||
<key>SupportedPlatform</key> | ||
<string>ios</string> | ||
</dict> | ||
<dict> | ||
<key>LibraryIdentifier</key> | ||
<string>ios-arm64_x86_64-maccatalyst</string> | ||
<key>LibraryPath</key> | ||
<string>FBLPromises.framework</string> | ||
<key>SupportedArchitectures</key> | ||
<array> | ||
<string>arm64</string> | ||
<string>x86_64</string> | ||
</array> | ||
<key>SupportedPlatform</key> | ||
<string>ios</string> | ||
<key>SupportedPlatformVariant</key> | ||
<string>maccatalyst</string> | ||
</dict> | ||
<dict> | ||
<key>LibraryIdentifier</key> | ||
<string>macos-arm64_x86_64</string> | ||
<key>LibraryPath</key> | ||
<string>FBLPromises.framework</string> | ||
<key>SupportedArchitectures</key> | ||
<array> | ||
<string>arm64</string> | ||
<string>x86_64</string> | ||
</array> | ||
<key>SupportedPlatform</key> | ||
<string>macos</string> | ||
</dict> | ||
<dict> | ||
<key>LibraryIdentifier</key> | ||
<string>tvos-arm64</string> | ||
<key>LibraryPath</key> | ||
<string>FBLPromises.framework</string> | ||
<key>SupportedArchitectures</key> | ||
<array> | ||
<string>arm64</string> | ||
</array> | ||
<key>SupportedPlatform</key> | ||
<string>tvos</string> | ||
</dict> | ||
</array> | ||
<key>CFBundlePackageType</key> | ||
<string>XFWK</string> | ||
<key>XCFrameworkFormatVersion</key> | ||
<string>1.0</string> | ||
</dict> | ||
</plist> |
Binary file added
BIN
+233 KB
ios/shared/FBLPromises.xcframework/ios-arm64/FBLPromises.framework/FBLPromises
Binary file not shown.
63 changes: 63 additions & 0 deletions
63
ios/shared/FBLPromises.xcframework/ios-arm64/FBLPromises.framework/Headers/FBLPromise+All.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/** | ||
Copyright 2018 Google Inc. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at: | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
#import "FBLPromise.h" | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface FBLPromise<Value>(AllAdditions) | ||
|
||
/** | ||
Wait until all of the given promises are fulfilled. | ||
If one of the given promises is rejected, then the returned promise is rejected with same error. | ||
If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, | ||
it's implicitly considered a pre-fulfilled or pre-rejected `FBLPromise` correspondingly. | ||
Promises resolved with `nil` become `NSNull` instances in the resulting array. | ||
@param promises Promises to wait for. | ||
@return Promise of an array containing the values of input promises in the same order. | ||
*/ | ||
+ (FBLPromise<NSArray *> *)all:(NSArray *)promises NS_SWIFT_UNAVAILABLE(""); | ||
|
||
/** | ||
Wait until all of the given promises are fulfilled. | ||
If one of the given promises is rejected, then the returned promise is rejected with same error. | ||
If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, | ||
it's implicitly considered a pre-fulfilled or pre-rejected FBLPromise correspondingly. | ||
Promises resolved with `nil` become `NSNull` instances in the resulting array. | ||
@param queue A queue to dispatch on. | ||
@param promises Promises to wait for. | ||
@return Promise of an array containing the values of input promises in the same order. | ||
*/ | ||
+ (FBLPromise<NSArray *> *)onQueue:(dispatch_queue_t)queue | ||
all:(NSArray *)promises NS_REFINED_FOR_SWIFT; | ||
|
||
@end | ||
|
||
/** | ||
Convenience dot-syntax wrappers for `FBLPromise` `all` operators. | ||
Usage: FBLPromise.all(@[ ... ]) | ||
*/ | ||
@interface FBLPromise<Value>(DotSyntax_AllAdditions) | ||
|
||
+ (FBLPromise<NSArray *> * (^)(NSArray *))all FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); | ||
+ (FBLPromise<NSArray *> * (^)(dispatch_queue_t, NSArray *))allOn FBL_PROMISES_DOT_SYNTAX | ||
NS_SWIFT_UNAVAILABLE(""); | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
54 changes: 54 additions & 0 deletions
54
...hared/FBLPromises.xcframework/ios-arm64/FBLPromises.framework/Headers/FBLPromise+Always.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/** | ||
Copyright 2018 Google Inc. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at: | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
#import "FBLPromise.h" | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface FBLPromise<Value>(AlwaysAdditions) | ||
|
||
typedef void (^FBLPromiseAlwaysWorkBlock)(void) NS_SWIFT_UNAVAILABLE(""); | ||
|
||
/** | ||
@param work A block that always executes, no matter if the receiver is rejected or fulfilled. | ||
@return A new pending promise to be resolved with same resolution as the receiver. | ||
*/ | ||
- (FBLPromise *)always:(FBLPromiseAlwaysWorkBlock)work NS_SWIFT_UNAVAILABLE(""); | ||
|
||
/** | ||
@param queue A queue to dispatch on. | ||
@param work A block that always executes, no matter if the receiver is rejected or fulfilled. | ||
@return A new pending promise to be resolved with same resolution as the receiver. | ||
*/ | ||
- (FBLPromise *)onQueue:(dispatch_queue_t)queue | ||
always:(FBLPromiseAlwaysWorkBlock)work NS_REFINED_FOR_SWIFT; | ||
|
||
@end | ||
|
||
/** | ||
Convenience dot-syntax wrappers for `FBLPromise` `always` operators. | ||
Usage: promise.always(^{...}) | ||
*/ | ||
@interface FBLPromise<Value>(DotSyntax_AlwaysAdditions) | ||
|
||
- (FBLPromise* (^)(FBLPromiseAlwaysWorkBlock))always FBL_PROMISES_DOT_SYNTAX | ||
NS_SWIFT_UNAVAILABLE(""); | ||
- (FBLPromise* (^)(dispatch_queue_t, FBLPromiseAlwaysWorkBlock))alwaysOn FBL_PROMISES_DOT_SYNTAX | ||
NS_SWIFT_UNAVAILABLE(""); | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
69 changes: 69 additions & 0 deletions
69
ios/shared/FBLPromises.xcframework/ios-arm64/FBLPromises.framework/Headers/FBLPromise+Any.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/** | ||
Copyright 2018 Google Inc. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at: | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
#import "FBLPromise.h" | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface FBLPromise<Value>(AnyAdditions) | ||
|
||
/** | ||
Waits until all of the given promises are either fulfilled or rejected. | ||
If all promises are rejected, then the returned promise is rejected with same error | ||
as the last one rejected. | ||
If at least one of the promises is fulfilled, the resulting promise is fulfilled with an array of | ||
values or `NSErrors`, matching the original order of fulfilled or rejected promises respectively. | ||
If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, | ||
it's implicitly considered a pre-fulfilled or pre-rejected `FBLPromise` correspondingly. | ||
Promises resolved with `nil` become `NSNull` instances in the resulting array. | ||
@param promises Promises to wait for. | ||
@return Promise of array containing the values or `NSError`s of input promises in the same order. | ||
*/ | ||
+ (FBLPromise<NSArray *> *)any:(NSArray *)promises NS_SWIFT_UNAVAILABLE(""); | ||
|
||
/** | ||
Waits until all of the given promises are either fulfilled or rejected. | ||
If all promises are rejected, then the returned promise is rejected with same error | ||
as the last one rejected. | ||
If at least one of the promises is fulfilled, the resulting promise is fulfilled with an array of | ||
values or `NSError`s, matching the original order of fulfilled or rejected promises respectively. | ||
If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, | ||
it's implicitly considered a pre-fulfilled or pre-rejected `FBLPromise` correspondingly. | ||
Promises resolved with `nil` become `NSNull` instances in the resulting array. | ||
@param queue A queue to dispatch on. | ||
@param promises Promises to wait for. | ||
@return Promise of array containing the values or `NSError`s of input promises in the same order. | ||
*/ | ||
+ (FBLPromise<NSArray *> *)onQueue:(dispatch_queue_t)queue | ||
any:(NSArray *)promises NS_REFINED_FOR_SWIFT; | ||
|
||
@end | ||
|
||
/** | ||
Convenience dot-syntax wrappers for `FBLPromise` `any` operators. | ||
Usage: FBLPromise.any(@[ ... ]) | ||
*/ | ||
@interface FBLPromise<Value>(DotSyntax_AnyAdditions) | ||
|
||
+ (FBLPromise<NSArray *> * (^)(NSArray *))any FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); | ||
+ (FBLPromise<NSArray *> * (^)(dispatch_queue_t, NSArray *))anyOn FBL_PROMISES_DOT_SYNTAX | ||
NS_SWIFT_UNAVAILABLE(""); | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
60 changes: 60 additions & 0 deletions
60
...shared/FBLPromises.xcframework/ios-arm64/FBLPromises.framework/Headers/FBLPromise+Async.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/** | ||
Copyright 2018 Google Inc. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at: | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
#import "FBLPromise.h" | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface FBLPromise<Value>(AsyncAdditions) | ||
|
||
typedef void (^FBLPromiseFulfillBlock)(Value __nullable value) NS_SWIFT_UNAVAILABLE(""); | ||
typedef void (^FBLPromiseRejectBlock)(NSError *error) NS_SWIFT_UNAVAILABLE(""); | ||
typedef void (^FBLPromiseAsyncWorkBlock)(FBLPromiseFulfillBlock fulfill, | ||
FBLPromiseRejectBlock reject) NS_SWIFT_UNAVAILABLE(""); | ||
|
||
/** | ||
Creates a pending promise and executes `work` block asynchronously. | ||
@param work A block to perform any operations needed to resolve the promise. | ||
@return A new pending promise. | ||
*/ | ||
+ (instancetype)async:(FBLPromiseAsyncWorkBlock)work NS_SWIFT_UNAVAILABLE(""); | ||
|
||
/** | ||
Creates a pending promise and executes `work` block asynchronously on the given queue. | ||
@param queue A queue to invoke the `work` block on. | ||
@param work A block to perform any operations needed to resolve the promise. | ||
@return A new pending promise. | ||
*/ | ||
+ (instancetype)onQueue:(dispatch_queue_t)queue | ||
async:(FBLPromiseAsyncWorkBlock)work NS_REFINED_FOR_SWIFT; | ||
|
||
@end | ||
|
||
/** | ||
Convenience dot-syntax wrappers for `FBLPromise` `async` operators. | ||
Usage: FBLPromise.async(^(FBLPromiseFulfillBlock fulfill, FBLPromiseRejectBlock reject) { ... }) | ||
*/ | ||
@interface FBLPromise<Value>(DotSyntax_AsyncAdditions) | ||
|
||
+ (FBLPromise* (^)(FBLPromiseAsyncWorkBlock))async FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); | ||
+ (FBLPromise* (^)(dispatch_queue_t, FBLPromiseAsyncWorkBlock))asyncOn FBL_PROMISES_DOT_SYNTAX | ||
NS_SWIFT_UNAVAILABLE(""); | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
32 changes: 32 additions & 0 deletions
32
...shared/FBLPromises.xcframework/ios-arm64/FBLPromises.framework/Headers/FBLPromise+Await.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/** | ||
Copyright 2018 Google Inc. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at: | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
#import "FBLPromise.h" | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
/** | ||
Waits for promise resolution. The current thread blocks until the promise is resolved. | ||
@param promise Promise to wait for. | ||
@param error Error the promise was rejected with, or `nil` if the promise was fulfilled. | ||
@return Value the promise was fulfilled with. If the promise was rejected, the return value | ||
is always `nil`, but the error out arg is not. | ||
*/ | ||
FOUNDATION_EXTERN id __nullable FBLPromiseAwait(FBLPromise *promise, | ||
NSError **error) NS_REFINED_FOR_SWIFT; | ||
|
||
NS_ASSUME_NONNULL_END |
Oops, something went wrong.