[WIP] firebase init Error

This commit is contained in:
2024-08-02 20:09:59 +08:00
commit b77fd9f498
7087 changed files with 1466846 additions and 0 deletions

View File

@@ -0,0 +1,82 @@
fileFormatVersion: 2
guid: 6019a218296904a42bec9cb290c033db
folderAsset: yes
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 1
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Android: 1
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 1
- first:
Android: Android
second:
enabled: 0
settings:
AndroidSharedLibraryType: Executable
CPU: ARMv7
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
- first:
iPhone: iOS
second:
enabled: 0
settings:
AddToEmbeddedBinaries: false
CPU: AnyCPU
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 7b505f175f0104d7f954586210b7d36f
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 54dbd77dee5644223aa24c1efcee1ee8
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 8354d64c2a26e45539baa2484bcc83e0
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,14 @@
<?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>NSPrivacyAccessedAPITypes</key>
<array/>
<key>NSPrivacyCollectedDataTypes</key>
<array/>
<key>NSPrivacyTracking</key>
<false/>
<key>NSPrivacyTrackingDomains</key>
<array/>
</dict>
</plist>

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 93295f75abe4e49fc974f56003df6536
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a3c160e05ecd0418f9a1a1f88fe17fac
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -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

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: cc4db30d3067e4c7c86b15513949c5c2
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -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

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 6f3d8b84052314cf5b3923141bde1936
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -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

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 04c112cc3baff4d8ab4def27d9048b37
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -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

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: b4b228106c8884fb69c43ffaf6e768cb
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -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

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: f8fef0173fed84480b0624d931afecbd
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,59 @@
/**
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>(CatchAdditions)
typedef void (^FBLPromiseCatchWorkBlock)(NSError *error) NS_SWIFT_UNAVAILABLE("");
/**
Creates a pending promise which eventually gets resolved with same resolution as the receiver.
If receiver is rejected, then `reject` block is executed asynchronously.
@param reject A block to handle the error that receiver was rejected with.
@return A new pending promise.
*/
- (FBLPromise *)catch:(FBLPromiseCatchWorkBlock)reject NS_SWIFT_UNAVAILABLE("");
/**
Creates a pending promise which eventually gets resolved with same resolution as the receiver.
If receiver is rejected, then `reject` block is executed asynchronously on the given queue.
@param queue A queue to invoke the `reject` block on.
@param reject A block to handle the error that receiver was rejected with.
@return A new pending promise.
*/
- (FBLPromise *)onQueue:(dispatch_queue_t)queue
catch:(FBLPromiseCatchWorkBlock)reject NS_REFINED_FOR_SWIFT;
@end
/**
Convenience dot-syntax wrappers for `FBLPromise` `catch` operators.
Usage: promise.catch(^(NSError *error) { ... })
*/
@interface FBLPromise<Value>(DotSyntax_CatchAdditions)
- (FBLPromise* (^)(FBLPromiseCatchWorkBlock))catch FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE("");
- (FBLPromise* (^)(dispatch_queue_t, FBLPromiseCatchWorkBlock))catchOn FBL_PROMISES_DOT_SYNTAX
NS_SWIFT_UNAVAILABLE("");
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: ca2add514aaa743b9b61789889d58245
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,59 @@
/**
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>(DelayAdditions)
/**
Creates a new pending promise that fulfills with the same value as `self` after the `delay`, or
rejects with the same error immediately.
@param interval Time to wait in seconds.
@return A new pending promise that fulfills at least `delay` seconds later than `self`, or rejects
with the same error immediately.
*/
- (FBLPromise *)delay:(NSTimeInterval)interval NS_SWIFT_UNAVAILABLE("");
/**
Creates a new pending promise that fulfills with the same value as `self` after the `delay`, or
rejects with the same error immediately.
@param queue A queue to dispatch on.
@param interval Time to wait in seconds.
@return A new pending promise that fulfills at least `delay` seconds later than `self`, or rejects
with the same error immediately.
*/
- (FBLPromise *)onQueue:(dispatch_queue_t)queue
delay:(NSTimeInterval)interval NS_REFINED_FOR_SWIFT;
@end
/**
Convenience dot-syntax wrappers for `FBLPromise` `delay` operators.
Usage: promise.delay(...)
*/
@interface FBLPromise<Value>(DotSyntax_DelayAdditions)
- (FBLPromise * (^)(NSTimeInterval))delay FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE("");
- (FBLPromise * (^)(dispatch_queue_t, NSTimeInterval))delayOn FBL_PROMISES_DOT_SYNTAX
NS_SWIFT_UNAVAILABLE("");
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 70d0b65c1711140089c1262c05a39c43
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,55 @@
/**
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>(DoAdditions)
typedef id __nullable (^FBLPromiseDoWorkBlock)(void) NS_SWIFT_UNAVAILABLE("");
/**
Creates a pending promise and executes `work` block asynchronously.
@param work A block that returns a value or an error used to resolve the promise.
@return A new pending promise.
*/
+ (instancetype)do:(FBLPromiseDoWorkBlock)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 that returns a value or an error used to resolve the promise.
@return A new pending promise.
*/
+ (instancetype)onQueue:(dispatch_queue_t)queue do:(FBLPromiseDoWorkBlock)work NS_REFINED_FOR_SWIFT;
@end
/**
Convenience dot-syntax wrappers for `FBLPromise` `do` operators.
Usage: FBLPromise.doOn(queue, ^(NSError *error) { ... })
*/
@interface FBLPromise<Value>(DotSyntax_DoAdditions)
+ (FBLPromise * (^)(dispatch_queue_t, FBLPromiseDoWorkBlock))doOn FBL_PROMISES_DOT_SYNTAX
NS_SWIFT_UNAVAILABLE("");
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: fefb4fd31203b4507a23a41e3bc476cc
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,62 @@
/**
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>(RaceAdditions)
/**
Wait until any of the given promises are fulfilled.
If one of the 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.
@param promises Promises to wait for.
@return A new pending promise to be resolved with the same resolution as the first promise, among
the given ones, which was resolved.
*/
+ (instancetype)race:(NSArray *)promises NS_SWIFT_UNAVAILABLE("");
/**
Wait until any of the given promises are fulfilled.
If one of the 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.
@param queue A queue to dispatch on.
@param promises Promises to wait for.
@return A new pending promise to be resolved with the same resolution as the first promise, among
the given ones, which was resolved.
*/
+ (instancetype)onQueue:(dispatch_queue_t)queue race:(NSArray *)promises NS_REFINED_FOR_SWIFT;
@end
/**
Convenience dot-syntax wrappers for `FBLPromise` `race` operators.
Usage: FBLPromise.race(@[ ... ])
*/
@interface FBLPromise<Value>(DotSyntax_RaceAdditions)
+ (FBLPromise * (^)(NSArray *))race FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE("");
+ (FBLPromise * (^)(dispatch_queue_t, NSArray *))raceOn FBL_PROMISES_DOT_SYNTAX
NS_SWIFT_UNAVAILABLE("");
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 67d2616ba77844a788e8e7350873f083
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -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>(RecoverAdditions)
typedef id __nullable (^FBLPromiseRecoverWorkBlock)(NSError *error) NS_SWIFT_UNAVAILABLE("");
/**
Provides a new promise to recover in case the receiver gets rejected.
@param recovery A block to handle the error that the receiver was rejected with.
@return A new pending promise to use instead of the rejected one that gets resolved with resolution
returned from `recovery` block.
*/
- (FBLPromise *)recover:(FBLPromiseRecoverWorkBlock)recovery NS_SWIFT_UNAVAILABLE("");
/**
Provides a new promise to recover in case the receiver gets rejected.
@param queue A queue to dispatch on.
@param recovery A block to handle the error that the receiver was rejected with.
@return A new pending promise to use instead of the rejected one that gets resolved with resolution
returned from `recovery` block.
*/
- (FBLPromise *)onQueue:(dispatch_queue_t)queue
recover:(FBLPromiseRecoverWorkBlock)recovery NS_REFINED_FOR_SWIFT;
@end
/**
Convenience dot-syntax wrappers for `FBLPromise` `recover` operators.
Usage: promise.recover(^id(NSError *error) {...})
*/
@interface FBLPromise<Value>(DotSyntax_RecoverAdditions)
- (FBLPromise * (^)(FBLPromiseRecoverWorkBlock))recover FBL_PROMISES_DOT_SYNTAX
NS_SWIFT_UNAVAILABLE("");
- (FBLPromise * (^)(dispatch_queue_t, FBLPromiseRecoverWorkBlock))recoverOn FBL_PROMISES_DOT_SYNTAX
NS_SWIFT_UNAVAILABLE("");
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 893d433fc8b4d41c990f012f5f04eedf
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,71 @@
/**
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>(ReduceAdditions)
typedef id __nullable (^FBLPromiseReducerBlock)(Value __nullable partial, id next)
NS_SWIFT_UNAVAILABLE("");
/**
Sequentially reduces a collection of values to a single promise using a given combining block
and the value `self` resolves with as initial value.
@param items An array of values to process in order.
@param reducer A block to combine an accumulating value and an element of the sequence into
the new accumulating value or a promise resolved with it, to be used in the next
call of the `reducer` or returned to the caller.
@return A new pending promise returned from the last `reducer` invocation.
Or `self` if `items` is empty.
*/
- (FBLPromise *)reduce:(NSArray *)items
combine:(FBLPromiseReducerBlock)reducer NS_SWIFT_UNAVAILABLE("");
/**
Sequentially reduces a collection of values to a single promise using a given combining block
and the value `self` resolves with as initial value.
@param queue A queue to dispatch on.
@param items An array of values to process in order.
@param reducer A block to combine an accumulating value and an element of the sequence into
the new accumulating value or a promise resolved with it, to be used in the next
call of the `reducer` or returned to the caller.
@return A new pending promise returned from the last `reducer` invocation.
Or `self` if `items` is empty.
*/
- (FBLPromise *)onQueue:(dispatch_queue_t)queue
reduce:(NSArray *)items
combine:(FBLPromiseReducerBlock)reducer NS_SWIFT_UNAVAILABLE("");
@end
/**
Convenience dot-syntax wrappers for `FBLPromise` `reduce` operators.
Usage: promise.reduce(values, ^id(id partial, id next) { ... })
*/
@interface FBLPromise<Value>(DotSyntax_ReduceAdditions)
- (FBLPromise * (^)(NSArray *, FBLPromiseReducerBlock))reduce FBL_PROMISES_DOT_SYNTAX
NS_SWIFT_UNAVAILABLE("");
- (FBLPromise * (^)(dispatch_queue_t, NSArray *, FBLPromiseReducerBlock))reduceOn
FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE("");
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 6d62809cec46e47b19e89e6584ff13c5
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,165 @@
/**
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
/** The default number of retry attempts is 1. */
FOUNDATION_EXTERN NSInteger const FBLPromiseRetryDefaultAttemptsCount NS_REFINED_FOR_SWIFT;
/** The default delay interval before making a retry attempt is 1.0 second. */
FOUNDATION_EXTERN NSTimeInterval const FBLPromiseRetryDefaultDelayInterval NS_REFINED_FOR_SWIFT;
@interface FBLPromise<Value>(RetryAdditions)
typedef id __nullable (^FBLPromiseRetryWorkBlock)(void) NS_SWIFT_UNAVAILABLE("");
typedef BOOL (^FBLPromiseRetryPredicateBlock)(NSInteger, NSError *) NS_SWIFT_UNAVAILABLE("");
/**
Creates a pending promise that fulfills with the same value as the promise returned from `work`
block, which executes asynchronously, or rejects with the same error after all retry attempts have
been exhausted. Defaults to `FBLPromiseRetryDefaultAttemptsCount` attempt(s) on rejection where the
`work` block is retried after a delay of `FBLPromiseRetryDefaultDelayInterval` second(s).
@param work A block that executes asynchronously on the default queue and returns a value or an
error used to resolve the promise.
@return A new pending promise that fulfills with the same value as the promise returned from `work`
block, or rejects with the same error after all retry attempts have been exhausted.
*/
+ (instancetype)retry:(FBLPromiseRetryWorkBlock)work NS_SWIFT_UNAVAILABLE("");
/**
Creates a pending promise that fulfills with the same value as the promise returned from `work`
block, which executes asynchronously on the given `queue`, or rejects with the same error after all
retry attempts have been exhausted. Defaults to `FBLPromiseRetryDefaultAttemptsCount` attempt(s) on
rejection where the `work` block is retried on the given `queue` after a delay of
`FBLPromiseRetryDefaultDelayInterval` second(s).
@param queue A queue to invoke the `work` block on.
@param work A block that executes asynchronously on the given `queue` and returns a value or an
error used to resolve the promise.
@return A new pending promise that fulfills with the same value as the promise returned from `work`
block, or rejects with the same error after all retry attempts have been exhausted.
*/
+ (instancetype)onQueue:(dispatch_queue_t)queue
retry:(FBLPromiseRetryWorkBlock)work NS_SWIFT_UNAVAILABLE("");
/**
Creates a pending promise that fulfills with the same value as the promise returned from `work`
block, which executes asynchronously, or rejects with the same error after all retry attempts have
been exhausted.
@param count Max number of retry attempts. The `work` block will be executed once if the specified
count is less than or equal to zero.
@param work A block that executes asynchronously on the default queue and returns a value or an
error used to resolve the promise.
@return A new pending promise that fulfills with the same value as the promise returned from `work`
block, or rejects with the same error after all retry attempts have been exhausted.
*/
+ (instancetype)attempts:(NSInteger)count
retry:(FBLPromiseRetryWorkBlock)work NS_SWIFT_UNAVAILABLE("");
/**
Creates a pending promise that fulfills with the same value as the promise returned from `work`
block, which executes asynchronously on the given `queue`, or rejects with the same error after all
retry attempts have been exhausted.
@param queue A queue to invoke the `work` block on.
@param count Max number of retry attempts. The `work` block will be executed once if the specified
count is less than or equal to zero.
@param work A block that executes asynchronously on the given `queue` and returns a value or an
error used to resolve the promise.
@return A new pending promise that fulfills with the same value as the promise returned from `work`
block, or rejects with the same error after all retry attempts have been exhausted.
*/
+ (instancetype)onQueue:(dispatch_queue_t)queue
attempts:(NSInteger)count
retry:(FBLPromiseRetryWorkBlock)work NS_SWIFT_UNAVAILABLE("");
/**
Creates a pending promise that fulfills with the same value as the promise returned from `work`
block, which executes asynchronously, or rejects with the same error after all retry attempts have
been exhausted. On rejection, the `work` block is retried after the given delay `interval` and will
continue to retry until the number of specified attempts have been exhausted or will bail early if
the given condition is not met.
@param count Max number of retry attempts. The `work` block will be executed once if the specified
count is less than or equal to zero.
@param interval Time to wait before the next retry attempt.
@param predicate Condition to check before the next retry attempt. The predicate block provides the
the number of remaining retry attempts and the error that the promise was rejected
with.
@param work A block that executes asynchronously on the default queue and returns a value or an
error used to resolve the promise.
@return A new pending promise that fulfills with the same value as the promise returned from `work`
block, or rejects with the same error after all retry attempts have been exhausted or if
the given condition is not met.
*/
+ (instancetype)attempts:(NSInteger)count
delay:(NSTimeInterval)interval
condition:(nullable FBLPromiseRetryPredicateBlock)predicate
retry:(FBLPromiseRetryWorkBlock)work NS_SWIFT_UNAVAILABLE("");
/**
Creates a pending promise that fulfills with the same value as the promise returned from `work`
block, which executes asynchronously on the given `queue`, or rejects with the same error after all
retry attempts have been exhausted. On rejection, the `work` block is retried after the given
delay `interval` and will continue to retry until the number of specified attempts have been
exhausted or will bail early if the given condition is not met.
@param queue A queue to invoke the `work` block on.
@param count Max number of retry attempts. The `work` block will be executed once if the specified
count is less than or equal to zero.
@param interval Time to wait before the next retry attempt.
@param predicate Condition to check before the next retry attempt. The predicate block provides the
the number of remaining retry attempts and the error that the promise was rejected
with.
@param work A block that executes asynchronously on the given `queue` and returns a value or an
error used to resolve the promise.
@return A new pending promise that fulfills with the same value as the promise returned from `work`
block, or rejects with the same error after all retry attempts have been exhausted or if
the given condition is not met.
*/
+ (instancetype)onQueue:(dispatch_queue_t)queue
attempts:(NSInteger)count
delay:(NSTimeInterval)interval
condition:(nullable FBLPromiseRetryPredicateBlock)predicate
retry:(FBLPromiseRetryWorkBlock)work NS_REFINED_FOR_SWIFT;
@end
/**
Convenience dot-syntax wrappers for `FBLPromise+Retry` operators.
Usage: FBLPromise.retry(^id { ... })
*/
@interface FBLPromise<Value>(DotSyntax_RetryAdditions)
+ (FBLPromise * (^)(FBLPromiseRetryWorkBlock))retry FBL_PROMISES_DOT_SYNTAX
NS_SWIFT_UNAVAILABLE("");
+ (FBLPromise * (^)(dispatch_queue_t, FBLPromiseRetryWorkBlock))retryOn FBL_PROMISES_DOT_SYNTAX
NS_SWIFT_UNAVAILABLE("");
+ (FBLPromise * (^)(NSInteger, NSTimeInterval, FBLPromiseRetryPredicateBlock __nullable,
FBLPromiseRetryWorkBlock))retryAgain FBL_PROMISES_DOT_SYNTAX
NS_SWIFT_UNAVAILABLE("");
+ (FBLPromise * (^)(dispatch_queue_t, NSInteger, NSTimeInterval,
FBLPromiseRetryPredicateBlock __nullable,
FBLPromiseRetryWorkBlock))retryAgainOn FBL_PROMISES_DOT_SYNTAX
NS_SWIFT_UNAVAILABLE("");
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 4f1067bdc3bbf4811b49c48d11f7cd55
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,57 @@
/**
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 all scheduled promises blocks.
@param timeout Maximum time to wait.
@return YES if all promises blocks have completed before the timeout and NO otherwise.
*/
FOUNDATION_EXTERN BOOL FBLWaitForPromisesWithTimeout(NSTimeInterval timeout) NS_REFINED_FOR_SWIFT;
@interface FBLPromise<Value>(TestingAdditions)
/**
Dispatch group for promises that is typically used to wait for all scheduled blocks.
*/
@property(class, nonatomic, readonly) dispatch_group_t dispatchGroup NS_REFINED_FOR_SWIFT;
/**
Properties to get the current state of the promise.
*/
@property(nonatomic, readonly) BOOL isPending NS_REFINED_FOR_SWIFT;
@property(nonatomic, readonly) BOOL isFulfilled NS_REFINED_FOR_SWIFT;
@property(nonatomic, readonly) BOOL isRejected NS_REFINED_FOR_SWIFT;
/**
Value the promise was fulfilled with.
Can be nil if the promise is still pending, was resolved with nil or after it has been rejected.
*/
@property(nonatomic, readonly, nullable) Value value NS_REFINED_FOR_SWIFT;
/**
Error the promise was rejected with.
Can be nil if the promise is still pending or after it has been fulfilled.
*/
@property(nonatomic, readonly, nullable) NSError *error NS_REFINED_FOR_SWIFT;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: c86e337a92e3a48058a0f2dfbffcd67d
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -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>(ThenAdditions)
typedef id __nullable (^FBLPromiseThenWorkBlock)(Value __nullable value) NS_SWIFT_UNAVAILABLE("");
/**
Creates a pending promise which eventually gets resolved with resolution returned from `work`
block: either value, error or another promise. The `work` block is executed asynchronously only
when the receiver is fulfilled. If receiver is rejected, the returned promise is also rejected with
the same error.
@param work A block to handle the value that receiver was fulfilled with.
@return A new pending promise to be resolved with resolution returned from the `work` block.
*/
- (FBLPromise *)then:(FBLPromiseThenWorkBlock)work NS_SWIFT_UNAVAILABLE("");
/**
Creates a pending promise which eventually gets resolved with resolution returned from `work`
block: either value, error or another promise. The `work` block is executed asynchronously when the
receiver is fulfilled. If receiver is rejected, the returned promise is also rejected with the same
error.
@param queue A queue to invoke the `work` block on.
@param work A block to handle the value that receiver was fulfilled with.
@return A new pending promise to be resolved with resolution returned from the `work` block.
*/
- (FBLPromise *)onQueue:(dispatch_queue_t)queue
then:(FBLPromiseThenWorkBlock)work NS_REFINED_FOR_SWIFT;
@end
/**
Convenience dot-syntax wrappers for `FBLPromise` `then` operators.
Usage: promise.then(^id(id value) { ... })
*/
@interface FBLPromise<Value>(DotSyntax_ThenAdditions)
- (FBLPromise* (^)(FBLPromiseThenWorkBlock))then FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE("");
- (FBLPromise* (^)(dispatch_queue_t, FBLPromiseThenWorkBlock))thenOn FBL_PROMISES_DOT_SYNTAX
NS_SWIFT_UNAVAILABLE("");
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: f4f762845defa494d9873864e37d0f00
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,57 @@
/**
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>(TimeoutAdditions)
/**
Waits for a promise with the specified `timeout`.
@param interval Time to wait in seconds.
@return A new pending promise that gets either resolved with same resolution as the receiver or
rejected with `FBLPromiseErrorCodeTimedOut` error code in `FBLPromiseErrorDomain`.
*/
- (FBLPromise *)timeout:(NSTimeInterval)interval NS_SWIFT_UNAVAILABLE("");
/**
Waits for a promise with the specified `timeout`.
@param queue A queue to dispatch on.
@param interval Time to wait in seconds.
@return A new pending promise that gets either resolved with same resolution as the receiver or
rejected with `FBLPromiseErrorCodeTimedOut` error code in `FBLPromiseErrorDomain`.
*/
- (FBLPromise *)onQueue:(dispatch_queue_t)queue
timeout:(NSTimeInterval)interval NS_REFINED_FOR_SWIFT;
@end
/**
Convenience dot-syntax wrappers for `FBLPromise` `timeout` operators.
Usage: promise.timeout(...)
*/
@interface FBLPromise<Value>(DotSyntax_TimeoutAdditions)
- (FBLPromise* (^)(NSTimeInterval))timeout FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE("");
- (FBLPromise* (^)(dispatch_queue_t, NSTimeInterval))timeoutOn FBL_PROMISES_DOT_SYNTAX
NS_SWIFT_UNAVAILABLE("");
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: c668f6c5568164fc3b02f2750c120de1
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -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>(ValidateAdditions)
typedef BOOL (^FBLPromiseValidateWorkBlock)(Value __nullable value) NS_SWIFT_UNAVAILABLE("");
/**
Validates a fulfilled value or rejects the value if it can not be validated.
@param predicate An expression to validate.
@return A new pending promise that gets either resolved with same resolution as the receiver or
rejected with `FBLPromiseErrorCodeValidationFailure` error code in `FBLPromiseErrorDomain`.
*/
- (FBLPromise *)validate:(FBLPromiseValidateWorkBlock)predicate NS_SWIFT_UNAVAILABLE("");
/**
Validates a fulfilled value or rejects the value if it can not be validated.
@param queue A queue to dispatch on.
@param predicate An expression to validate.
@return A new pending promise that gets either resolved with same resolution as the receiver or
rejected with `FBLPromiseErrorCodeValidationFailure` error code in `FBLPromiseErrorDomain`.
*/
- (FBLPromise *)onQueue:(dispatch_queue_t)queue
validate:(FBLPromiseValidateWorkBlock)predicate NS_REFINED_FOR_SWIFT;
@end
/**
Convenience dot-syntax wrappers for `FBLPromise` `validate` operators.
Usage: promise.validate(^BOOL(id value) { ... })
*/
@interface FBLPromise<Value>(DotSyntax_ValidateAdditions)
- (FBLPromise * (^)(FBLPromiseValidateWorkBlock))validate FBL_PROMISES_DOT_SYNTAX
NS_SWIFT_UNAVAILABLE("");
- (FBLPromise * (^)(dispatch_queue_t, FBLPromiseValidateWorkBlock))validateOn
FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE("");
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 7e83487986ee34fc6956133ce17c1ff9
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,316 @@
/**
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
/**
Different types of completion handlers available to be wrapped with promise.
*/
typedef void (^FBLPromiseCompletion)(void) NS_SWIFT_UNAVAILABLE("");
typedef void (^FBLPromiseObjectCompletion)(id __nullable) NS_SWIFT_UNAVAILABLE("");
typedef void (^FBLPromiseErrorCompletion)(NSError* __nullable) NS_SWIFT_UNAVAILABLE("");
typedef void (^FBLPromiseObjectOrErrorCompletion)(id __nullable, NSError* __nullable)
NS_SWIFT_UNAVAILABLE("");
typedef void (^FBLPromiseErrorOrObjectCompletion)(NSError* __nullable, id __nullable)
NS_SWIFT_UNAVAILABLE("");
typedef void (^FBLPromise2ObjectsOrErrorCompletion)(id __nullable, id __nullable,
NSError* __nullable) NS_SWIFT_UNAVAILABLE("");
typedef void (^FBLPromiseBoolCompletion)(BOOL) NS_SWIFT_UNAVAILABLE("");
typedef void (^FBLPromiseBoolOrErrorCompletion)(BOOL, NSError* __nullable) NS_SWIFT_UNAVAILABLE("");
typedef void (^FBLPromiseIntegerCompletion)(NSInteger) NS_SWIFT_UNAVAILABLE("");
typedef void (^FBLPromiseIntegerOrErrorCompletion)(NSInteger, NSError* __nullable)
NS_SWIFT_UNAVAILABLE("");
typedef void (^FBLPromiseDoubleCompletion)(double) NS_SWIFT_UNAVAILABLE("");
typedef void (^FBLPromiseDoubleOrErrorCompletion)(double, NSError* __nullable)
NS_SWIFT_UNAVAILABLE("");
/**
Provides an easy way to convert methods that use common callback patterns into promises.
*/
@interface FBLPromise<Value>(WrapAdditions)
/**
@param work A block to perform any operations needed to resolve the promise.
@returns A promise that resolves with `nil` when completion handler is invoked.
*/
+ (instancetype)wrapCompletion:(void (^)(FBLPromiseCompletion handler))work
NS_SWIFT_UNAVAILABLE("");
/**
@param queue A queue to invoke the `work` block on.
@param work A block to perform any operations needed to resolve the promise.
@returns A promise that resolves with `nil` when completion handler is invoked.
*/
+ (instancetype)onQueue:(dispatch_queue_t)queue
wrapCompletion:(void (^)(FBLPromiseCompletion handler))work NS_SWIFT_UNAVAILABLE("");
/**
@param work A block to perform any operations needed to resolve the promise.
@returns A promise that resolves with an object provided by completion handler.
*/
+ (instancetype)wrapObjectCompletion:(void (^)(FBLPromiseObjectCompletion handler))work
NS_SWIFT_UNAVAILABLE("");
/**
@param queue A queue to invoke the `work` block on.
@param work A block to perform any operations needed to resolve the promise.
@returns A promise that resolves with an object provided by completion handler.
*/
+ (instancetype)onQueue:(dispatch_queue_t)queue
wrapObjectCompletion:(void (^)(FBLPromiseObjectCompletion handler))work
NS_SWIFT_UNAVAILABLE("");
/**
@param work A block to perform any operations needed to resolve the promise.
@returns A promise that resolves with an error provided by completion handler.
If error is `nil`, fulfills with `nil`, otherwise rejects with the error.
*/
+ (instancetype)wrapErrorCompletion:(void (^)(FBLPromiseErrorCompletion handler))work
NS_SWIFT_UNAVAILABLE("");
/**
@param queue A queue to invoke the `work` block on.
@param work A block to perform any operations needed to resolve the promise.
@returns A promise that resolves with an error provided by completion handler.
If error is `nil`, fulfills with `nil`, otherwise rejects with the error.
*/
+ (instancetype)onQueue:(dispatch_queue_t)queue
wrapErrorCompletion:(void (^)(FBLPromiseErrorCompletion handler))work NS_SWIFT_UNAVAILABLE("");
/**
@param work A block to perform any operations needed to resolve the promise.
@returns A promise that resolves with an object provided by completion handler if error is `nil`.
Otherwise, rejects with the error.
*/
+ (instancetype)wrapObjectOrErrorCompletion:
(void (^)(FBLPromiseObjectOrErrorCompletion handler))work NS_SWIFT_UNAVAILABLE("");
/**
@param queue A queue to invoke the `work` block on.
@param work A block to perform any operations needed to resolve the promise.
@returns A promise that resolves with an object provided by completion handler if error is `nil`.
Otherwise, rejects with the error.
*/
+ (instancetype)onQueue:(dispatch_queue_t)queue
wrapObjectOrErrorCompletion:(void (^)(FBLPromiseObjectOrErrorCompletion handler))work
NS_SWIFT_UNAVAILABLE("");
/**
@param work A block to perform any operations needed to resolve the promise.
@returns A promise that resolves with an error or object provided by completion handler. If error
is not `nil`, rejects with the error.
*/
+ (instancetype)wrapErrorOrObjectCompletion:
(void (^)(FBLPromiseErrorOrObjectCompletion handler))work NS_SWIFT_UNAVAILABLE("");
/**
@param queue A queue to invoke the `work` block on.
@param work A block to perform any operations needed to resolve the promise.
@returns A promise that resolves with an error or object provided by completion handler. If error
is not `nil`, rejects with the error.
*/
+ (instancetype)onQueue:(dispatch_queue_t)queue
wrapErrorOrObjectCompletion:(void (^)(FBLPromiseErrorOrObjectCompletion handler))work
NS_SWIFT_UNAVAILABLE("");
/**
@param work A block to perform any operations needed to resolve the promise.
@returns A promise that resolves with an array of objects provided by completion handler in order
if error is `nil`. Otherwise, rejects with the error.
*/
+ (FBLPromise<NSArray*>*)wrap2ObjectsOrErrorCompletion:
(void (^)(FBLPromise2ObjectsOrErrorCompletion handler))work NS_SWIFT_UNAVAILABLE("");
/**
@param queue A queue to invoke the `work` block on.
@param work A block to perform any operations needed to resolve the promise.
@returns A promise that resolves with an array of objects provided by completion handler in order
if error is `nil`. Otherwise, rejects with the error.
*/
+ (FBLPromise<NSArray*>*)onQueue:(dispatch_queue_t)queue
wrap2ObjectsOrErrorCompletion:(void (^)(FBLPromise2ObjectsOrErrorCompletion handler))work
NS_SWIFT_UNAVAILABLE("");
/**
@param work A block to perform any operations needed to resolve the promise.
@returns A promise that resolves with an `NSNumber` wrapping YES/NO.
*/
+ (FBLPromise<NSNumber*>*)wrapBoolCompletion:(void (^)(FBLPromiseBoolCompletion handler))work
NS_SWIFT_UNAVAILABLE("");
/**
@param queue A queue to invoke the `work` block on.
@param work A block to perform any operations needed to resolve the promise.
@returns A promise that resolves with an `NSNumber` wrapping YES/NO.
*/
+ (FBLPromise<NSNumber*>*)onQueue:(dispatch_queue_t)queue
wrapBoolCompletion:(void (^)(FBLPromiseBoolCompletion handler))work
NS_SWIFT_UNAVAILABLE("");
/**
@param work A block to perform any operations needed to resolve the promise.
@returns A promise that resolves with an `NSNumber` wrapping YES/NO when error is `nil`.
Otherwise rejects with the error.
*/
+ (FBLPromise<NSNumber*>*)wrapBoolOrErrorCompletion:
(void (^)(FBLPromiseBoolOrErrorCompletion handler))work NS_SWIFT_UNAVAILABLE("");
/**
@param queue A queue to invoke the `work` block on.
@param work A block to perform any operations needed to resolve the promise.
@returns A promise that resolves with an `NSNumber` wrapping YES/NO when error is `nil`.
Otherwise rejects with the error.
*/
+ (FBLPromise<NSNumber*>*)onQueue:(dispatch_queue_t)queue
wrapBoolOrErrorCompletion:(void (^)(FBLPromiseBoolOrErrorCompletion handler))work
NS_SWIFT_UNAVAILABLE("");
/**
@param work A block to perform any operations needed to resolve the promise.
@returns A promise that resolves with an `NSNumber` wrapping an integer.
*/
+ (FBLPromise<NSNumber*>*)wrapIntegerCompletion:(void (^)(FBLPromiseIntegerCompletion handler))work
NS_SWIFT_UNAVAILABLE("");
/**
@param queue A queue to invoke the `work` block on.
@param work A block to perform any operations needed to resolve the promise.
@returns A promise that resolves with an `NSNumber` wrapping an integer.
*/
+ (FBLPromise<NSNumber*>*)onQueue:(dispatch_queue_t)queue
wrapIntegerCompletion:(void (^)(FBLPromiseIntegerCompletion handler))work
NS_SWIFT_UNAVAILABLE("");
/**
@param work A block to perform any operations needed to resolve the promise.
@returns A promise that resolves with an `NSNumber` wrapping an integer when error is `nil`.
Otherwise rejects with the error.
*/
+ (FBLPromise<NSNumber*>*)wrapIntegerOrErrorCompletion:
(void (^)(FBLPromiseIntegerOrErrorCompletion handler))work NS_SWIFT_UNAVAILABLE("");
/**
@param queue A queue to invoke the `work` block on.
@param work A block to perform any operations needed to resolve the promise.
@returns A promise that resolves with an `NSNumber` wrapping an integer when error is `nil`.
Otherwise rejects with the error.
*/
+ (FBLPromise<NSNumber*>*)onQueue:(dispatch_queue_t)queue
wrapIntegerOrErrorCompletion:(void (^)(FBLPromiseIntegerOrErrorCompletion handler))work
NS_SWIFT_UNAVAILABLE("");
/**
@param work A block to perform any operations needed to resolve the promise.
@returns A promise that resolves with an `NSNumber` wrapping a double.
*/
+ (FBLPromise<NSNumber*>*)wrapDoubleCompletion:(void (^)(FBLPromiseDoubleCompletion handler))work
NS_SWIFT_UNAVAILABLE("");
/**
@param queue A queue to invoke the `work` block on.
@param work A block to perform any operations needed to resolve the promise.
@returns A promise that resolves with an `NSNumber` wrapping a double.
*/
+ (FBLPromise<NSNumber*>*)onQueue:(dispatch_queue_t)queue
wrapDoubleCompletion:(void (^)(FBLPromiseDoubleCompletion handler))work
NS_SWIFT_UNAVAILABLE("");
/**
@param work A block to perform any operations needed to resolve the promise.
@returns A promise that resolves with an `NSNumber` wrapping a double when error is `nil`.
Otherwise rejects with the error.
*/
+ (FBLPromise<NSNumber*>*)wrapDoubleOrErrorCompletion:
(void (^)(FBLPromiseDoubleOrErrorCompletion handler))work NS_SWIFT_UNAVAILABLE("");
/**
@param queue A queue to invoke the `work` block on.
@param work A block to perform any operations needed to resolve the promise.
@returns A promise that resolves with an `NSNumber` wrapping a double when error is `nil`.
Otherwise rejects with the error.
*/
+ (FBLPromise<NSNumber*>*)onQueue:(dispatch_queue_t)queue
wrapDoubleOrErrorCompletion:(void (^)(FBLPromiseDoubleOrErrorCompletion handler))work
NS_SWIFT_UNAVAILABLE("");
@end
/**
Convenience dot-syntax wrappers for `FBLPromise` `wrap` operators.
Usage: FBLPromise.wrapCompletion(^(FBLPromiseCompletion handler) {...})
*/
@interface FBLPromise<Value>(DotSyntax_WrapAdditions)
+ (FBLPromise* (^)(void (^)(FBLPromiseCompletion)))wrapCompletion FBL_PROMISES_DOT_SYNTAX
NS_SWIFT_UNAVAILABLE("");
+ (FBLPromise* (^)(dispatch_queue_t, void (^)(FBLPromiseCompletion)))wrapCompletionOn
FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE("");
+ (FBLPromise* (^)(void (^)(FBLPromiseObjectCompletion)))wrapObjectCompletion
FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE("");
+ (FBLPromise* (^)(dispatch_queue_t, void (^)(FBLPromiseObjectCompletion)))wrapObjectCompletionOn
FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE("");
+ (FBLPromise* (^)(void (^)(FBLPromiseErrorCompletion)))wrapErrorCompletion FBL_PROMISES_DOT_SYNTAX
NS_SWIFT_UNAVAILABLE("");
+ (FBLPromise* (^)(dispatch_queue_t, void (^)(FBLPromiseErrorCompletion)))wrapErrorCompletionOn
FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE("");
+ (FBLPromise* (^)(void (^)(FBLPromiseObjectOrErrorCompletion)))wrapObjectOrErrorCompletion
FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE("");
+ (FBLPromise* (^)(dispatch_queue_t,
void (^)(FBLPromiseObjectOrErrorCompletion)))wrapObjectOrErrorCompletionOn
FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE("");
+ (FBLPromise* (^)(void (^)(FBLPromiseErrorOrObjectCompletion)))wrapErrorOrObjectCompletion
FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE("");
+ (FBLPromise* (^)(dispatch_queue_t,
void (^)(FBLPromiseErrorOrObjectCompletion)))wrapErrorOrObjectCompletionOn
FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE("");
+ (FBLPromise<NSArray*>* (^)(void (^)(FBLPromise2ObjectsOrErrorCompletion)))
wrap2ObjectsOrErrorCompletion FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE("");
+ (FBLPromise<NSArray*>* (^)(dispatch_queue_t, void (^)(FBLPromise2ObjectsOrErrorCompletion)))
wrap2ObjectsOrErrorCompletionOn FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE("");
+ (FBLPromise<NSNumber*>* (^)(void (^)(FBLPromiseBoolCompletion)))wrapBoolCompletion
FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE("");
+ (FBLPromise<NSNumber*>* (^)(dispatch_queue_t,
void (^)(FBLPromiseBoolCompletion)))wrapBoolCompletionOn
FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE("");
+ (FBLPromise<NSNumber*>* (^)(void (^)(FBLPromiseBoolOrErrorCompletion)))wrapBoolOrErrorCompletion
FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE("");
+ (FBLPromise<NSNumber*>* (^)(dispatch_queue_t,
void (^)(FBLPromiseBoolOrErrorCompletion)))wrapBoolOrErrorCompletionOn
FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE("");
+ (FBLPromise<NSNumber*>* (^)(void (^)(FBLPromiseIntegerCompletion)))wrapIntegerCompletion
FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE("");
+ (FBLPromise<NSNumber*>* (^)(dispatch_queue_t,
void (^)(FBLPromiseIntegerCompletion)))wrapIntegerCompletionOn
FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE("");
+ (FBLPromise<NSNumber*>* (^)(void (^)(FBLPromiseIntegerOrErrorCompletion)))
wrapIntegerOrErrorCompletion FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE("");
+ (FBLPromise<NSNumber*>* (^)(dispatch_queue_t, void (^)(FBLPromiseIntegerOrErrorCompletion)))
wrapIntegerOrErrorCompletionOn FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE("");
+ (FBLPromise<NSNumber*>* (^)(void (^)(FBLPromiseDoubleCompletion)))wrapDoubleCompletion
FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE("");
+ (FBLPromise<NSNumber*>* (^)(dispatch_queue_t,
void (^)(FBLPromiseDoubleCompletion)))wrapDoubleCompletionOn
FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE("");
+ (FBLPromise<NSNumber*>* (^)(void (^)(FBLPromiseDoubleOrErrorCompletion)))
wrapDoubleOrErrorCompletion FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE("");
+ (FBLPromise<NSNumber*>* (^)(dispatch_queue_t, void (^)(FBLPromiseDoubleOrErrorCompletion)))
wrapDoubleOrErrorCompletionOn FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE("");
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 488404598b16540de87cd4b1199a1c54
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,93 @@
/**
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 "FBLPromiseError.h"
NS_ASSUME_NONNULL_BEGIN
/**
Promises synchronization construct in Objective-C.
*/
@interface FBLPromise<__covariant Value> : NSObject
/**
Default dispatch queue used for `FBLPromise`, which is `main` if a queue is not specified.
*/
@property(class) dispatch_queue_t defaultDispatchQueue NS_REFINED_FOR_SWIFT;
/**
Creates a pending promise.
*/
+ (instancetype)pendingPromise NS_REFINED_FOR_SWIFT;
/**
Creates a resolved promise.
@param resolution An object to resolve the promise with: either a value or an error.
@return A new resolved promise.
*/
+ (instancetype)resolvedWith:(nullable id)resolution NS_REFINED_FOR_SWIFT;
/**
Synchronously fulfills the promise with a value.
@param value An arbitrary value to fulfill the promise with, including `nil`.
*/
- (void)fulfill:(nullable Value)value NS_REFINED_FOR_SWIFT;
/**
Synchronously rejects the promise with an error.
@param error An error to reject the promise with.
*/
- (void)reject:(NSError *)error NS_REFINED_FOR_SWIFT;
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
@end
@interface FBLPromise<Value>()
/**
Adds an object to the set of pending objects to keep strongly while the promise is pending.
Used by the Swift wrappers to keep them alive until the underlying ObjC promise is resolved.
@param object An object to add.
*/
- (void)addPendingObject:(id)object NS_REFINED_FOR_SWIFT;
@end
#ifdef FBL_PROMISES_DOT_SYNTAX_IS_DEPRECATED
#define FBL_PROMISES_DOT_SYNTAX __attribute__((deprecated))
#else
#define FBL_PROMISES_DOT_SYNTAX
#endif
@interface FBLPromise<Value>(DotSyntaxAdditions)
/**
Convenience dot-syntax wrappers for FBLPromise.
Usage: FBLPromise.pending()
FBLPromise.resolved(value)
*/
+ (FBLPromise * (^)(void))pending FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE("");
+ (FBLPromise * (^)(id __nullable))resolved FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE("");
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 8e25529c6758c4bb98d1f8934edb731b
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,43 @@
/**
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 <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
FOUNDATION_EXTERN NSErrorDomain const FBLPromiseErrorDomain NS_REFINED_FOR_SWIFT;
/**
Possible error codes in `FBLPromiseErrorDomain`.
*/
typedef NS_ENUM(NSInteger, FBLPromiseErrorCode) {
/** Promise failed to resolve in time. */
FBLPromiseErrorCodeTimedOut = 1,
/** Validation predicate returned false. */
FBLPromiseErrorCodeValidationFailure = 2,
} NS_REFINED_FOR_SWIFT;
NS_INLINE BOOL FBLPromiseErrorIsTimedOut(NSError *error) NS_SWIFT_UNAVAILABLE("") {
return error.domain == FBLPromiseErrorDomain &&
error.code == FBLPromiseErrorCodeTimedOut;
}
NS_INLINE BOOL FBLPromiseErrorIsValidationFailure(NSError *error) NS_SWIFT_UNAVAILABLE("") {
return error.domain == FBLPromiseErrorDomain &&
error.code == FBLPromiseErrorCodeValidationFailure;
}
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: f82da6eb485c64a8e8456a59273fb4a1
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -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+All.h"
#import "FBLPromise+Always.h"
#import "FBLPromise+Any.h"
#import "FBLPromise+Async.h"
#import "FBLPromise+Await.h"
#import "FBLPromise+Catch.h"
#import "FBLPromise+Delay.h"
#import "FBLPromise+Do.h"
#import "FBLPromise+Race.h"
#import "FBLPromise+Recover.h"
#import "FBLPromise+Reduce.h"
#import "FBLPromise+Retry.h"
#import "FBLPromise+Then.h"
#import "FBLPromise+Timeout.h"
#import "FBLPromise+Validate.h"
#import "FBLPromise+Wrap.h"

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 803de37921330470080ff3dc659d4ce7
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,36 @@
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
#import "FBLPromise+All.h"
#import "FBLPromise+Always.h"
#import "FBLPromise+Any.h"
#import "FBLPromise+Async.h"
#import "FBLPromise+Await.h"
#import "FBLPromise+Catch.h"
#import "FBLPromise+Delay.h"
#import "FBLPromise+Do.h"
#import "FBLPromise+Race.h"
#import "FBLPromise+Recover.h"
#import "FBLPromise+Reduce.h"
#import "FBLPromise+Retry.h"
#import "FBLPromise+Testing.h"
#import "FBLPromise+Then.h"
#import "FBLPromise+Timeout.h"
#import "FBLPromise+Validate.h"
#import "FBLPromise+Wrap.h"
#import "FBLPromise.h"
#import "FBLPromiseError.h"
#import "FBLPromises.h"
FOUNDATION_EXPORT double FBLPromisesVersionNumber;
FOUNDATION_EXPORT const unsigned char FBLPromisesVersionString[];

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 95a2586c4bbc2402c93fdbaa0c4d9a55
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,52 @@
<?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>BuildMachineOSBuild</key>
<string>21H1015</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>FBLPromises</string>
<key>CFBundleIdentifier</key>
<string>org.cocoapods.FBLPromises</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>FBLPromises</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.4.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>AppleTVOS</string>
</array>
<key>CFBundleVersion</key>
<string>1</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>20K67</string>
<key>DTPlatformName</key>
<string>appletvos</string>
<key>DTPlatformVersion</key>
<string>16.1</string>
<key>DTSDKBuild</key>
<string>20K67</string>
<key>DTSDKName</key>
<string>appletvos16.1</string>
<key>DTXcode</key>
<string>1410</string>
<key>DTXcodeBuild</key>
<string>14B47b</string>
<key>MinimumOSVersion</key>
<string>100.0</string>
<key>UIDeviceFamily</key>
<array>
<integer>3</integer>
</array>
</dict>
</plist>

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 450cb33bd14334fc3a84e231417ad2e9
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 24f9d5246c985400abbf847c4852b137
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,5 @@
framework module PromisesObjC {
umbrella header "PromisesObjC-umbrella.h"
export *
module * { export * }
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: d2cdf04c2532f43a3b84a8c1052d4d3a
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant: