备份CatanBuilding瘦身独立工程
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e70b8f62a848f4db5a05b908550730c5
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 1
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
Binary file not shown.
@@ -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>
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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"
|
||||
@@ -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[];
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
<?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>23F79</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>iPhoneOS</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>DTCompiler</key>
|
||||
<string>com.apple.compilers.llvm.clang.1_0</string>
|
||||
<key>DTPlatformBuild</key>
|
||||
<string>21C52</string>
|
||||
<key>DTPlatformName</key>
|
||||
<string>iphoneos</string>
|
||||
<key>DTPlatformVersion</key>
|
||||
<string>17.2</string>
|
||||
<key>DTSDKBuild</key>
|
||||
<string>21C52</string>
|
||||
<key>DTSDKName</key>
|
||||
<string>iphoneos17.2</string>
|
||||
<key>DTXcode</key>
|
||||
<string>1520</string>
|
||||
<key>DTXcodeBuild</key>
|
||||
<string>15C500b</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>100.0</string>
|
||||
<key>UIDeviceFamily</key>
|
||||
<array>
|
||||
<integer>1</integer>
|
||||
<integer>2</integer>
|
||||
</array>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,5 @@
|
||||
framework module PromisesObjC {
|
||||
umbrella header "PromisesObjC-umbrella.h"
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
/**
|
||||
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+Testing.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
Miscellaneous low-level private interfaces available to extend standard FBLPromise functionality.
|
||||
*/
|
||||
@interface FBLPromise<Value>()
|
||||
|
||||
typedef void (^FBLPromiseOnFulfillBlock)(Value __nullable value) NS_SWIFT_UNAVAILABLE("");
|
||||
typedef void (^FBLPromiseOnRejectBlock)(NSError *error) NS_SWIFT_UNAVAILABLE("");
|
||||
typedef id __nullable (^__nullable FBLPromiseChainedFulfillBlock)(Value __nullable value)
|
||||
NS_SWIFT_UNAVAILABLE("");
|
||||
typedef id __nullable (^__nullable FBLPromiseChainedRejectBlock)(NSError *error)
|
||||
NS_SWIFT_UNAVAILABLE("");
|
||||
|
||||
/**
|
||||
Creates a pending promise.
|
||||
*/
|
||||
- (instancetype)initPending NS_SWIFT_UNAVAILABLE("");
|
||||
|
||||
/**
|
||||
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)initWithResolution:(nullable id)resolution NS_SWIFT_UNAVAILABLE("");
|
||||
|
||||
/**
|
||||
Invokes `fulfill` and `reject` blocks on `queue` when the receiver gets either fulfilled or
|
||||
rejected respectively.
|
||||
*/
|
||||
- (void)observeOnQueue:(dispatch_queue_t)queue
|
||||
fulfill:(FBLPromiseOnFulfillBlock)onFulfill
|
||||
reject:(FBLPromiseOnRejectBlock)onReject NS_SWIFT_UNAVAILABLE("");
|
||||
|
||||
/**
|
||||
Returns a new promise which gets resolved with the return value of `chainedFulfill` or
|
||||
`chainedReject` blocks respectively. The blocks are invoked when the receiver gets either
|
||||
fulfilled or rejected. If `nil` is passed to either block arg, the returned promise is resolved
|
||||
with the same resolution as the receiver.
|
||||
*/
|
||||
- (FBLPromise *)chainOnQueue:(dispatch_queue_t)queue
|
||||
chainedFulfill:(FBLPromiseChainedFulfillBlock)chainedFulfill
|
||||
chainedReject:(FBLPromiseChainedRejectBlock)chainedReject NS_SWIFT_UNAVAILABLE("");
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,27 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6dfce5cc9d09648c89433b5ae72df0ae
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 1
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,80 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "FIRAnalytics.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/// Provides App Delegate handlers to be used in your App Delegate.
|
||||
///
|
||||
/// To save time integrating Firebase Analytics in an application, Firebase Analytics does not
|
||||
/// require delegation implementation from the AppDelegate if neither SwiftUI nor UIScene lifecycle
|
||||
/// is adopted. Instead this is automatically done by Firebase Analytics. Should you choose instead
|
||||
/// to delegate manually, you can turn off the App Delegate Proxy by adding
|
||||
/// FirebaseAppDelegateProxyEnabled into your app's Info.plist and setting it to boolean `NO`, and
|
||||
/// adding the methods in this category to corresponding delegation handlers.
|
||||
///
|
||||
/// To handle Universal Links, you must return `true` in
|
||||
/// `UIApplicationDelegate.application(_:didFinishLaunchingWithOptions:)`.
|
||||
@interface FIRAnalytics (AppDelegate)
|
||||
|
||||
/// Handles events related to a URL session that are waiting to be processed.
|
||||
///
|
||||
/// 1. If SwiftUI lifecycle is adopted, call this method from
|
||||
/// `UIApplicationDelegate.application(_:handleEventsForBackgroundURLSession:completionHandler:)`
|
||||
/// in your app delegate.
|
||||
///
|
||||
/// 2. If SwiftUI lifecycle is not adopted, Firebase Analytics does not require delegation
|
||||
/// implementation from the AppDelegate. If you choose instead to delegate manually, you can set
|
||||
/// FirebaseAppDelegateProxyEnabled to boolean `NO` in your app's Info.plist and call this method
|
||||
/// from
|
||||
/// `UIApplicationDelegate.application(_:handleEventsForBackgroundURLSession:completionHandler:)`
|
||||
/// in your app delegate.
|
||||
///
|
||||
/// @param identifier The identifier of the URL session requiring attention.
|
||||
/// @param completionHandler The completion handler to call when you finish processing the events.
|
||||
/// Calling this completion handler lets the system know that your app's user interface is
|
||||
/// updated and a new snapshot can be taken.
|
||||
+ (void)handleEventsForBackgroundURLSession:(NSString *)identifier
|
||||
completionHandler:(nullable void (^)(void))completionHandler;
|
||||
|
||||
/// Handles the event when the app is launched by a URL (custom URL scheme or universal link).
|
||||
///
|
||||
/// 1. If SwiftUI lifecycle is adopted, use `onOpenURL(perform:)` to register a handler and call
|
||||
/// this method in the handler.
|
||||
///
|
||||
/// 2. If UIScene lifecycle is adopted, call this method from
|
||||
/// `UISceneDelegate.scene(_:willConnectTo:options:)` and
|
||||
/// `UISceneDelegate.scene(_:openURLContexts:)` when the URL contexts are available.
|
||||
///
|
||||
/// 3. If neither SwiftUI nor UIScene lifecycle is adopted, Firebase Analytics does not require
|
||||
/// delegation implementation from the AppDelegate. If you choose instead to delegate manually, you
|
||||
/// can set FirebaseAppDelegateProxyEnabled to boolean `NO` in your app's Info.plist and call this
|
||||
/// method from `UIApplicationDelegate.application(_:open:options:)` in your app delegate.
|
||||
///
|
||||
/// @param url The URL resource to open. This resource can be a network resource or a file.
|
||||
+ (void)handleOpenURL:(NSURL *)url;
|
||||
|
||||
/// Handles the event when the app receives data associated with user activity that includes a
|
||||
/// Universal Link.
|
||||
///
|
||||
/// 1. If SwiftUI lifecycle is adopted, use `onOpenURL(perform:)` to register a handler and call
|
||||
/// `Analytics.handleOpen(_:)` instead in the handler.
|
||||
///
|
||||
/// 2. If UIScene lifecycle is adopted, call this method from
|
||||
/// `UISceneDelegate.scene(_:willConnectTo:options:)` and `UISceneDelegate.scene(_:continue:)` when
|
||||
/// NSUserActivity is available. See the [Apple
|
||||
/// doc](https://developer.apple.com/documentation/xcode/supporting-universal-links-in-your-app) for
|
||||
/// more details.
|
||||
///
|
||||
/// 3. If neither SwiftUI nor UIScene lifecycle is adopted, Firebase Analytics does not require
|
||||
/// delegation implementation from the AppDelegate. If you choose instead to delegate manually, you
|
||||
/// can set FirebaseAppDelegateProxyEnabled to boolean `NO` in your app's Info.plist and call this
|
||||
/// method from `UIApplication.application(_:continue:restorationHandler:)` in your app delegate.
|
||||
///
|
||||
/// @param userActivity The activity object containing the data associated with the task the user
|
||||
/// was performing.
|
||||
+ (void)handleUserActivity:(id)userActivity;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,51 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "FIRAnalytics.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/// The type of consent to set. Supported consent types are `ConsentType.adStorage`,
|
||||
/// `ConsentType.analyticsStorage`, `ConsentType.adUserData`, and `ConsentType.adPersonalization`.
|
||||
/// Omitting a type retains its previous status.
|
||||
typedef NSString *FIRConsentType NS_TYPED_ENUM NS_SWIFT_NAME(ConsentType);
|
||||
|
||||
/// Enables storage (such as device identifiers) related to advertising.
|
||||
extern FIRConsentType const FIRConsentTypeAdStorage;
|
||||
|
||||
/// Enables storage (such as app identifiers) related to analytics, e.g. visit duration.
|
||||
extern FIRConsentType const FIRConsentTypeAnalyticsStorage;
|
||||
|
||||
/// Sets consent for sending user data to Google for advertising purposes.
|
||||
extern FIRConsentType const FIRConsentTypeAdUserData;
|
||||
|
||||
/// Sets consent for personalized advertising.
|
||||
extern FIRConsentType const FIRConsentTypeAdPersonalization;
|
||||
|
||||
/// The status value of the consent type. Supported statuses are `ConsentStatus.granted` and
|
||||
/// `ConsentStatus.denied`.
|
||||
typedef NSString *FIRConsentStatus NS_TYPED_ENUM NS_SWIFT_NAME(ConsentStatus);
|
||||
|
||||
/// Consent status indicating consent is denied. For an overview of which data is sent when consent
|
||||
/// is denied, see [SDK behavior with consent
|
||||
/// mode](https://developers.google.com/tag-platform/security/concepts/consent-mode#tag-behavior).
|
||||
extern FIRConsentStatus const FIRConsentStatusDenied;
|
||||
|
||||
/// Consent status indicating consent is granted.
|
||||
extern FIRConsentStatus const FIRConsentStatusGranted;
|
||||
|
||||
/// Sets the applicable end user consent state.
|
||||
@interface FIRAnalytics (Consent)
|
||||
|
||||
/// Sets the applicable end user consent state (e.g. for device identifiers) for this app on this
|
||||
/// device. Use the consent settings to specify individual consent type values. Settings are
|
||||
/// persisted across app sessions. By default consent types are set to `ConsentStatus.granted`.
|
||||
///
|
||||
/// @param consentSettings A Dictionary of consent types. Supported consent type keys are
|
||||
/// `ConsentType.adStorage`, `ConsentType.analyticsStorage`, `ConsentType.adUserData`, and
|
||||
/// `ConsentType.adPersonalization`. Valid values are `ConsentStatus.granted` and
|
||||
/// `ConsentStatus.denied`.
|
||||
+ (void)setConsent:(NSDictionary<FIRConsentType, FIRConsentStatus> *)consentSettings;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,44 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "FIRAnalytics.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
API_UNAVAILABLE(macCatalyst, macos, tvos, watchos)
|
||||
@interface FIRAnalytics (OnDevice)
|
||||
|
||||
/// Initiates on-device conversion measurement given a user email address. Requires dependency
|
||||
/// GoogleAppMeasurementOnDeviceConversion to be linked in, otherwise it is a no-op.
|
||||
/// @param emailAddress User email address. Include a domain name for all email addresses
|
||||
/// (e.g. gmail.com or hotmail.co.jp).
|
||||
+ (void)initiateOnDeviceConversionMeasurementWithEmailAddress:(NSString *)emailAddress
|
||||
NS_SWIFT_NAME(initiateOnDeviceConversionMeasurement(emailAddress:));
|
||||
|
||||
/// Initiates on-device conversion measurement given a phone number in E.164 format. Requires
|
||||
/// dependency GoogleAppMeasurementOnDeviceConversion to be linked in, otherwise it is a no-op.
|
||||
/// @param phoneNumber User phone number. Must be in E.164 format, which means it must be
|
||||
/// limited to a maximum of 15 digits and must include a plus sign (+) prefix and country code
|
||||
/// with no dashes, parentheses, or spaces.
|
||||
+ (void)initiateOnDeviceConversionMeasurementWithPhoneNumber:(NSString *)phoneNumber
|
||||
NS_SWIFT_NAME(initiateOnDeviceConversionMeasurement(phoneNumber:));
|
||||
|
||||
/// Initiates on-device conversion measurement given a sha256-hashed user email address. Requires
|
||||
/// dependency GoogleAppMeasurementOnDeviceConversion to be linked in, otherwise it is a no-op.
|
||||
/// @param hashedEmailAddress User email address as a UTF8-encoded string normalized and hashed
|
||||
/// according to the instructions at
|
||||
/// https://firebase.google.com/docs/tutorials/ads-ios-on-device-measurement/step-3.
|
||||
+ (void)initiateOnDeviceConversionMeasurementWithHashedEmailAddress:(NSData *)hashedEmailAddress
|
||||
NS_SWIFT_NAME(initiateOnDeviceConversionMeasurement(hashedEmailAddress:));
|
||||
|
||||
/// Initiates on-device conversion measurement given a sha256-hashed phone number in E.164 format.
|
||||
/// Requires dependency GoogleAppMeasurementOnDeviceConversion to be linked in, otherwise it is a
|
||||
/// no-op.
|
||||
/// @param hashedPhoneNumber UTF8-encoded user phone number in E.164 format and then hashed
|
||||
/// according to the instructions at
|
||||
/// https://firebase.google.com/docs/tutorials/ads-ios-on-device-measurement/step-3.
|
||||
+ (void)initiateOnDeviceConversionMeasurementWithHashedPhoneNumber:(NSData *)hashedPhoneNumber
|
||||
NS_SWIFT_NAME(initiateOnDeviceConversionMeasurement(hashedPhoneNumber:));
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,155 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "FIREventNames.h"
|
||||
#import "FIRParameterNames.h"
|
||||
#import "FIRUserPropertyNames.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/// The top level Firebase Analytics singleton that provides methods for logging events and setting
|
||||
/// user properties. See <a href="http://goo.gl/gz8SLz">the developer guides</a> for general
|
||||
/// information on using Firebase Analytics in your apps.
|
||||
///
|
||||
/// @note The Analytics SDK uses SQLite to persist events and other app-specific data. Calling
|
||||
/// certain thread-unsafe global SQLite methods like `sqlite3_shutdown()` can result in
|
||||
/// unexpected crashes at runtime.
|
||||
NS_SWIFT_NAME(Analytics)
|
||||
@interface FIRAnalytics : NSObject
|
||||
|
||||
/// Logs an app event. The event can have up to 25 parameters. Events with the same name must have
|
||||
/// the same parameters. Up to 500 event names are supported. Using predefined events and/or
|
||||
/// parameters is recommended for optimal reporting.
|
||||
///
|
||||
/// The following event names are reserved and cannot be used:
|
||||
/// <ul>
|
||||
/// <li>ad_activeview</li>
|
||||
/// <li>ad_click</li>
|
||||
/// <li>ad_exposure</li>
|
||||
/// <li>ad_query</li>
|
||||
/// <li>ad_reward</li>
|
||||
/// <li>adunit_exposure</li>
|
||||
/// <li>app_clear_data</li>
|
||||
/// <li>app_exception</li>
|
||||
/// <li>app_remove</li>
|
||||
/// <li>app_store_refund</li>
|
||||
/// <li>app_store_subscription_cancel</li>
|
||||
/// <li>app_store_subscription_convert</li>
|
||||
/// <li>app_store_subscription_renew</li>
|
||||
/// <li>app_update</li>
|
||||
/// <li>app_upgrade</li>
|
||||
/// <li>dynamic_link_app_open</li>
|
||||
/// <li>dynamic_link_app_update</li>
|
||||
/// <li>dynamic_link_first_open</li>
|
||||
/// <li>error</li>
|
||||
/// <li>firebase_campaign</li>
|
||||
/// <li>first_open</li>
|
||||
/// <li>first_visit</li>
|
||||
/// <li>in_app_purchase</li>
|
||||
/// <li>notification_dismiss</li>
|
||||
/// <li>notification_foreground</li>
|
||||
/// <li>notification_open</li>
|
||||
/// <li>notification_receive</li>
|
||||
/// <li>os_update</li>
|
||||
/// <li>session_start</li>
|
||||
/// <li>session_start_with_rollout</li>
|
||||
/// <li>user_engagement</li>
|
||||
/// </ul>
|
||||
///
|
||||
/// @param name The name of the event. Should contain 1 to 40 alphanumeric characters or
|
||||
/// underscores. The name must start with an alphabetic character. Some event names are
|
||||
/// reserved. See FIREventNames.h for the list of reserved event names. The "firebase_",
|
||||
/// "google_", and "ga_" prefixes are reserved and should not be used. Note that event names are
|
||||
/// case-sensitive and that logging two events whose names differ only in case will result in
|
||||
/// two distinct events. To manually log screen view events, use the `screen_view` event name.
|
||||
/// @param parameters The dictionary of event parameters. Passing `nil` indicates that the event has
|
||||
/// no parameters. Parameter names can be up to 40 characters long and must start with an
|
||||
/// alphabetic character and contain only alphanumeric characters and underscores. Only String,
|
||||
/// Int, and Double parameter types are supported. String parameter values can be up to 100
|
||||
/// characters long for standard Google Analytics properties, and up to 500 characters long for
|
||||
/// Google Analytics 360 properties. The "firebase_", "google_", and "ga_" prefixes are reserved
|
||||
/// and should not be used for parameter names.
|
||||
+ (void)logEventWithName:(NSString *)name
|
||||
parameters:(nullable NSDictionary<NSString *, id> *)parameters
|
||||
NS_SWIFT_NAME(logEvent(_:parameters:));
|
||||
|
||||
/// Sets a user property to a given value. Up to 25 user property names are supported. Once set,
|
||||
/// user property values persist throughout the app lifecycle and across sessions.
|
||||
///
|
||||
/// The following user property names are reserved and cannot be used:
|
||||
/// <ul>
|
||||
/// <li>first_open_time</li>
|
||||
/// <li>last_deep_link_referrer</li>
|
||||
/// <li>user_id</li>
|
||||
/// </ul>
|
||||
///
|
||||
/// @param value The value of the user property. Values can be up to 36 characters long. Setting the
|
||||
/// value to `nil` removes the user property.
|
||||
/// @param name The name of the user property to set. Should contain 1 to 24 alphanumeric characters
|
||||
/// or underscores and must start with an alphabetic character. The "firebase_", "google_", and
|
||||
/// "ga_" prefixes are reserved and should not be used for user property names.
|
||||
+ (void)setUserPropertyString:(nullable NSString *)value forName:(NSString *)name
|
||||
NS_SWIFT_NAME(setUserProperty(_:forName:));
|
||||
|
||||
/// Sets the user ID property. This feature must be used in accordance with
|
||||
/// <a href="https://www.google.com/policies/privacy">Google's Privacy Policy</a>
|
||||
///
|
||||
/// @param userID The user ID to ascribe to the user of this app on this device, which must be
|
||||
/// non-empty and no more than 256 characters long. Setting userID to `nil` removes the user ID.
|
||||
+ (void)setUserID:(nullable NSString *)userID;
|
||||
|
||||
/// Sets whether analytics collection is enabled for this app on this device. This setting is
|
||||
/// persisted across app sessions. By default it is enabled.
|
||||
///
|
||||
/// @param analyticsCollectionEnabled A flag that enables or disables Analytics collection.
|
||||
+ (void)setAnalyticsCollectionEnabled:(BOOL)analyticsCollectionEnabled;
|
||||
|
||||
/// Sets the interval of inactivity in seconds that terminates the current session. The default
|
||||
/// value is 1800 seconds (30 minutes).
|
||||
///
|
||||
/// @param sessionTimeoutInterval The custom time of inactivity in seconds before the current
|
||||
/// session terminates.
|
||||
+ (void)setSessionTimeoutInterval:(NSTimeInterval)sessionTimeoutInterval;
|
||||
|
||||
/// Asynchronously retrieves the identifier of the current app session.
|
||||
///
|
||||
/// The session ID retrieval could fail due to Analytics collection disabled, app session expired,
|
||||
/// etc.
|
||||
///
|
||||
/// @param completion The completion handler to call when the session ID retrieval is complete. This
|
||||
/// handler is executed on a system-defined global concurrent queue.
|
||||
/// This completion handler takes the following parameters:
|
||||
/// <b>sessionID</b> The identifier of the current app session. The value is undefined if the
|
||||
/// request failed.
|
||||
/// <b>error</b> An error object that indicates why the request failed, or `nil` if the request
|
||||
/// was successful.
|
||||
+ (void)sessionIDWithCompletion:(void (^)(int64_t sessionID, NSError *_Nullable error))completion;
|
||||
|
||||
/// Returns the unique ID for this instance of the application or `nil` if
|
||||
/// `ConsentType.analyticsStorage` has been set to `ConsentStatus.denied`.
|
||||
///
|
||||
/// @see `FIRAnalytics+Consent.h`
|
||||
+ (nullable NSString *)appInstanceID;
|
||||
|
||||
/// Clears all analytics data for this instance from the device and resets the app instance ID.
|
||||
+ (void)resetAnalyticsData;
|
||||
|
||||
/// Adds parameters that will be set on every event logged from the SDK, including automatic ones.
|
||||
/// The values passed in the parameters dictionary will be added to the dictionary of default event
|
||||
/// parameters. These parameters persist across app runs. They are of lower precedence than event
|
||||
/// parameters, so if an event parameter and a parameter set using this API have the same name, the
|
||||
/// value of the event parameter will be used. The same limitations on event parameters apply to
|
||||
/// default event parameters.
|
||||
///
|
||||
/// @param parameters Parameters to be added to the dictionary of parameters added to every event.
|
||||
/// They will be added to the dictionary of default event parameters, replacing any existing
|
||||
/// parameter with the same name. Valid parameters are String, Int, and Double. Setting a key's
|
||||
/// value to `NSNull()` will clear that parameter. Passing in a `nil` dictionary will clear all
|
||||
/// parameters.
|
||||
+ (void)setDefaultEventParameters:(nullable NSDictionary<NSString *, id> *)parameters;
|
||||
|
||||
/// Unavailable.
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,418 @@
|
||||
/// @file FIREventNames.h
|
||||
///
|
||||
/// Predefined event names.
|
||||
///
|
||||
/// An Event is an important occurrence in your app that you want to measure. You can report up to
|
||||
/// 500 different types of Events per app and you can associate up to 25 unique parameters with each
|
||||
/// Event type. Some common events are suggested below, but you may also choose to specify custom
|
||||
/// Event types that are associated with your specific app. Each event type is identified by a
|
||||
/// unique name. Event names can be up to 40 characters long, may only contain alphanumeric
|
||||
/// characters and underscores ("_"), and must start with an alphabetic character. The "firebase_",
|
||||
/// "google_", and "ga_" prefixes are reserved and should not be used.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/// Ad Impression event. This event signifies when a user sees an ad impression. Note: If you supply
|
||||
/// the @c AnalyticsParameterValue parameter, you must also supply the @c AnalyticsParameterCurrency
|
||||
/// parameter so that revenue metrics can be computed accurately. Params:
|
||||
///
|
||||
/// <ul>
|
||||
/// <li>@c AnalyticsParameterAdPlatform (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterAdFormat (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterAdSource (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterAdUnitName (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterCurrency (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterValue (Double) (optional)</li>
|
||||
/// </ul>
|
||||
static NSString *const kFIREventAdImpression NS_SWIFT_NAME(AnalyticsEventAdImpression) =
|
||||
@"ad_impression";
|
||||
|
||||
/// Add Payment Info event. This event signifies that a user has submitted their payment
|
||||
/// information. Note: If you supply the @c AnalyticsParameterValue parameter, you must also supply
|
||||
/// the @c AnalyticsParameterCurrency parameter so that revenue metrics can be computed accurately.
|
||||
/// Params:
|
||||
///
|
||||
/// <ul>
|
||||
/// <li>@c AnalyticsParameterCoupon (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterCurrency (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterItems ([[String: Any]]) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterPaymentType (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterValue (Double) (optional)</li>
|
||||
/// </ul>
|
||||
static NSString *const kFIREventAddPaymentInfo NS_SWIFT_NAME(AnalyticsEventAddPaymentInfo) =
|
||||
@"add_payment_info";
|
||||
|
||||
/// Add Shipping Info event. This event signifies that a user has submitted their shipping
|
||||
/// information. Note: If you supply the @c AnalyticsParameterValue parameter, you must also supply
|
||||
/// the @c AnalyticsParameterCurrency parameter so that revenue metrics can be computed accurately.
|
||||
/// Params:
|
||||
///
|
||||
/// <ul>
|
||||
/// <li>@c AnalyticsParameterCoupon (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterCurrency (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterItems ([[String: Any]]) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterShippingTier (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterValue (Double) (optional)</li>
|
||||
/// </ul>
|
||||
static NSString *const kFIREventAddShippingInfo NS_SWIFT_NAME(AnalyticsEventAddShippingInfo) =
|
||||
@"add_shipping_info";
|
||||
|
||||
/// E-Commerce Add To Cart event. This event signifies that an item(s) was added to a cart for
|
||||
/// purchase. Add this event to a funnel with @c AnalyticsEventPurchase to gauge the effectiveness
|
||||
/// of your checkout process. Note: If you supply the @c AnalyticsParameterValue parameter, you must
|
||||
/// also supply the @c AnalyticsParameterCurrency parameter so that revenue metrics can be computed
|
||||
/// accurately. Params:
|
||||
///
|
||||
/// <ul>
|
||||
/// <li>@c AnalyticsParameterCurrency (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterItems ([[String: Any]]) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterValue (Double) (optional)</li>
|
||||
/// </ul>
|
||||
static NSString *const kFIREventAddToCart NS_SWIFT_NAME(AnalyticsEventAddToCart) = @"add_to_cart";
|
||||
|
||||
/// E-Commerce Add To Wishlist event. This event signifies that an item was added to a wishlist. Use
|
||||
/// this event to identify popular gift items. Note: If you supply the @c AnalyticsParameterValue
|
||||
/// parameter, you must also supply the @c AnalyticsParameterCurrency parameter so that revenue
|
||||
/// metrics can be computed accurately. Params:
|
||||
///
|
||||
/// <ul>
|
||||
/// <li>@c AnalyticsParameterCurrency (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterItems ([[String: Any]]) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterValue (Double) (optional)</li>
|
||||
/// </ul>
|
||||
static NSString *const kFIREventAddToWishlist NS_SWIFT_NAME(AnalyticsEventAddToWishlist) =
|
||||
@"add_to_wishlist";
|
||||
|
||||
/// App Open event. By logging this event when an App becomes active, developers can understand how
|
||||
/// often users leave and return during the course of a Session. Although Sessions are automatically
|
||||
/// reported, this event can provide further clarification around the continuous engagement of
|
||||
/// app-users.
|
||||
static NSString *const kFIREventAppOpen NS_SWIFT_NAME(AnalyticsEventAppOpen) = @"app_open";
|
||||
|
||||
/// E-Commerce Begin Checkout event. This event signifies that a user has begun the process of
|
||||
/// checking out. Add this event to a funnel with your @c AnalyticsEventPurchase event to gauge the
|
||||
/// effectiveness of your checkout process. Note: If you supply the @c AnalyticsParameterValue
|
||||
/// parameter, you must also supply the @c AnalyticsParameterCurrency parameter so that revenue
|
||||
/// metrics can be computed accurately. Params:
|
||||
///
|
||||
/// <ul>
|
||||
/// <li>@c AnalyticsParameterCoupon (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterCurrency (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterItems ([[String: Any]]) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterValue (Double) (optional)</li>
|
||||
/// </ul>
|
||||
static NSString *const kFIREventBeginCheckout NS_SWIFT_NAME(AnalyticsEventBeginCheckout) =
|
||||
@"begin_checkout";
|
||||
|
||||
/// Campaign Detail event. Log this event to supply the referral details of a re-engagement
|
||||
/// campaign. Note: you must supply at least one of the required parameters
|
||||
/// AnalyticsParameterSource, AnalyticsParameterMedium or AnalyticsParameterCampaign. Params:
|
||||
///
|
||||
/// <ul>
|
||||
/// <li>@c AnalyticsParameterSource (String)</li>
|
||||
/// <li>@c AnalyticsParameterMedium (String)</li>
|
||||
/// <li>@c AnalyticsParameterCampaign (String)</li>
|
||||
/// <li>@c AnalyticsParameterTerm (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterContent (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterAdNetworkClickID (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterCP1 (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterCampaignID (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterCreativeFormat (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterMarketingTactic (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterSourcePlatform (String) (optional)</li>
|
||||
/// </ul>
|
||||
static NSString *const kFIREventCampaignDetails NS_SWIFT_NAME(AnalyticsEventCampaignDetails) =
|
||||
@"campaign_details";
|
||||
|
||||
/// Earn Virtual Currency event. This event tracks the awarding of virtual currency in your app. Log
|
||||
/// this along with @c AnalyticsEventSpendVirtualCurrency to better understand your virtual economy.
|
||||
/// Params:
|
||||
///
|
||||
/// <ul>
|
||||
/// <li>@c AnalyticsParameterVirtualCurrencyName (String)</li>
|
||||
/// <li>@c AnalyticsParameterValue (Int or Double)</li>
|
||||
/// </ul>
|
||||
static NSString *const kFIREventEarnVirtualCurrency
|
||||
NS_SWIFT_NAME(AnalyticsEventEarnVirtualCurrency) = @"earn_virtual_currency";
|
||||
|
||||
/// Generate Lead event. Log this event when a lead has been generated in the app to understand the
|
||||
/// efficacy of your install and re-engagement campaigns. Note: If you supply the
|
||||
/// @c AnalyticsParameterValue parameter, you must also supply the @c AnalyticsParameterCurrency
|
||||
/// parameter so that revenue metrics can be computed accurately. Params:
|
||||
///
|
||||
/// <ul>
|
||||
/// <li>@c AnalyticsParameterCurrency (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterValue (Double) (optional)</li>
|
||||
/// </ul>
|
||||
static NSString *const kFIREventGenerateLead NS_SWIFT_NAME(AnalyticsEventGenerateLead) =
|
||||
@"generate_lead";
|
||||
|
||||
/// Join Group event. Log this event when a user joins a group such as a guild, team or family. Use
|
||||
/// this event to analyze how popular certain groups or social features are in your app. Params:
|
||||
///
|
||||
/// <ul>
|
||||
/// <li>@c AnalyticsParameterGroupID (String)</li>
|
||||
/// </ul>
|
||||
static NSString *const kFIREventJoinGroup NS_SWIFT_NAME(AnalyticsEventJoinGroup) = @"join_group";
|
||||
|
||||
/// Level End event. Log this event when the user finishes a level. Params:
|
||||
///
|
||||
/// <ul>
|
||||
/// <li>@c AnalyticsParameterLevelName (String)</li>
|
||||
/// <li>@c AnalyticsParameterSuccess (String)</li>
|
||||
/// </ul>
|
||||
static NSString *const kFIREventLevelEnd NS_SWIFT_NAME(AnalyticsEventLevelEnd) = @"level_end";
|
||||
|
||||
/// Level Start event. Log this event when the user starts a new level. Params:
|
||||
///
|
||||
/// <ul>
|
||||
/// <li>@c AnalyticsParameterLevelName (String)</li>
|
||||
/// </ul>
|
||||
static NSString *const kFIREventLevelStart NS_SWIFT_NAME(AnalyticsEventLevelStart) = @"level_start";
|
||||
|
||||
/// Level Up event. This event signifies that a player has leveled up in your gaming app. It can
|
||||
/// help you gauge the level distribution of your userbase and help you identify certain levels that
|
||||
/// are difficult to pass. Params:
|
||||
///
|
||||
/// <ul>
|
||||
/// <li>@c AnalyticsParameterLevel (Int)</li>
|
||||
/// <li>@c AnalyticsParameterCharacter (String) (optional)</li>
|
||||
/// </ul>
|
||||
static NSString *const kFIREventLevelUp NS_SWIFT_NAME(AnalyticsEventLevelUp) = @"level_up";
|
||||
|
||||
/// Login event. Apps with a login feature can report this event to signify that a user has logged
|
||||
/// in.
|
||||
static NSString *const kFIREventLogin NS_SWIFT_NAME(AnalyticsEventLogin) = @"login";
|
||||
|
||||
/// Post Score event. Log this event when the user posts a score in your gaming app. This event can
|
||||
/// help you understand how users are actually performing in your game and it can help you correlate
|
||||
/// high scores with certain audiences or behaviors. Params:
|
||||
///
|
||||
/// <ul>
|
||||
/// <li>@c AnalyticsParameterScore (Int)</li>
|
||||
/// <li>@c AnalyticsParameterLevel (Int) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterCharacter (String) (optional)</li>
|
||||
/// </ul>
|
||||
static NSString *const kFIREventPostScore NS_SWIFT_NAME(AnalyticsEventPostScore) = @"post_score";
|
||||
|
||||
/// E-Commerce Purchase event. This event signifies that an item(s) was purchased by a user. Note:
|
||||
/// This is different from the in-app purchase event, which is reported automatically for App
|
||||
/// Store-based apps. Note: If you supply the @c AnalyticsParameterValue parameter, you must also
|
||||
/// supply the @c AnalyticsParameterCurrency parameter so that revenue metrics can be computed
|
||||
/// accurately. Params:
|
||||
///
|
||||
/// <ul>
|
||||
/// <li>@c AnalyticsParameterAffiliation (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterCoupon (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterCurrency (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterEndDate (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterItemID (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterItems ([[String: Any]]) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterShipping (Double) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterStartDate (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterTax (Double) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterTransactionID (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterValue (Double) (optional)</li>
|
||||
/// </ul>
|
||||
static NSString *const kFIREventPurchase NS_SWIFT_NAME(AnalyticsEventPurchase) = @"purchase";
|
||||
|
||||
/// E-Commerce Refund event. This event signifies that a refund was issued. Note: If you supply the
|
||||
/// @c AnalyticsParameterValue parameter, you must also supply the @c AnalyticsParameterCurrency
|
||||
/// parameter so that revenue metrics can be computed accurately. Params:
|
||||
///
|
||||
/// <ul>
|
||||
/// <li>@c AnalyticsParameterAffiliation (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterCoupon (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterCurrency (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterItems ([[String: Any]]) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterShipping (Double) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterTax (Double) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterTransactionID (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterValue (Double) (optional)</li>
|
||||
/// </ul>
|
||||
static NSString *const kFIREventRefund NS_SWIFT_NAME(AnalyticsEventRefund) = @"refund";
|
||||
|
||||
/// E-Commerce Remove from Cart event. This event signifies that an item(s) was removed from a cart.
|
||||
/// Note: If you supply the @c AnalyticsParameterValue parameter, you must also supply the @c
|
||||
/// AnalyticsParameterCurrency parameter so that revenue metrics can be computed accurately. Params:
|
||||
///
|
||||
/// <ul>
|
||||
/// <li>@c AnalyticsParameterCurrency (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterItems ([[String: Any]]) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterValue (Double) (optional)</li>
|
||||
/// </ul>
|
||||
static NSString *const kFIREventRemoveFromCart NS_SWIFT_NAME(AnalyticsEventRemoveFromCart) =
|
||||
@"remove_from_cart";
|
||||
|
||||
/// Screen View event. This event signifies a screen view. Use this when a screen transition occurs.
|
||||
/// This event can be logged irrespective of whether automatic screen tracking is enabled. Params:
|
||||
///
|
||||
/// <ul>
|
||||
/// <li>@c AnalyticsParameterScreenClass (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterScreenName (String) (optional)</li>
|
||||
/// </ul>
|
||||
static NSString *const kFIREventScreenView NS_SWIFT_NAME(AnalyticsEventScreenView) = @"screen_view";
|
||||
|
||||
/// Search event. Apps that support search features can use this event to contextualize search
|
||||
/// operations by supplying the appropriate, corresponding parameters. This event can help you
|
||||
/// identify the most popular content in your app. Params:
|
||||
///
|
||||
/// <ul>
|
||||
/// <li>@c AnalyticsParameterSearchTerm (String)</li>
|
||||
/// <li>@c AnalyticsParameterStartDate (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterEndDate (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterNumberOfNights (Int) (optional) for hotel bookings</li>
|
||||
/// <li>@c AnalyticsParameterNumberOfRooms (Int) (optional) for hotel bookings</li>
|
||||
/// <li>@c AnalyticsParameterNumberOfPassengers (Int) (optional) for travel bookings</li>
|
||||
/// <li>@c AnalyticsParameterOrigin (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterDestination (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterTravelClass (String) (optional) for travel bookings</li>
|
||||
/// </ul>
|
||||
static NSString *const kFIREventSearch NS_SWIFT_NAME(AnalyticsEventSearch) = @"search";
|
||||
|
||||
/// Select Content event. This general purpose event signifies that a user has selected some content
|
||||
/// of a certain type in an app. The content can be any object in your app. This event can help you
|
||||
/// identify popular content and categories of content in your app. Params:
|
||||
///
|
||||
/// <ul>
|
||||
/// <li>@c AnalyticsParameterContentType (String)</li>
|
||||
/// <li>@c AnalyticsParameterItemID (String)</li>
|
||||
/// </ul>
|
||||
static NSString *const kFIREventSelectContent NS_SWIFT_NAME(AnalyticsEventSelectContent) =
|
||||
@"select_content";
|
||||
|
||||
/// Select Item event. This event signifies that an item was selected by a user from a list. Use the
|
||||
/// appropriate parameters to contextualize the event. Use this event to discover the most popular
|
||||
/// items selected. Params:
|
||||
///
|
||||
/// <ul>
|
||||
/// <li>@c AnalyticsParameterItems ([[String: Any]]) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterItemListID (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterItemListName (String) (optional)</li>
|
||||
/// </ul>
|
||||
static NSString *const kFIREventSelectItem NS_SWIFT_NAME(AnalyticsEventSelectItem) = @"select_item";
|
||||
|
||||
/// Select promotion event. This event signifies that a user has selected a promotion offer. Use the
|
||||
/// appropriate parameters to contextualize the event, such as the item(s) for which the promotion
|
||||
/// applies. Params:
|
||||
///
|
||||
/// <ul>
|
||||
/// <li>@c AnalyticsParameterCreativeName (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterCreativeSlot (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterItems ([[String: Any]]) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterLocationID (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterPromotionID (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterPromotionName (String) (optional)</li>
|
||||
/// </ul>
|
||||
static NSString *const kFIREventSelectPromotion NS_SWIFT_NAME(AnalyticsEventSelectPromotion) =
|
||||
@"select_promotion";
|
||||
|
||||
/// Share event. Apps with social features can log the Share event to identify the most viral
|
||||
/// content. Params:
|
||||
///
|
||||
/// <ul>
|
||||
/// <li>@c AnalyticsParameterContentType (String)</li>
|
||||
/// <li>@c AnalyticsParameterItemID (String)</li>
|
||||
/// </ul>
|
||||
static NSString *const kFIREventShare NS_SWIFT_NAME(AnalyticsEventShare) = @"share";
|
||||
|
||||
/// Sign Up event. This event indicates that a user has signed up for an account in your app. The
|
||||
/// parameter signifies the method by which the user signed up. Use this event to understand the
|
||||
/// different behaviors between logged in and logged out users. Params:
|
||||
///
|
||||
/// <ul>
|
||||
/// <li>@c AnalyticsParameterMethod (String)</li>
|
||||
/// </ul>
|
||||
static NSString *const kFIREventSignUp NS_SWIFT_NAME(AnalyticsEventSignUp) = @"sign_up";
|
||||
|
||||
/// Spend Virtual Currency event. This event tracks the sale of virtual goods in your app and can
|
||||
/// help you identify which virtual goods are the most popular objects of purchase. Params:
|
||||
///
|
||||
/// <ul>
|
||||
/// <li>@c AnalyticsParameterItemName (String)</li>
|
||||
/// <li>@c AnalyticsParameterVirtualCurrencyName (String)</li>
|
||||
/// <li>@c AnalyticsParameterValue (Int or Double)</li>
|
||||
/// </ul>
|
||||
static NSString *const kFIREventSpendVirtualCurrency
|
||||
NS_SWIFT_NAME(AnalyticsEventSpendVirtualCurrency) = @"spend_virtual_currency";
|
||||
|
||||
/// Tutorial Begin event. This event signifies the start of the on-boarding process in your app. Use
|
||||
/// this in a funnel with @c AnalyticsEventTutorialComplete to understand how many users complete
|
||||
/// this process and move on to the full app experience.
|
||||
static NSString *const kFIREventTutorialBegin NS_SWIFT_NAME(AnalyticsEventTutorialBegin) =
|
||||
@"tutorial_begin";
|
||||
|
||||
/// Tutorial End event. Use this event to signify the user's completion of your app's on-boarding
|
||||
/// process. Add this to a funnel with @c AnalyticsEventTutorialBegin to gauge the completion rate
|
||||
/// of your on-boarding process.
|
||||
static NSString *const kFIREventTutorialComplete NS_SWIFT_NAME(AnalyticsEventTutorialComplete) =
|
||||
@"tutorial_complete";
|
||||
|
||||
/// Unlock Achievement event. Log this event when the user has unlocked an achievement in your
|
||||
/// game. Since achievements generally represent the breadth of a gaming experience, this event can
|
||||
/// help you understand how many users are experiencing all that your game has to offer. Params:
|
||||
///
|
||||
/// <ul>
|
||||
/// <li>@c AnalyticsParameterAchievementID (String)</li>
|
||||
/// </ul>
|
||||
static NSString *const kFIREventUnlockAchievement NS_SWIFT_NAME(AnalyticsEventUnlockAchievement) =
|
||||
@"unlock_achievement";
|
||||
|
||||
/// E-commerce View Cart event. This event signifies that a user has viewed their cart. Use this to
|
||||
/// analyze your purchase funnel. Note: If you supply the @c AnalyticsParameterValue parameter, you
|
||||
/// must also supply the @c AnalyticsParameterCurrency parameter so that revenue metrics can be
|
||||
/// computed accurately. Params:
|
||||
///
|
||||
/// <ul>
|
||||
/// <li>@c AnalyticsParameterCurrency (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterItems ([[String: Any]]) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterValue (Double) (optional)</li>
|
||||
/// </ul>
|
||||
static NSString *const kFIREventViewCart NS_SWIFT_NAME(AnalyticsEventViewCart) = @"view_cart";
|
||||
|
||||
/// View Item event. This event signifies that a user has viewed an item. Use the appropriate
|
||||
/// parameters to contextualize the event. Use this event to discover the most popular items viewed
|
||||
/// in your app. Note: If you supply the @c AnalyticsParameterValue parameter, you must also supply
|
||||
/// the @c AnalyticsParameterCurrency parameter so that revenue metrics can be computed accurately.
|
||||
/// Params:
|
||||
///
|
||||
/// <ul>
|
||||
/// <li>@c AnalyticsParameterCurrency (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterItems ([[String: Any]]) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterValue (Double) (optional)</li>
|
||||
/// </ul>
|
||||
static NSString *const kFIREventViewItem NS_SWIFT_NAME(AnalyticsEventViewItem) = @"view_item";
|
||||
|
||||
/// View Item List event. Log this event when a user sees a list of items or offerings. Params:
|
||||
///
|
||||
/// <ul>
|
||||
/// <li>@c AnalyticsParameterItems ([[String: Any]]) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterItemListID (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterItemListName (String) (optional)</li>
|
||||
/// </ul>
|
||||
static NSString *const kFIREventViewItemList NS_SWIFT_NAME(AnalyticsEventViewItemList) =
|
||||
@"view_item_list";
|
||||
|
||||
/// View Promotion event. This event signifies that a promotion was shown to a user. Add this event
|
||||
/// to a funnel with the @c AnalyticsEventAddToCart and @c AnalyticsEventPurchase to gauge your
|
||||
/// conversion process. Params:
|
||||
///
|
||||
/// <ul>
|
||||
/// <li>@c AnalyticsParameterCreativeName (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterCreativeSlot (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterItems ([[String: Any]]) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterLocationID (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterPromotionID (String) (optional)</li>
|
||||
/// <li>@c AnalyticsParameterPromotionName (String) (optional)</li>
|
||||
/// </ul>
|
||||
static NSString *const kFIREventViewPromotion NS_SWIFT_NAME(AnalyticsEventViewPromotion) =
|
||||
@"view_promotion";
|
||||
|
||||
/// View Search Results event. Log this event when the user has been presented with the results of a
|
||||
/// search. Params:
|
||||
///
|
||||
/// <ul>
|
||||
/// <li>@c AnalyticsParameterSearchTerm (String)</li>
|
||||
/// </ul>
|
||||
static NSString *const kFIREventViewSearchResults NS_SWIFT_NAME(AnalyticsEventViewSearchResults) =
|
||||
@"view_search_results";
|
||||
@@ -0,0 +1,722 @@
|
||||
/// @file FIRParameterNames.h
|
||||
///
|
||||
/// Predefined event parameter names.
|
||||
///
|
||||
/// Params supply information that contextualize Events. You can associate up to 25 unique Params
|
||||
/// with each Event type. Some Params are suggested below for certain common Events, but you are
|
||||
/// not limited to these. You may supply extra Params for suggested Events or custom Params for
|
||||
/// Custom events. Param names can be up to 40 characters long, may only contain alphanumeric
|
||||
/// characters and underscores ("_"), and must start with an alphabetic character. Param values can
|
||||
/// be up to 100 characters long for standard Google Analytics properties and up to 500 characters
|
||||
/// long for Google Analytics 360 properties. The "firebase_", "google_", and "ga_" prefixes are
|
||||
/// reserved and should not be used.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/// Game achievement ID (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterAchievementID : "10_matches_won",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterAchievementID NS_SWIFT_NAME(AnalyticsParameterAchievementID) =
|
||||
@"achievement_id";
|
||||
|
||||
/// The ad format (e.g. Banner, Interstitial, Rewarded, Native, Rewarded Interstitial, Instream).
|
||||
/// (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterAdFormat : "Banner",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterAdFormat NS_SWIFT_NAME(AnalyticsParameterAdFormat) =
|
||||
@"ad_format";
|
||||
|
||||
/// Ad Network Click ID (String). Used for network-specific click IDs which vary in format.
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterAdNetworkClickID : "1234567",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterAdNetworkClickID
|
||||
NS_SWIFT_NAME(AnalyticsParameterAdNetworkClickID) = @"aclid";
|
||||
|
||||
/// The ad platform (e.g. MoPub, IronSource) (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterAdPlatform : "MoPub",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterAdPlatform NS_SWIFT_NAME(AnalyticsParameterAdPlatform) =
|
||||
@"ad_platform";
|
||||
|
||||
/// The ad source (e.g. AdColony) (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterAdSource : "AdColony",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterAdSource NS_SWIFT_NAME(AnalyticsParameterAdSource) =
|
||||
@"ad_source";
|
||||
|
||||
/// The ad unit name (e.g. Banner_03) (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterAdUnitName : "Banner_03",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterAdUnitName NS_SWIFT_NAME(AnalyticsParameterAdUnitName) =
|
||||
@"ad_unit_name";
|
||||
|
||||
/// A product affiliation to designate a supplying company or brick and mortar store location
|
||||
/// (String). <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterAffiliation : "Google Store",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterAffiliation NS_SWIFT_NAME(AnalyticsParameterAffiliation) =
|
||||
@"affiliation";
|
||||
|
||||
/// Campaign custom parameter (String). Used as a method of capturing custom data in a campaign.
|
||||
/// Use varies by network.
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterCP1 : "custom_data",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterCP1 NS_SWIFT_NAME(AnalyticsParameterCP1) = @"cp1";
|
||||
|
||||
/// The individual campaign name, slogan, promo code, etc. Some networks have pre-defined macro to
|
||||
/// capture campaign information, otherwise can be populated by developer. Highly Recommended
|
||||
/// (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterCampaign : "winter_promotion",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterCampaign NS_SWIFT_NAME(AnalyticsParameterCampaign) =
|
||||
@"campaign";
|
||||
|
||||
/// Campaign ID (String). Used for keyword analysis to identify a specific product promotion or
|
||||
/// strategic campaign. This is a required key for GA4 data import.
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterCampaignID : "7877652710",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterCampaignID NS_SWIFT_NAME(AnalyticsParameterCampaignID) =
|
||||
@"campaign_id";
|
||||
|
||||
/// Character used in game (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterCharacter : "beat_boss",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterCharacter NS_SWIFT_NAME(AnalyticsParameterCharacter) =
|
||||
@"character";
|
||||
|
||||
/// Campaign content (String).
|
||||
static NSString *const kFIRParameterContent NS_SWIFT_NAME(AnalyticsParameterContent) = @"content";
|
||||
|
||||
/// Type of content selected (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterContentType : "news article",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterContentType NS_SWIFT_NAME(AnalyticsParameterContentType) =
|
||||
@"content_type";
|
||||
|
||||
/// Coupon code used for a purchase (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterCoupon : "SUMMER_FUN",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterCoupon NS_SWIFT_NAME(AnalyticsParameterCoupon) = @"coupon";
|
||||
|
||||
/// Creative Format (String). Used to identify the high-level classification of the type of ad
|
||||
/// served by a specific campaign.
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterCreativeFormat : "display",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterCreativeFormat NS_SWIFT_NAME(AnalyticsParameterCreativeFormat) =
|
||||
@"creative_format";
|
||||
|
||||
/// The name of a creative used in a promotional spot (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterCreativeName : "Summer Sale",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterCreativeName NS_SWIFT_NAME(AnalyticsParameterCreativeName) =
|
||||
@"creative_name";
|
||||
|
||||
/// The name of a creative slot (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterCreativeSlot : "summer_banner2",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterCreativeSlot NS_SWIFT_NAME(AnalyticsParameterCreativeSlot) =
|
||||
@"creative_slot";
|
||||
|
||||
/// Currency of the purchase or items associated with the event, in 3-letter
|
||||
/// <a href="http://en.wikipedia.org/wiki/ISO_4217#Active_codes"> ISO_4217</a> format (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterCurrency : "USD",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterCurrency NS_SWIFT_NAME(AnalyticsParameterCurrency) =
|
||||
@"currency";
|
||||
|
||||
/// Flight or Travel destination (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterDestination : "Mountain View, CA",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterDestination NS_SWIFT_NAME(AnalyticsParameterDestination) =
|
||||
@"destination";
|
||||
|
||||
/// Monetary value of discount associated with a purchase (Double).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterDiscount : 2.0,
|
||||
/// AnalyticsParameterCurrency : "USD", // e.g. $2.00 USD
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterDiscount NS_SWIFT_NAME(AnalyticsParameterDiscount) =
|
||||
@"discount";
|
||||
|
||||
/// The arrival date, check-out date or rental end date for the item. This should be in
|
||||
/// YYYY-MM-DD format (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterEndDate : "2015-09-14",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterEndDate NS_SWIFT_NAME(AnalyticsParameterEndDate) = @"end_date";
|
||||
|
||||
/// Indicates that the associated event should either extend the current session or start a new
|
||||
/// session if no session was active when the event was logged. Specify 1 to extend the current
|
||||
/// session or to start a new session; any other value will not extend or start a session.
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterExtendSession : 1,
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterExtendSession NS_SWIFT_NAME(AnalyticsParameterExtendSession) =
|
||||
@"extend_session";
|
||||
|
||||
/// Flight number for travel events (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterFlightNumber : "ZZ800",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterFlightNumber NS_SWIFT_NAME(AnalyticsParameterFlightNumber) =
|
||||
@"flight_number";
|
||||
|
||||
/// Group/clan/guild ID (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterGroupID : "g1",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterGroupID NS_SWIFT_NAME(AnalyticsParameterGroupID) = @"group_id";
|
||||
|
||||
/// The index of the item in a list (Int).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterIndex : 5,
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterIndex NS_SWIFT_NAME(AnalyticsParameterIndex) = @"index";
|
||||
|
||||
/// Item brand (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterItemBrand : "Google",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterItemBrand NS_SWIFT_NAME(AnalyticsParameterItemBrand) =
|
||||
@"item_brand";
|
||||
|
||||
/// Item category (context-specific) (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterItemCategory : "pants",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterItemCategory NS_SWIFT_NAME(AnalyticsParameterItemCategory) =
|
||||
@"item_category";
|
||||
|
||||
/// Item Category (context-specific) (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterItemCategory2 : "pants",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterItemCategory2 NS_SWIFT_NAME(AnalyticsParameterItemCategory2) =
|
||||
@"item_category2";
|
||||
|
||||
/// Item Category (context-specific) (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterItemCategory3 : "pants",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterItemCategory3 NS_SWIFT_NAME(AnalyticsParameterItemCategory3) =
|
||||
@"item_category3";
|
||||
|
||||
/// Item Category (context-specific) (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterItemCategory4 : "pants",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterItemCategory4 NS_SWIFT_NAME(AnalyticsParameterItemCategory4) =
|
||||
@"item_category4";
|
||||
|
||||
/// Item Category (context-specific) (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterItemCategory5 : "pants",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterItemCategory5 NS_SWIFT_NAME(AnalyticsParameterItemCategory5) =
|
||||
@"item_category5";
|
||||
|
||||
/// Item ID (context-specific) (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterItemID : "SKU_12345",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterItemID NS_SWIFT_NAME(AnalyticsParameterItemID) = @"item_id";
|
||||
|
||||
/// The ID of the list in which the item was presented to the user (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterItemListID : "ABC123",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterItemListID NS_SWIFT_NAME(AnalyticsParameterItemListID) =
|
||||
@"item_list_id";
|
||||
|
||||
/// The name of the list in which the item was presented to the user (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterItemListName : "Related products",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterItemListName NS_SWIFT_NAME(AnalyticsParameterItemListName) =
|
||||
@"item_list_name";
|
||||
|
||||
/// Item Name (context-specific) (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterItemName : "jeggings",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterItemName NS_SWIFT_NAME(AnalyticsParameterItemName) =
|
||||
@"item_name";
|
||||
|
||||
/// Item variant (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterItemVariant : "Black",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterItemVariant NS_SWIFT_NAME(AnalyticsParameterItemVariant) =
|
||||
@"item_variant";
|
||||
|
||||
/// The list of items involved in the transaction expressed as `[[String: Any]]`.
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterItems : [
|
||||
/// [AnalyticsParameterItemName : "jeggings", AnalyticsParameterItemCategory : "pants"],
|
||||
/// [AnalyticsParameterItemName : "boots", AnalyticsParameterItemCategory : "shoes"],
|
||||
/// ],
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterItems NS_SWIFT_NAME(AnalyticsParameterItems) = @"items";
|
||||
|
||||
/// Level in game (Int).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterLevel : 42,
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterLevel NS_SWIFT_NAME(AnalyticsParameterLevel) = @"level";
|
||||
|
||||
/// The name of a level in a game (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterLevelName : "room_1",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterLevelName NS_SWIFT_NAME(AnalyticsParameterLevelName) =
|
||||
@"level_name";
|
||||
|
||||
/// Location (String). The Google <a href="https://developers.google.com/places/place-id">Place ID
|
||||
/// </a> that corresponds to the associated event. Alternatively, you can supply your own custom
|
||||
/// Location ID.
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterLocation : "ChIJiyj437sx3YAR9kUWC8QkLzQ",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterLocation NS_SWIFT_NAME(AnalyticsParameterLocation) =
|
||||
@"location";
|
||||
|
||||
/// The location associated with the event. Preferred to be the Google
|
||||
/// <a href="https://developers.google.com/places/place-id">Place ID</a> that corresponds to the
|
||||
/// associated item but could be overridden to a custom location ID string.(String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterLocationID : "ChIJiyj437sx3YAR9kUWC8QkLzQ",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterLocationID NS_SWIFT_NAME(AnalyticsParameterLocationID) =
|
||||
@"location_id";
|
||||
|
||||
/// Marketing Tactic (String). Used to identify the targeting criteria applied to a specific
|
||||
/// campaign.
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterMarketingTactic : "Remarketing",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterMarketingTactic
|
||||
NS_SWIFT_NAME(AnalyticsParameterMarketingTactic) = @"marketing_tactic";
|
||||
|
||||
/// The advertising or marketing medium, for example: cpc, banner, email, push. Highly recommended
|
||||
/// (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterMedium : "email",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterMedium NS_SWIFT_NAME(AnalyticsParameterMedium) = @"medium";
|
||||
|
||||
/// A particular approach used in an operation; for example, "facebook" or "email" in the context
|
||||
/// of a sign_up or login event. (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterMethod : "google",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterMethod NS_SWIFT_NAME(AnalyticsParameterMethod) = @"method";
|
||||
|
||||
/// Number of nights staying at hotel (Int).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterNumberOfNights : 3,
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterNumberOfNights
|
||||
NS_SWIFT_NAME(AnalyticsParameterNumberOfNights) = @"number_of_nights";
|
||||
|
||||
/// Number of passengers traveling (Int).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterNumberOfPassengers : 11,
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterNumberOfPassengers
|
||||
NS_SWIFT_NAME(AnalyticsParameterNumberOfPassengers) = @"number_of_passengers";
|
||||
|
||||
/// Number of rooms for travel events (Int).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterNumberOfRooms : 2,
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterNumberOfRooms NS_SWIFT_NAME(AnalyticsParameterNumberOfRooms) =
|
||||
@"number_of_rooms";
|
||||
|
||||
/// Flight or Travel origin (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterOrigin : "Mountain View, CA",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterOrigin NS_SWIFT_NAME(AnalyticsParameterOrigin) = @"origin";
|
||||
|
||||
/// The chosen method of payment (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterPaymentType : "Visa",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterPaymentType NS_SWIFT_NAME(AnalyticsParameterPaymentType) =
|
||||
@"payment_type";
|
||||
|
||||
/// Purchase price (Double).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterPrice : 1.0,
|
||||
/// AnalyticsParameterCurrency : "USD", // e.g. $1.00 USD
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterPrice NS_SWIFT_NAME(AnalyticsParameterPrice) = @"price";
|
||||
|
||||
/// The ID of a product promotion (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterPromotionID : "ABC123",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterPromotionID NS_SWIFT_NAME(AnalyticsParameterPromotionID) =
|
||||
@"promotion_id";
|
||||
|
||||
/// The name of a product promotion (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterPromotionName : "Summer Sale",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterPromotionName NS_SWIFT_NAME(AnalyticsParameterPromotionName) =
|
||||
@"promotion_name";
|
||||
|
||||
/// Purchase quantity (Int).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterQuantity : 1,
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterQuantity NS_SWIFT_NAME(AnalyticsParameterQuantity) =
|
||||
@"quantity";
|
||||
|
||||
/// Score in game (Int).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterScore : 4200,
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterScore NS_SWIFT_NAME(AnalyticsParameterScore) = @"score";
|
||||
|
||||
/// Current screen class, such as the class name of the UIViewController, logged with screen_view
|
||||
/// event and added to every event (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterScreenClass : "LoginViewController",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterScreenClass NS_SWIFT_NAME(AnalyticsParameterScreenClass) =
|
||||
@"screen_class";
|
||||
|
||||
/// Current screen name, such as the name of the UIViewController, logged with screen_view event and
|
||||
/// added to every event (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterScreenName : "LoginView",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterScreenName NS_SWIFT_NAME(AnalyticsParameterScreenName) =
|
||||
@"screen_name";
|
||||
|
||||
/// The search string/keywords used (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterSearchTerm : "periodic table",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterSearchTerm NS_SWIFT_NAME(AnalyticsParameterSearchTerm) =
|
||||
@"search_term";
|
||||
|
||||
/// Shipping cost associated with a transaction (Double).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterShipping : 5.99,
|
||||
/// AnalyticsParameterCurrency : "USD", // e.g. $5.99 USD
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterShipping NS_SWIFT_NAME(AnalyticsParameterShipping) =
|
||||
@"shipping";
|
||||
|
||||
/// The shipping tier (e.g. Ground, Air, Next-day) selected for delivery of the purchased item
|
||||
/// (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterShippingTier : "Ground",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterShippingTier NS_SWIFT_NAME(AnalyticsParameterShippingTier) =
|
||||
@"shipping_tier";
|
||||
|
||||
/// The origin of your traffic, such as an Ad network (for example, google) or partner (urban
|
||||
/// airship). Identify the advertiser, site, publication, etc. that is sending traffic to your
|
||||
/// property. Highly recommended (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterSource : "InMobi",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterSource NS_SWIFT_NAME(AnalyticsParameterSource) = @"source";
|
||||
|
||||
/// Source Platform (String). Used to identify the platform responsible for directing traffic to a
|
||||
/// given Analytics property (e.g., a buying platform where budgets, targeting criteria, etc. are
|
||||
/// set, a platform for managing organic traffic data, etc.).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterSourcePlatform : "sa360",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterSourcePlatform NS_SWIFT_NAME(AnalyticsParameterSourcePlatform) =
|
||||
@"source_platform";
|
||||
|
||||
/// The departure date, check-in date or rental start date for the item. This should be in
|
||||
/// YYYY-MM-DD format (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterStartDate : "2015-09-14",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterStartDate NS_SWIFT_NAME(AnalyticsParameterStartDate) =
|
||||
@"start_date";
|
||||
|
||||
/// The result of an operation. Specify 1 to indicate success and 0 to indicate failure (Int).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterSuccess : 1,
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterSuccess NS_SWIFT_NAME(AnalyticsParameterSuccess) = @"success";
|
||||
|
||||
/// Tax cost associated with a transaction (Double).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterTax : 2.43,
|
||||
/// AnalyticsParameterCurrency : "USD", // e.g. $2.43 USD
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterTax NS_SWIFT_NAME(AnalyticsParameterTax) = @"tax";
|
||||
|
||||
/// If you're manually tagging keyword campaigns, you should use utm_term to specify the keyword
|
||||
/// (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterTerm : "game",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterTerm NS_SWIFT_NAME(AnalyticsParameterTerm) = @"term";
|
||||
|
||||
/// The unique identifier of a transaction (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterTransactionID : "T12345",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterTransactionID NS_SWIFT_NAME(AnalyticsParameterTransactionID) =
|
||||
@"transaction_id";
|
||||
|
||||
/// Travel class (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterTravelClass : "business",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterTravelClass NS_SWIFT_NAME(AnalyticsParameterTravelClass) =
|
||||
@"travel_class";
|
||||
|
||||
/// A context-specific numeric value which is accumulated automatically for each event type. This is
|
||||
/// a general purpose parameter that is useful for accumulating a key metric that pertains to an
|
||||
/// event. Examples include revenue, distance, time and points. Value should be specified as Int or
|
||||
/// Double.
|
||||
/// Notes: Values for pre-defined currency-related events (such as @c AnalyticsEventAddToCart)
|
||||
/// should be supplied using Double and must be accompanied by a @c AnalyticsParameterCurrency
|
||||
/// parameter. The valid range of accumulated values is
|
||||
/// [-9,223,372,036,854.77, 9,223,372,036,854.77]. Supplying a non-numeric value, omitting the
|
||||
/// corresponding @c AnalyticsParameterCurrency parameter, or supplying an invalid
|
||||
/// <a href="https://goo.gl/qqX3J2">currency code</a> for conversion events will cause that
|
||||
/// conversion to be omitted from reporting.
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterValue : 3.99,
|
||||
/// AnalyticsParameterCurrency : "USD", // e.g. $3.99 USD
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterValue NS_SWIFT_NAME(AnalyticsParameterValue) = @"value";
|
||||
|
||||
/// Name of virtual currency type (String).
|
||||
/// <pre>
|
||||
/// let params = [
|
||||
/// AnalyticsParameterVirtualCurrencyName : "virtual_currency_name",
|
||||
/// // ...
|
||||
/// ]
|
||||
/// </pre>
|
||||
static NSString *const kFIRParameterVirtualCurrencyName
|
||||
NS_SWIFT_NAME(AnalyticsParameterVirtualCurrencyName) = @"virtual_currency_name";
|
||||
@@ -0,0 +1,28 @@
|
||||
/// @file FIRUserPropertyNames.h
|
||||
///
|
||||
/// Predefined user property names.
|
||||
///
|
||||
/// A UserProperty is an attribute that describes the app-user. By supplying UserProperties, you can
|
||||
/// later analyze different behaviors of various segments of your userbase. You may supply up to 25
|
||||
/// unique UserProperties per app, and you can use the name and value of your choosing for each one.
|
||||
/// UserProperty names can be up to 24 characters long, may only contain alphanumeric characters and
|
||||
/// underscores ("_"), and must start with an alphabetic character. UserProperty values can be up to
|
||||
/// 36 characters long. The "firebase_", "google_", and "ga_" prefixes are reserved and should not
|
||||
/// be used.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/// Indicates whether events logged by Google Analytics can be used to personalize ads for the user.
|
||||
/// Set to "YES" to enable, or "NO" to disable. Default is enabled. See the
|
||||
/// <a href="https://firebase.google.com/support/guides/disable-analytics">documentation</a> for
|
||||
/// more details and information about related settings.
|
||||
///
|
||||
/// <pre>
|
||||
/// Analytics.setUserProperty("NO", forName: AnalyticsUserPropertyAllowAdPersonalizationSignals)
|
||||
/// </pre>
|
||||
static NSString *const kFIRUserPropertyAllowAdPersonalizationSignals
|
||||
NS_SWIFT_NAME(AnalyticsUserPropertyAllowAdPersonalizationSignals) = @"allow_personalized_ads";
|
||||
|
||||
/// The method used to sign in. For example, "google", "facebook" or "twitter".
|
||||
static NSString *const kFIRUserPropertySignUpMethod
|
||||
NS_SWIFT_NAME(AnalyticsUserPropertySignUpMethod) = @"sign_up_method";
|
||||
@@ -0,0 +1,312 @@
|
||||
#if 0
|
||||
#elif defined(__arm64__) && __arm64__
|
||||
// Generated by Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
|
||||
#ifndef FIREBASEANALYTICS_SWIFT_H
|
||||
#define FIREBASEANALYTICS_SWIFT_H
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wgcc-compat"
|
||||
|
||||
#if !defined(__has_include)
|
||||
# define __has_include(x) 0
|
||||
#endif
|
||||
#if !defined(__has_attribute)
|
||||
# define __has_attribute(x) 0
|
||||
#endif
|
||||
#if !defined(__has_feature)
|
||||
# define __has_feature(x) 0
|
||||
#endif
|
||||
#if !defined(__has_warning)
|
||||
# define __has_warning(x) 0
|
||||
#endif
|
||||
|
||||
#if __has_include(<swift/objc-prologue.h>)
|
||||
# include <swift/objc-prologue.h>
|
||||
#endif
|
||||
|
||||
#pragma clang diagnostic ignored "-Wauto-import"
|
||||
#if defined(__OBJC__)
|
||||
#include <Foundation/Foundation.h>
|
||||
#endif
|
||||
#if defined(__cplusplus)
|
||||
#include <cstdint>
|
||||
#include <cstddef>
|
||||
#include <cstdbool>
|
||||
#include <cstring>
|
||||
#include <stdlib.h>
|
||||
#include <new>
|
||||
#include <type_traits>
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#endif
|
||||
#if defined(__cplusplus)
|
||||
#if defined(__arm64e__) && __has_include(<ptrauth.h>)
|
||||
# include <ptrauth.h>
|
||||
#else
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wreserved-macro-identifier"
|
||||
# ifndef __ptrauth_swift_value_witness_function_pointer
|
||||
# define __ptrauth_swift_value_witness_function_pointer(x)
|
||||
# endif
|
||||
# ifndef __ptrauth_swift_class_method_pointer
|
||||
# define __ptrauth_swift_class_method_pointer(x)
|
||||
# endif
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(SWIFT_TYPEDEFS)
|
||||
# define SWIFT_TYPEDEFS 1
|
||||
# if __has_include(<uchar.h>)
|
||||
# include <uchar.h>
|
||||
# elif !defined(__cplusplus)
|
||||
typedef uint_least16_t char16_t;
|
||||
typedef uint_least32_t char32_t;
|
||||
# endif
|
||||
typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
|
||||
#endif
|
||||
|
||||
#if !defined(SWIFT_PASTE)
|
||||
# define SWIFT_PASTE_HELPER(x, y) x##y
|
||||
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
|
||||
#endif
|
||||
#if !defined(SWIFT_METATYPE)
|
||||
# define SWIFT_METATYPE(X) Class
|
||||
#endif
|
||||
#if !defined(SWIFT_CLASS_PROPERTY)
|
||||
# if __has_feature(objc_class_property)
|
||||
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
|
||||
# else
|
||||
# define SWIFT_CLASS_PROPERTY(...)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_RUNTIME_NAME)
|
||||
# if __has_attribute(objc_runtime_name)
|
||||
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
|
||||
# else
|
||||
# define SWIFT_RUNTIME_NAME(X)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_COMPILE_NAME)
|
||||
# if __has_attribute(swift_name)
|
||||
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
|
||||
# else
|
||||
# define SWIFT_COMPILE_NAME(X)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_METHOD_FAMILY)
|
||||
# if __has_attribute(objc_method_family)
|
||||
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
|
||||
# else
|
||||
# define SWIFT_METHOD_FAMILY(X)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_NOESCAPE)
|
||||
# if __has_attribute(noescape)
|
||||
# define SWIFT_NOESCAPE __attribute__((noescape))
|
||||
# else
|
||||
# define SWIFT_NOESCAPE
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_RELEASES_ARGUMENT)
|
||||
# if __has_attribute(ns_consumed)
|
||||
# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed))
|
||||
# else
|
||||
# define SWIFT_RELEASES_ARGUMENT
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_WARN_UNUSED_RESULT)
|
||||
# if __has_attribute(warn_unused_result)
|
||||
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
|
||||
# else
|
||||
# define SWIFT_WARN_UNUSED_RESULT
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_NORETURN)
|
||||
# if __has_attribute(noreturn)
|
||||
# define SWIFT_NORETURN __attribute__((noreturn))
|
||||
# else
|
||||
# define SWIFT_NORETURN
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_CLASS_EXTRA)
|
||||
# define SWIFT_CLASS_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_PROTOCOL_EXTRA)
|
||||
# define SWIFT_PROTOCOL_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_ENUM_EXTRA)
|
||||
# define SWIFT_ENUM_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_CLASS)
|
||||
# if __has_attribute(objc_subclassing_restricted)
|
||||
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
|
||||
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
|
||||
# else
|
||||
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
|
||||
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_RESILIENT_CLASS)
|
||||
# if __has_attribute(objc_class_stub)
|
||||
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
|
||||
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
|
||||
# else
|
||||
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
|
||||
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_PROTOCOL)
|
||||
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
|
||||
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_EXTENSION)
|
||||
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
|
||||
#endif
|
||||
#if !defined(OBJC_DESIGNATED_INITIALIZER)
|
||||
# if __has_attribute(objc_designated_initializer)
|
||||
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
|
||||
# else
|
||||
# define OBJC_DESIGNATED_INITIALIZER
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_ENUM_ATTR)
|
||||
# if __has_attribute(enum_extensibility)
|
||||
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
|
||||
# else
|
||||
# define SWIFT_ENUM_ATTR(_extensibility)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_ENUM)
|
||||
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
|
||||
# if __has_feature(generalized_swift_name)
|
||||
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
|
||||
# else
|
||||
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_UNAVAILABLE)
|
||||
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
|
||||
#endif
|
||||
#if !defined(SWIFT_UNAVAILABLE_MSG)
|
||||
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
|
||||
#endif
|
||||
#if !defined(SWIFT_AVAILABILITY)
|
||||
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
|
||||
#endif
|
||||
#if !defined(SWIFT_WEAK_IMPORT)
|
||||
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
|
||||
#endif
|
||||
#if !defined(SWIFT_DEPRECATED)
|
||||
# define SWIFT_DEPRECATED __attribute__((deprecated))
|
||||
#endif
|
||||
#if !defined(SWIFT_DEPRECATED_MSG)
|
||||
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
|
||||
#endif
|
||||
#if !defined(SWIFT_DEPRECATED_OBJC)
|
||||
# if __has_feature(attribute_diagnose_if_objc)
|
||||
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
|
||||
# else
|
||||
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
|
||||
# endif
|
||||
#endif
|
||||
#if defined(__OBJC__)
|
||||
#if !defined(IBSegueAction)
|
||||
# define IBSegueAction
|
||||
#endif
|
||||
#endif
|
||||
#if !defined(SWIFT_EXTERN)
|
||||
# if defined(__cplusplus)
|
||||
# define SWIFT_EXTERN extern "C"
|
||||
# else
|
||||
# define SWIFT_EXTERN extern
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_CALL)
|
||||
# define SWIFT_CALL __attribute__((swiftcall))
|
||||
#endif
|
||||
#if !defined(SWIFT_INDIRECT_RESULT)
|
||||
# define SWIFT_INDIRECT_RESULT __attribute__((swift_indirect_result))
|
||||
#endif
|
||||
#if !defined(SWIFT_CONTEXT)
|
||||
# define SWIFT_CONTEXT __attribute__((swift_context))
|
||||
#endif
|
||||
#if !defined(SWIFT_ERROR_RESULT)
|
||||
# define SWIFT_ERROR_RESULT __attribute__((swift_error_result))
|
||||
#endif
|
||||
#if defined(__cplusplus)
|
||||
# define SWIFT_NOEXCEPT noexcept
|
||||
#else
|
||||
# define SWIFT_NOEXCEPT
|
||||
#endif
|
||||
#if !defined(SWIFT_C_INLINE_THUNK)
|
||||
# if __has_attribute(always_inline)
|
||||
# if __has_attribute(nodebug)
|
||||
# define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline)) __attribute__((nodebug))
|
||||
# else
|
||||
# define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline))
|
||||
# endif
|
||||
# else
|
||||
# define SWIFT_C_INLINE_THUNK inline
|
||||
# endif
|
||||
#endif
|
||||
#if defined(_WIN32)
|
||||
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
|
||||
# define SWIFT_IMPORT_STDLIB_SYMBOL __declspec(dllimport)
|
||||
#endif
|
||||
#else
|
||||
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
|
||||
# define SWIFT_IMPORT_STDLIB_SYMBOL
|
||||
#endif
|
||||
#endif
|
||||
#if defined(__OBJC__)
|
||||
#if __has_feature(objc_modules)
|
||||
#if __has_warning("-Watimport-in-framework-header")
|
||||
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
|
||||
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
|
||||
#if __has_warning("-Wpragma-clang-attribute")
|
||||
# pragma clang diagnostic ignored "-Wpragma-clang-attribute"
|
||||
#endif
|
||||
#pragma clang diagnostic ignored "-Wunknown-pragmas"
|
||||
#pragma clang diagnostic ignored "-Wnullability"
|
||||
#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"
|
||||
|
||||
#if __has_attribute(external_source_symbol)
|
||||
# pragma push_macro("any")
|
||||
# undef any
|
||||
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="FirebaseAnalytics",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
|
||||
# pragma pop_macro("any")
|
||||
#endif
|
||||
|
||||
#if defined(__OBJC__)
|
||||
|
||||
#endif
|
||||
#if __has_attribute(external_source_symbol)
|
||||
# pragma clang attribute pop
|
||||
#endif
|
||||
#if defined(__cplusplus)
|
||||
#endif
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#else
|
||||
#error unsupported Swift architecture
|
||||
#endif
|
||||
@@ -0,0 +1,24 @@
|
||||
#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 "FIRAnalytics+AppDelegate.h"
|
||||
#import "FIRAnalytics+Consent.h"
|
||||
#import "FIRAnalytics+OnDevice.h"
|
||||
#import "FIRAnalytics.h"
|
||||
#import "FirebaseAnalytics.h"
|
||||
#import "FIREventNames.h"
|
||||
#import "FIRParameterNames.h"
|
||||
#import "FIRUserPropertyNames.h"
|
||||
|
||||
FOUNDATION_EXPORT double FirebaseAnalyticsVersionNumber;
|
||||
FOUNDATION_EXPORT const unsigned char FirebaseAnalyticsVersionString[];
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
#import "FIRAnalytics+AppDelegate.h"
|
||||
#import "FIRAnalytics+Consent.h"
|
||||
#import "FIRAnalytics+OnDevice.h"
|
||||
#import "FIRAnalytics.h"
|
||||
#import "FIREventNames.h"
|
||||
#import "FIRParameterNames.h"
|
||||
#import "FIRUserPropertyNames.h"
|
||||
@@ -0,0 +1,57 @@
|
||||
<?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>23F79</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>FirebaseAnalytics</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.cocoapods.FirebaseAnalytics</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>FirebaseAnalytics</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>10.28.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>iPhoneOS</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>DTCompiler</key>
|
||||
<string>com.apple.compilers.llvm.clang.1_0</string>
|
||||
<key>DTPlatformBuild</key>
|
||||
<string>21C52</string>
|
||||
<key>DTPlatformName</key>
|
||||
<string>iphoneos</string>
|
||||
<key>DTPlatformVersion</key>
|
||||
<string>17.2</string>
|
||||
<key>DTSDKBuild</key>
|
||||
<string>21C52</string>
|
||||
<key>DTSDKName</key>
|
||||
<string>iphoneos17.2</string>
|
||||
<key>DTXcode</key>
|
||||
<string>1520</string>
|
||||
<key>DTXcodeBuild</key>
|
||||
<string>15C500b</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>100.0</string>
|
||||
<key>UIDeviceFamily</key>
|
||||
<array>
|
||||
<integer>1</integer>
|
||||
<integer>2</integer>
|
||||
</array>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
@@ -0,0 +1,239 @@
|
||||
{
|
||||
"ABIRoot": {
|
||||
"kind": "Root",
|
||||
"name": "TopLevel",
|
||||
"printedName": "TopLevel",
|
||||
"children": [
|
||||
{
|
||||
"kind": "Import",
|
||||
"name": "StoreKit",
|
||||
"printedName": "StoreKit",
|
||||
"declKind": "Import",
|
||||
"moduleName": "FirebaseAnalytics"
|
||||
},
|
||||
{
|
||||
"kind": "Import",
|
||||
"name": "SwiftUI",
|
||||
"printedName": "SwiftUI",
|
||||
"declKind": "Import",
|
||||
"moduleName": "FirebaseAnalytics"
|
||||
},
|
||||
{
|
||||
"kind": "TypeDecl",
|
||||
"name": "Analytics",
|
||||
"printedName": "Analytics",
|
||||
"children": [
|
||||
{
|
||||
"kind": "Function",
|
||||
"name": "logTransaction",
|
||||
"printedName": "logTransaction(_:)",
|
||||
"children": [
|
||||
{
|
||||
"kind": "TypeNominal",
|
||||
"name": "Void",
|
||||
"printedName": "()"
|
||||
},
|
||||
{
|
||||
"kind": "TypeNominal",
|
||||
"name": "Transaction",
|
||||
"printedName": "StoreKit.Transaction",
|
||||
"usr": "s:8StoreKit11TransactionV"
|
||||
}
|
||||
],
|
||||
"declKind": "Func",
|
||||
"usr": "s:So12FIRAnalyticsC17FirebaseAnalyticsE14logTransactionyy8StoreKit0E0VFZ",
|
||||
"mangledName": "$sSo12FIRAnalyticsC17FirebaseAnalyticsE14logTransactionyy8StoreKit0E0VFZ",
|
||||
"moduleName": "FirebaseAnalytics",
|
||||
"static": true,
|
||||
"declAttributes": [
|
||||
"Final",
|
||||
"AccessControl",
|
||||
"RawDocComment"
|
||||
],
|
||||
"isFromExtension": true,
|
||||
"funcSelfKind": "NonMutating"
|
||||
}
|
||||
],
|
||||
"declKind": "Class",
|
||||
"usr": "c:objc(cs)FIRAnalytics",
|
||||
"moduleName": "FirebaseAnalytics",
|
||||
"isOpen": true,
|
||||
"objc_name": "FIRAnalytics",
|
||||
"declAttributes": [
|
||||
"ObjC",
|
||||
"Dynamic"
|
||||
],
|
||||
"superclassUsr": "c:objc(cs)NSObject",
|
||||
"isExternal": true,
|
||||
"inheritsConvenienceInitializers": true,
|
||||
"superclassNames": [
|
||||
"ObjectiveC.NSObject"
|
||||
],
|
||||
"conformances": [
|
||||
{
|
||||
"kind": "Conformance",
|
||||
"name": "Equatable",
|
||||
"printedName": "Equatable",
|
||||
"usr": "s:SQ",
|
||||
"mangledName": "$sSQ"
|
||||
},
|
||||
{
|
||||
"kind": "Conformance",
|
||||
"name": "Hashable",
|
||||
"printedName": "Hashable",
|
||||
"usr": "s:SH",
|
||||
"mangledName": "$sSH"
|
||||
},
|
||||
{
|
||||
"kind": "Conformance",
|
||||
"name": "CVarArg",
|
||||
"printedName": "CVarArg",
|
||||
"usr": "s:s7CVarArgP",
|
||||
"mangledName": "$ss7CVarArgP"
|
||||
},
|
||||
{
|
||||
"kind": "Conformance",
|
||||
"name": "_KeyValueCodingAndObservingPublishing",
|
||||
"printedName": "_KeyValueCodingAndObservingPublishing",
|
||||
"usr": "s:10Foundation37_KeyValueCodingAndObservingPublishingP",
|
||||
"mangledName": "$s10Foundation37_KeyValueCodingAndObservingPublishingP"
|
||||
},
|
||||
{
|
||||
"kind": "Conformance",
|
||||
"name": "_KeyValueCodingAndObserving",
|
||||
"printedName": "_KeyValueCodingAndObserving",
|
||||
"usr": "s:10Foundation27_KeyValueCodingAndObservingP",
|
||||
"mangledName": "$s10Foundation27_KeyValueCodingAndObservingP"
|
||||
},
|
||||
{
|
||||
"kind": "Conformance",
|
||||
"name": "CustomStringConvertible",
|
||||
"printedName": "CustomStringConvertible",
|
||||
"usr": "s:s23CustomStringConvertibleP",
|
||||
"mangledName": "$ss23CustomStringConvertibleP"
|
||||
},
|
||||
{
|
||||
"kind": "Conformance",
|
||||
"name": "CustomDebugStringConvertible",
|
||||
"printedName": "CustomDebugStringConvertible",
|
||||
"usr": "s:s28CustomDebugStringConvertibleP",
|
||||
"mangledName": "$ss28CustomDebugStringConvertibleP"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "TypeDecl",
|
||||
"name": "View",
|
||||
"printedName": "View",
|
||||
"children": [
|
||||
{
|
||||
"kind": "Function",
|
||||
"name": "analyticsScreen",
|
||||
"printedName": "analyticsScreen(name:class:extraParameters:)",
|
||||
"children": [
|
||||
{
|
||||
"kind": "TypeNominal",
|
||||
"name": "ModifiedContent",
|
||||
"printedName": "SwiftUI.ModifiedContent<τ_0_0, FirebaseAnalytics.LoggedAnalyticsModifier>",
|
||||
"children": [
|
||||
{
|
||||
"kind": "TypeNominal",
|
||||
"name": "GenericTypeParam",
|
||||
"printedName": "τ_0_0"
|
||||
},
|
||||
{
|
||||
"kind": "TypeNominal",
|
||||
"name": "LoggedAnalyticsModifier",
|
||||
"printedName": "FirebaseAnalytics.LoggedAnalyticsModifier",
|
||||
"usr": "s:17FirebaseAnalytics06LoggedB8ModifierV"
|
||||
}
|
||||
],
|
||||
"usr": "s:7SwiftUI15ModifiedContentV"
|
||||
},
|
||||
{
|
||||
"kind": "TypeNominal",
|
||||
"name": "String",
|
||||
"printedName": "Swift.String",
|
||||
"usr": "s:SS"
|
||||
},
|
||||
{
|
||||
"kind": "TypeNominal",
|
||||
"name": "String",
|
||||
"printedName": "Swift.String",
|
||||
"hasDefaultArg": true,
|
||||
"usr": "s:SS"
|
||||
},
|
||||
{
|
||||
"kind": "TypeNominal",
|
||||
"name": "Dictionary",
|
||||
"printedName": "[Swift.String : Any]",
|
||||
"children": [
|
||||
{
|
||||
"kind": "TypeNominal",
|
||||
"name": "String",
|
||||
"printedName": "Swift.String",
|
||||
"usr": "s:SS"
|
||||
},
|
||||
{
|
||||
"kind": "TypeNominal",
|
||||
"name": "ProtocolComposition",
|
||||
"printedName": "Any"
|
||||
}
|
||||
],
|
||||
"hasDefaultArg": true,
|
||||
"usr": "s:SD"
|
||||
}
|
||||
],
|
||||
"declKind": "Func",
|
||||
"usr": "s:7SwiftUI4ViewP17FirebaseAnalyticsE15analyticsScreen4name5class15extraParametersQrSS_SSSDySSypGtF",
|
||||
"mangledName": "$s7SwiftUI4ViewP17FirebaseAnalyticsE15analyticsScreen4name5class15extraParametersQrSS_SSSDySSypGtF",
|
||||
"moduleName": "FirebaseAnalytics",
|
||||
"genericSig": "<τ_0_0 where τ_0_0 : SwiftUI.View>",
|
||||
"sugared_genericSig": "<Self where Self : SwiftUI.View>",
|
||||
"declAttributes": [
|
||||
"AccessControl",
|
||||
"RawDocComment"
|
||||
],
|
||||
"isFromExtension": true,
|
||||
"funcSelfKind": "NonMutating"
|
||||
}
|
||||
],
|
||||
"declKind": "Protocol",
|
||||
"usr": "s:7SwiftUI4ViewP",
|
||||
"mangledName": "$s7SwiftUI4ViewP",
|
||||
"moduleName": "SwiftUI",
|
||||
"genericSig": "<τ_0_0.Body : SwiftUI.View>",
|
||||
"sugared_genericSig": "<Self.Body : SwiftUI.View>",
|
||||
"intro_Macosx": "10.15",
|
||||
"intro_iOS": "13.0",
|
||||
"intro_tvOS": "13.0",
|
||||
"intro_watchOS": "6.0",
|
||||
"declAttributes": [
|
||||
"TypeEraser",
|
||||
"Available",
|
||||
"Available",
|
||||
"Available",
|
||||
"Available"
|
||||
],
|
||||
"isExternal": true
|
||||
}
|
||||
],
|
||||
"json_format_version": 8
|
||||
},
|
||||
"ConstValues": [
|
||||
{
|
||||
"filePath": "\/Volumes\/google\/src\/cloud\/pdchen\/firebaserelease\/google3\/googlemac\/iPhone\/Firebase\/Analytics\/Sources\/Swift\/Analytics+SwiftUI.swift",
|
||||
"kind": "StringLiteral",
|
||||
"offset": 2654,
|
||||
"length": 6,
|
||||
"value": "\"View\""
|
||||
},
|
||||
{
|
||||
"filePath": "\/Volumes\/google\/src\/cloud\/pdchen\/firebaserelease\/google3\/googlemac\/iPhone\/Firebase\/Analytics\/Sources\/Swift\/Analytics+SwiftUI.swift",
|
||||
"kind": "Dictionary",
|
||||
"offset": 2701,
|
||||
"length": 3,
|
||||
"value": "[]"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
// swift-interface-format-version: 1.0
|
||||
// swift-compiler-version: Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
|
||||
// swift-module-flags: -target arm64-apple-ios10.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name FirebaseAnalytics
|
||||
// swift-module-flags-ignorable: -enable-bare-slash-regex
|
||||
@_exported import FirebaseAnalytics
|
||||
import StoreKit
|
||||
import Swift
|
||||
import SwiftUI
|
||||
import _Concurrency
|
||||
import _StringProcessing
|
||||
import _SwiftConcurrencyShims
|
||||
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, *)
|
||||
@available(watchOS, unavailable)
|
||||
extension FirebaseAnalytics.Analytics {
|
||||
public static func logTransaction(_ transaction: StoreKit.Transaction)
|
||||
}
|
||||
@available(iOS 13.0, macOS 10.15, macCatalyst 13.0, tvOS 13.0, *)
|
||||
@available(watchOS, unavailable)
|
||||
extension SwiftUI.View {
|
||||
public func analyticsScreen(name: Swift.String, class: Swift.String = "View", extraParameters: [Swift.String : Any] = [:]) -> some SwiftUI.View
|
||||
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,22 @@
|
||||
// swift-interface-format-version: 1.0
|
||||
// swift-compiler-version: Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
|
||||
// swift-module-flags: -target arm64-apple-ios10.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name FirebaseAnalytics
|
||||
// swift-module-flags-ignorable: -enable-bare-slash-regex
|
||||
@_exported import FirebaseAnalytics
|
||||
import StoreKit
|
||||
import Swift
|
||||
import SwiftUI
|
||||
import _Concurrency
|
||||
import _StringProcessing
|
||||
import _SwiftConcurrencyShims
|
||||
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, *)
|
||||
@available(watchOS, unavailable)
|
||||
extension FirebaseAnalytics.Analytics {
|
||||
public static func logTransaction(_ transaction: StoreKit.Transaction)
|
||||
}
|
||||
@available(iOS 13.0, macOS 10.15, macCatalyst 13.0, tvOS 13.0, *)
|
||||
@available(watchOS, unavailable)
|
||||
extension SwiftUI.View {
|
||||
public func analyticsScreen(name: Swift.String, class: Swift.String = "View", extraParameters: [Swift.String : Any] = [:]) -> some SwiftUI.View
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
framework module FirebaseAnalytics {
|
||||
umbrella header "FirebaseAnalytics-umbrella.h"
|
||||
export *
|
||||
module * { export * }
|
||||
link framework "Foundation"
|
||||
link framework "Security"
|
||||
link framework "SystemConfiguration"
|
||||
link framework "UIKit"
|
||||
link "c++"
|
||||
link "sqlite3"
|
||||
link "z"
|
||||
}
|
||||
module FirebaseAnalytics.Swift {
|
||||
header "FirebaseAnalytics-Swift.h"
|
||||
requires objc
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8ad0f762a92cd4b2288a83c97b8ddb24
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 1
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,26 @@
|
||||
<?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>NSPrivacyTracking</key>
|
||||
<false/>
|
||||
<key>NSPrivacyTrackingDomains</key>
|
||||
<array>
|
||||
</array>
|
||||
<key>NSPrivacyCollectedDataTypes</key>
|
||||
<array>
|
||||
</array>
|
||||
<key>NSPrivacyAccessedAPITypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>NSPrivacyAccessedAPIType</key>
|
||||
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
|
||||
<key>NSPrivacyAccessedAPITypeReasons</key>
|
||||
<array>
|
||||
<string>CA92.1</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
/*
|
||||
* Copyright 2017 Google
|
||||
*
|
||||
* 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>
|
||||
|
||||
@class FIROptions;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/** A block that takes a BOOL and has no return value. */
|
||||
typedef void (^FIRAppVoidBoolCallback)(BOOL success)
|
||||
NS_SWIFT_UNAVAILABLE("Use Swift's closure syntax instead.");
|
||||
|
||||
/**
|
||||
* The entry point of Firebase SDKs.
|
||||
*
|
||||
* Initialize and configure `FirebaseApp` using `FirebaseApp.configure()`
|
||||
* or other customized ways as shown below.
|
||||
*
|
||||
* The logging system has two modes: default mode and debug mode. In default mode, only logs with
|
||||
* log level Notice, Warning and Error will be sent to device. In debug mode, all logs will be sent
|
||||
* to device. The log levels that Firebase uses are consistent with the ASL log levels.
|
||||
*
|
||||
* Enable debug mode by passing the `-FIRDebugEnabled` argument to the application. You can add this
|
||||
* argument in the application's Xcode scheme. When debug mode is enabled via `-FIRDebugEnabled`,
|
||||
* further executions of the application will also be in debug mode. In order to return to default
|
||||
* mode, you must explicitly disable the debug mode with the application argument
|
||||
* `-FIRDebugDisabled`.
|
||||
*
|
||||
* It is also possible to change the default logging level in code by calling
|
||||
* `FirebaseConfiguration.shared.setLoggerLevel(_:)` with the desired level.
|
||||
*/
|
||||
NS_SWIFT_NAME(FirebaseApp)
|
||||
@interface FIRApp : NSObject
|
||||
|
||||
/**
|
||||
* Configures a default Firebase app. Raises an exception if any configuration step fails. The
|
||||
* default app is named "__FIRAPP_DEFAULT". This method should be called after the app is launched
|
||||
* and before using Firebase services. This method should be called from the main thread and
|
||||
* contains synchronous file I/O (reading GoogleService-Info.plist from disk).
|
||||
*/
|
||||
+ (void)configure;
|
||||
|
||||
/**
|
||||
* Configures the default Firebase app with the provided options. The default app is named
|
||||
* "__FIRAPP_DEFAULT". Raises an exception if any configuration step fails. This method should be
|
||||
* called from the main thread.
|
||||
*
|
||||
* @param options The Firebase application options used to configure the service.
|
||||
*/
|
||||
+ (void)configureWithOptions:(FIROptions *)options NS_SWIFT_NAME(configure(options:));
|
||||
|
||||
/**
|
||||
* Configures a Firebase app with the given name and options. Raises an exception if any
|
||||
* configuration step fails. This method should be called from the main thread.
|
||||
*
|
||||
* @param name The application's name given by the developer. The name should should only contain
|
||||
Letters, Numbers and Underscore.
|
||||
* @param options The Firebase application options used to configure the services.
|
||||
*/
|
||||
// clang-format off
|
||||
+ (void)configureWithName:(NSString *)name
|
||||
options:(FIROptions *)options NS_SWIFT_NAME(configure(name:options:));
|
||||
// clang-format on
|
||||
|
||||
/**
|
||||
* Returns the default app, or `nil` if the default app does not exist.
|
||||
*/
|
||||
+ (nullable FIRApp *)defaultApp NS_SWIFT_NAME(app());
|
||||
|
||||
/**
|
||||
* Returns a previously created `FirebaseApp` instance with the given name, or `nil` if no such app
|
||||
* exists. This method is thread safe.
|
||||
*/
|
||||
+ (nullable FIRApp *)appNamed:(NSString *)name NS_SWIFT_NAME(app(name:));
|
||||
|
||||
/**
|
||||
* Returns the set of all extant `FirebaseApp` instances, or `nil` if there are no `FirebaseApp`
|
||||
* instances. This method is thread safe.
|
||||
*/
|
||||
@property(class, readonly, nullable) NSDictionary<NSString *, FIRApp *> *allApps;
|
||||
|
||||
/**
|
||||
* Cleans up the current `FirebaseApp`, freeing associated data and returning its name to the pool
|
||||
* for future use. This method is thread safe.
|
||||
*/
|
||||
- (void)deleteApp:(void (^)(BOOL success))completion;
|
||||
|
||||
/**
|
||||
* `FirebaseApp` instances should not be initialized directly. Call `FirebaseApp.configure()`,
|
||||
* `FirebaseApp.configure(options:)`, or `FirebaseApp.configure(name:options:)` directly.
|
||||
*/
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
|
||||
/**
|
||||
* Gets the name of this app.
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *name;
|
||||
|
||||
/**
|
||||
* Gets a copy of the options for this app. These are non-modifiable.
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) FIROptions *options;
|
||||
|
||||
/**
|
||||
* Gets or sets whether automatic data collection is enabled for all products. Defaults to `true`
|
||||
* unless `FirebaseDataCollectionDefaultEnabled` is set to `NO` in your app's Info.plist. This value
|
||||
* is persisted across runs of the app so that it can be set once when users have consented to
|
||||
* collection.
|
||||
*/
|
||||
@property(nonatomic, readwrite, getter=isDataCollectionDefaultEnabled)
|
||||
BOOL dataCollectionDefaultEnabled;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2017 Google
|
||||
*
|
||||
* 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>
|
||||
|
||||
#import "FIRLoggerLevel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This interface provides global level properties that the developer can tweak.
|
||||
*/
|
||||
NS_SWIFT_NAME(FirebaseConfiguration)
|
||||
@interface FIRConfiguration : NSObject
|
||||
|
||||
/** Returns the shared configuration object. */
|
||||
@property(class, nonatomic, readonly) FIRConfiguration *sharedInstance NS_SWIFT_NAME(shared);
|
||||
|
||||
/**
|
||||
* Sets the logging level for internal Firebase logging. Firebase will only log messages
|
||||
* that are logged at or below `loggerLevel`. The messages are logged both to the Xcode
|
||||
* console and to the device's log. Note that if an app is running from AppStore, it will
|
||||
* never log above `.notice` even if `loggerLevel` is set to a higher (more verbose)
|
||||
* setting.
|
||||
*
|
||||
* @param loggerLevel The maximum logging level. The default level is set to FIRLoggerLevelNotice.
|
||||
*/
|
||||
- (void)setLoggerLevel:(FIRLoggerLevel)loggerLevel;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2017 Google
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Note that importing GULLoggerLevel.h will lead to a non-modular header
|
||||
// import error.
|
||||
|
||||
/**
|
||||
* The log levels used by internal logging.
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, FIRLoggerLevel) {
|
||||
/** Error level, matches ASL_LEVEL_ERR. */
|
||||
FIRLoggerLevelError = 3,
|
||||
/** Warning level, matches ASL_LEVEL_WARNING. */
|
||||
FIRLoggerLevelWarning = 4,
|
||||
/** Notice level, matches ASL_LEVEL_NOTICE. */
|
||||
FIRLoggerLevelNotice = 5,
|
||||
/** Info level, matches ASL_LEVEL_INFO. */
|
||||
FIRLoggerLevelInfo = 6,
|
||||
/** Debug level, matches ASL_LEVEL_DEBUG. */
|
||||
FIRLoggerLevelDebug = 7,
|
||||
/** Minimum log level. */
|
||||
FIRLoggerLevelMin = FIRLoggerLevelError,
|
||||
/** Maximum log level. */
|
||||
FIRLoggerLevelMax = FIRLoggerLevelDebug
|
||||
} NS_SWIFT_NAME(FirebaseLoggerLevel);
|
||||
@@ -0,0 +1,131 @@
|
||||
/*
|
||||
* Copyright 2017 Google
|
||||
*
|
||||
* 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
|
||||
|
||||
/**
|
||||
* This class provides constant fields of Google APIs.
|
||||
*/
|
||||
NS_SWIFT_NAME(FirebaseOptions)
|
||||
@interface FIROptions : NSObject <NSCopying>
|
||||
|
||||
/**
|
||||
* Returns the default options. The first time this is called it synchronously reads
|
||||
* GoogleService-Info.plist from disk.
|
||||
*/
|
||||
+ (nullable FIROptions *)defaultOptions NS_SWIFT_NAME(defaultOptions());
|
||||
|
||||
/**
|
||||
* An API key used for authenticating requests from your Apple app, e.g.
|
||||
* The key must begin with "A" and contain exactly 39 alphanumeric characters, used to identify your
|
||||
* app to Google servers.
|
||||
*/
|
||||
@property(nonatomic, copy, nullable) NSString *APIKey NS_SWIFT_NAME(apiKey);
|
||||
|
||||
/**
|
||||
* The bundle ID for the application. Defaults to `Bundle.main.bundleIdentifier` when not set
|
||||
* manually or in a plist.
|
||||
*/
|
||||
@property(nonatomic, copy) NSString *bundleID;
|
||||
|
||||
/**
|
||||
* The OAuth2 client ID for Apple applications used to authenticate Google users, for example
|
||||
* @"12345.apps.googleusercontent.com", used for signing in with Google.
|
||||
*/
|
||||
@property(nonatomic, copy, nullable) NSString *clientID;
|
||||
|
||||
/**
|
||||
* Unused.
|
||||
*/
|
||||
@property(nonatomic, copy, nullable) NSString *trackingID DEPRECATED_ATTRIBUTE;
|
||||
|
||||
/**
|
||||
* The Project Number from the Google Developer's console, for example @"012345678901", used to
|
||||
* configure Firebase Cloud Messaging.
|
||||
*/
|
||||
@property(nonatomic, copy) NSString *GCMSenderID NS_SWIFT_NAME(gcmSenderID);
|
||||
|
||||
/**
|
||||
* The Project ID from the Firebase console, for example @"abc-xyz-123".
|
||||
*/
|
||||
@property(nonatomic, copy, nullable) NSString *projectID;
|
||||
|
||||
/**
|
||||
* Unused.
|
||||
*/
|
||||
@property(nonatomic, copy, nullable) NSString *androidClientID DEPRECATED_ATTRIBUTE;
|
||||
|
||||
/**
|
||||
* The Google App ID that is used to uniquely identify an instance of an app.
|
||||
*/
|
||||
@property(nonatomic, copy) NSString *googleAppID;
|
||||
|
||||
/**
|
||||
* The database root URL, e.g. @"http://abc-xyz-123.firebaseio.com".
|
||||
*/
|
||||
@property(nonatomic, copy, nullable) NSString *databaseURL;
|
||||
|
||||
/**
|
||||
* The URL scheme used to set up Durable Deep Link service.
|
||||
*/
|
||||
@property(nonatomic, copy, nullable) NSString *deepLinkURLScheme;
|
||||
|
||||
/**
|
||||
* The Google Cloud Storage bucket name, e.g. @"abc-xyz-123.storage.firebase.com".
|
||||
*/
|
||||
@property(nonatomic, copy, nullable) NSString *storageBucket;
|
||||
|
||||
/**
|
||||
* The App Group identifier to share data between the application and the application extensions.
|
||||
* The App Group must be configured in the application and on the Apple Developer Portal. Default
|
||||
* value `nil`.
|
||||
*/
|
||||
@property(nonatomic, copy, nullable) NSString *appGroupID;
|
||||
|
||||
/**
|
||||
* Initializes a customized instance of FirebaseOptions from the file at the given plist file path.
|
||||
* This will read the file synchronously from disk.
|
||||
* For example:
|
||||
* ```swift
|
||||
* if let path = Bundle.main.path(forResource:"GoogleServices-Info", ofType:"plist") {
|
||||
* let options = FirebaseOptions(contentsOfFile: path)
|
||||
* }
|
||||
* ```
|
||||
* Note that it is not possible to customize `FirebaseOptions` for Firebase Analytics which expects
|
||||
* a static file named `GoogleServices-Info.plist` -
|
||||
* https://github.com/firebase/firebase-ios-sdk/issues/230.
|
||||
* Returns `nil` if the plist file does not exist or is invalid.
|
||||
*/
|
||||
- (nullable instancetype)initWithContentsOfFile:(NSString *)plistPath NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
/**
|
||||
* Initializes a customized instance of `FirebaseOptions` with required fields. Use the mutable
|
||||
* properties to modify fields for configuring specific services. Note that it is not possible to
|
||||
* customize `FirebaseOptions` for Firebase Analytics which expects a static file named
|
||||
* `GoogleServices-Info.plist` - https://github.com/firebase/firebase-ios-sdk/issues/230.
|
||||
*/
|
||||
- (instancetype)initWithGoogleAppID:(NSString *)googleAppID
|
||||
GCMSenderID:(NSString *)GCMSenderID
|
||||
NS_SWIFT_NAME(init(googleAppID:gcmSenderID:))NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
/** Unavailable. Please use `init(contentsOfFile:)` or `init(googleAppID:gcmSenderID:)` instead. */
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* 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
|
||||
|
||||
/** Returns the current version of Firebase. */
|
||||
NS_SWIFT_NAME(FirebaseVersion())
|
||||
NSString* FIRFirebaseVersion(void);
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,22 @@
|
||||
#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 "FIRApp.h"
|
||||
#import "FIRConfiguration.h"
|
||||
#import "FirebaseCore.h"
|
||||
#import "FIRLoggerLevel.h"
|
||||
#import "FIROptions.h"
|
||||
#import "FIRVersion.h"
|
||||
|
||||
FOUNDATION_EXPORT double FirebaseCoreVersionNumber;
|
||||
FOUNDATION_EXPORT const unsigned char FirebaseCoreVersionString[];
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Copyright 2017 Google
|
||||
*
|
||||
* 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 "FIRApp.h"
|
||||
#import "FIRConfiguration.h"
|
||||
#import "FIRLoggerLevel.h"
|
||||
#import "FIROptions.h"
|
||||
#import "FIRVersion.h"
|
||||
@@ -0,0 +1,57 @@
|
||||
<?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>23F79</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>FirebaseCore</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.cocoapods.FirebaseCore</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>FirebaseCore</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>10.29.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>iPhoneOS</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>DTCompiler</key>
|
||||
<string>com.apple.compilers.llvm.clang.1_0</string>
|
||||
<key>DTPlatformBuild</key>
|
||||
<string>21C52</string>
|
||||
<key>DTPlatformName</key>
|
||||
<string>iphoneos</string>
|
||||
<key>DTPlatformVersion</key>
|
||||
<string>17.2</string>
|
||||
<key>DTSDKBuild</key>
|
||||
<string>21C52</string>
|
||||
<key>DTSDKName</key>
|
||||
<string>iphoneos17.2</string>
|
||||
<key>DTXcode</key>
|
||||
<string>1520</string>
|
||||
<key>DTXcodeBuild</key>
|
||||
<string>15C500b</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>100.0</string>
|
||||
<key>UIDeviceFamily</key>
|
||||
<array>
|
||||
<integer>1</integer>
|
||||
<integer>2</integer>
|
||||
</array>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,9 @@
|
||||
framework module FirebaseCore {
|
||||
umbrella header "FirebaseCore-umbrella.h"
|
||||
export *
|
||||
module * { export * }
|
||||
link framework "Foundation"
|
||||
link framework "Security"
|
||||
link framework "UIKit"
|
||||
link "z"
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8e17c03a8434c4512aaed80cf71bd16b
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 1
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,26 @@
|
||||
<?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>NSPrivacyTracking</key>
|
||||
<false/>
|
||||
<key>NSPrivacyTrackingDomains</key>
|
||||
<array>
|
||||
</array>
|
||||
<key>NSPrivacyCollectedDataTypes</key>
|
||||
<array>
|
||||
</array>
|
||||
<key>NSPrivacyAccessedAPITypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>NSPrivacyAccessedAPIType</key>
|
||||
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
|
||||
<key>NSPrivacyAccessedAPITypeReasons</key>
|
||||
<array>
|
||||
<string>1C8F.1</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -0,0 +1,365 @@
|
||||
#if 0
|
||||
#elif defined(__arm64__) && __arm64__
|
||||
// Generated by Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
|
||||
#ifndef FIREBASECOREINTERNAL_SWIFT_H
|
||||
#define FIREBASECOREINTERNAL_SWIFT_H
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wgcc-compat"
|
||||
|
||||
#if !defined(__has_include)
|
||||
# define __has_include(x) 0
|
||||
#endif
|
||||
#if !defined(__has_attribute)
|
||||
# define __has_attribute(x) 0
|
||||
#endif
|
||||
#if !defined(__has_feature)
|
||||
# define __has_feature(x) 0
|
||||
#endif
|
||||
#if !defined(__has_warning)
|
||||
# define __has_warning(x) 0
|
||||
#endif
|
||||
|
||||
#if __has_include(<swift/objc-prologue.h>)
|
||||
# include <swift/objc-prologue.h>
|
||||
#endif
|
||||
|
||||
#pragma clang diagnostic ignored "-Wauto-import"
|
||||
#if defined(__OBJC__)
|
||||
#include <Foundation/Foundation.h>
|
||||
#endif
|
||||
#if defined(__cplusplus)
|
||||
#include <cstdint>
|
||||
#include <cstddef>
|
||||
#include <cstdbool>
|
||||
#include <cstring>
|
||||
#include <stdlib.h>
|
||||
#include <new>
|
||||
#include <type_traits>
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#endif
|
||||
#if defined(__cplusplus)
|
||||
#if defined(__arm64e__) && __has_include(<ptrauth.h>)
|
||||
# include <ptrauth.h>
|
||||
#else
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wreserved-macro-identifier"
|
||||
# ifndef __ptrauth_swift_value_witness_function_pointer
|
||||
# define __ptrauth_swift_value_witness_function_pointer(x)
|
||||
# endif
|
||||
# ifndef __ptrauth_swift_class_method_pointer
|
||||
# define __ptrauth_swift_class_method_pointer(x)
|
||||
# endif
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(SWIFT_TYPEDEFS)
|
||||
# define SWIFT_TYPEDEFS 1
|
||||
# if __has_include(<uchar.h>)
|
||||
# include <uchar.h>
|
||||
# elif !defined(__cplusplus)
|
||||
typedef uint_least16_t char16_t;
|
||||
typedef uint_least32_t char32_t;
|
||||
# endif
|
||||
typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
|
||||
#endif
|
||||
|
||||
#if !defined(SWIFT_PASTE)
|
||||
# define SWIFT_PASTE_HELPER(x, y) x##y
|
||||
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
|
||||
#endif
|
||||
#if !defined(SWIFT_METATYPE)
|
||||
# define SWIFT_METATYPE(X) Class
|
||||
#endif
|
||||
#if !defined(SWIFT_CLASS_PROPERTY)
|
||||
# if __has_feature(objc_class_property)
|
||||
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
|
||||
# else
|
||||
# define SWIFT_CLASS_PROPERTY(...)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_RUNTIME_NAME)
|
||||
# if __has_attribute(objc_runtime_name)
|
||||
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
|
||||
# else
|
||||
# define SWIFT_RUNTIME_NAME(X)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_COMPILE_NAME)
|
||||
# if __has_attribute(swift_name)
|
||||
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
|
||||
# else
|
||||
# define SWIFT_COMPILE_NAME(X)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_METHOD_FAMILY)
|
||||
# if __has_attribute(objc_method_family)
|
||||
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
|
||||
# else
|
||||
# define SWIFT_METHOD_FAMILY(X)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_NOESCAPE)
|
||||
# if __has_attribute(noescape)
|
||||
# define SWIFT_NOESCAPE __attribute__((noescape))
|
||||
# else
|
||||
# define SWIFT_NOESCAPE
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_RELEASES_ARGUMENT)
|
||||
# if __has_attribute(ns_consumed)
|
||||
# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed))
|
||||
# else
|
||||
# define SWIFT_RELEASES_ARGUMENT
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_WARN_UNUSED_RESULT)
|
||||
# if __has_attribute(warn_unused_result)
|
||||
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
|
||||
# else
|
||||
# define SWIFT_WARN_UNUSED_RESULT
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_NORETURN)
|
||||
# if __has_attribute(noreturn)
|
||||
# define SWIFT_NORETURN __attribute__((noreturn))
|
||||
# else
|
||||
# define SWIFT_NORETURN
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_CLASS_EXTRA)
|
||||
# define SWIFT_CLASS_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_PROTOCOL_EXTRA)
|
||||
# define SWIFT_PROTOCOL_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_ENUM_EXTRA)
|
||||
# define SWIFT_ENUM_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_CLASS)
|
||||
# if __has_attribute(objc_subclassing_restricted)
|
||||
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
|
||||
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
|
||||
# else
|
||||
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
|
||||
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_RESILIENT_CLASS)
|
||||
# if __has_attribute(objc_class_stub)
|
||||
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
|
||||
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
|
||||
# else
|
||||
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
|
||||
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_PROTOCOL)
|
||||
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
|
||||
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_EXTENSION)
|
||||
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
|
||||
#endif
|
||||
#if !defined(OBJC_DESIGNATED_INITIALIZER)
|
||||
# if __has_attribute(objc_designated_initializer)
|
||||
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
|
||||
# else
|
||||
# define OBJC_DESIGNATED_INITIALIZER
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_ENUM_ATTR)
|
||||
# if __has_attribute(enum_extensibility)
|
||||
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
|
||||
# else
|
||||
# define SWIFT_ENUM_ATTR(_extensibility)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_ENUM)
|
||||
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
|
||||
# if __has_feature(generalized_swift_name)
|
||||
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
|
||||
# else
|
||||
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_UNAVAILABLE)
|
||||
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
|
||||
#endif
|
||||
#if !defined(SWIFT_UNAVAILABLE_MSG)
|
||||
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
|
||||
#endif
|
||||
#if !defined(SWIFT_AVAILABILITY)
|
||||
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
|
||||
#endif
|
||||
#if !defined(SWIFT_WEAK_IMPORT)
|
||||
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
|
||||
#endif
|
||||
#if !defined(SWIFT_DEPRECATED)
|
||||
# define SWIFT_DEPRECATED __attribute__((deprecated))
|
||||
#endif
|
||||
#if !defined(SWIFT_DEPRECATED_MSG)
|
||||
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
|
||||
#endif
|
||||
#if !defined(SWIFT_DEPRECATED_OBJC)
|
||||
# if __has_feature(attribute_diagnose_if_objc)
|
||||
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
|
||||
# else
|
||||
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
|
||||
# endif
|
||||
#endif
|
||||
#if defined(__OBJC__)
|
||||
#if !defined(IBSegueAction)
|
||||
# define IBSegueAction
|
||||
#endif
|
||||
#endif
|
||||
#if !defined(SWIFT_EXTERN)
|
||||
# if defined(__cplusplus)
|
||||
# define SWIFT_EXTERN extern "C"
|
||||
# else
|
||||
# define SWIFT_EXTERN extern
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_CALL)
|
||||
# define SWIFT_CALL __attribute__((swiftcall))
|
||||
#endif
|
||||
#if !defined(SWIFT_INDIRECT_RESULT)
|
||||
# define SWIFT_INDIRECT_RESULT __attribute__((swift_indirect_result))
|
||||
#endif
|
||||
#if !defined(SWIFT_CONTEXT)
|
||||
# define SWIFT_CONTEXT __attribute__((swift_context))
|
||||
#endif
|
||||
#if !defined(SWIFT_ERROR_RESULT)
|
||||
# define SWIFT_ERROR_RESULT __attribute__((swift_error_result))
|
||||
#endif
|
||||
#if defined(__cplusplus)
|
||||
# define SWIFT_NOEXCEPT noexcept
|
||||
#else
|
||||
# define SWIFT_NOEXCEPT
|
||||
#endif
|
||||
#if !defined(SWIFT_C_INLINE_THUNK)
|
||||
# if __has_attribute(always_inline)
|
||||
# if __has_attribute(nodebug)
|
||||
# define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline)) __attribute__((nodebug))
|
||||
# else
|
||||
# define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline))
|
||||
# endif
|
||||
# else
|
||||
# define SWIFT_C_INLINE_THUNK inline
|
||||
# endif
|
||||
#endif
|
||||
#if defined(_WIN32)
|
||||
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
|
||||
# define SWIFT_IMPORT_STDLIB_SYMBOL __declspec(dllimport)
|
||||
#endif
|
||||
#else
|
||||
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
|
||||
# define SWIFT_IMPORT_STDLIB_SYMBOL
|
||||
#endif
|
||||
#endif
|
||||
#if defined(__OBJC__)
|
||||
#if __has_feature(objc_modules)
|
||||
#if __has_warning("-Watimport-in-framework-header")
|
||||
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
|
||||
#endif
|
||||
@import ObjectiveC;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
|
||||
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
|
||||
#if __has_warning("-Wpragma-clang-attribute")
|
||||
# pragma clang diagnostic ignored "-Wpragma-clang-attribute"
|
||||
#endif
|
||||
#pragma clang diagnostic ignored "-Wunknown-pragmas"
|
||||
#pragma clang diagnostic ignored "-Wnullability"
|
||||
#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"
|
||||
|
||||
#if __has_attribute(external_source_symbol)
|
||||
# pragma push_macro("any")
|
||||
# undef any
|
||||
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="FirebaseCoreInternal",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
|
||||
# pragma pop_macro("any")
|
||||
#endif
|
||||
|
||||
#if defined(__OBJC__)
|
||||
|
||||
@class NSString;
|
||||
@class FIRHeartbeatsPayload;
|
||||
|
||||
/// An object that provides API to log and flush heartbeats from a synchronized storage container.
|
||||
SWIFT_CLASS_NAMED("_ObjC_HeartbeatController")
|
||||
@interface FIRHeartbeatController : NSObject
|
||||
/// Public initializer.
|
||||
/// \param id The <code>id</code> to associate this controller’s heartbeat storage with.
|
||||
///
|
||||
- (nonnull instancetype)initWithId:(NSString * _Nonnull)id OBJC_DESIGNATED_INITIALIZER;
|
||||
/// Asynchronously logs a new heartbeat, if needed.
|
||||
/// note:
|
||||
/// This API is thread-safe.
|
||||
/// \param agent The string agent (i.e. Firebase User Agent) to associate the logged
|
||||
/// heartbeat with.
|
||||
///
|
||||
- (void)log:(NSString * _Nonnull)agent;
|
||||
/// Synchronously flushes heartbeats from storage into a heartbeats payload.
|
||||
/// note:
|
||||
/// This API is thread-safe.
|
||||
///
|
||||
/// returns:
|
||||
/// A heartbeats payload for the flushed heartbeat(s).
|
||||
- (FIRHeartbeatsPayload * _Nonnull)flush SWIFT_WARN_UNUSED_RESULT;
|
||||
/// Synchronously flushes the heartbeat for today.
|
||||
/// If no heartbeat was logged today, the returned payload is empty.
|
||||
/// note:
|
||||
/// This API is thread-safe.
|
||||
///
|
||||
/// returns:
|
||||
/// A heartbeats payload for the flushed heartbeat.
|
||||
- (FIRHeartbeatsPayload * _Nonnull)flushHeartbeatFromToday SWIFT_WARN_UNUSED_RESULT;
|
||||
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
||||
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
||||
@end
|
||||
|
||||
|
||||
/// A model object representing a payload of heartbeat data intended for sending in network
|
||||
/// requests.
|
||||
SWIFT_CLASS_NAMED("_ObjC_HeartbeatsPayload")
|
||||
@interface FIRHeartbeatsPayload : NSObject
|
||||
/// Returns a processed payload string intended for use in a HTTP header.
|
||||
///
|
||||
/// returns:
|
||||
/// A string value from the heartbeats payload.
|
||||
- (NSString * _Nonnull)headerValue SWIFT_WARN_UNUSED_RESULT;
|
||||
/// A Boolean value indicating whether the payload is empty.
|
||||
@property (nonatomic, readonly) BOOL isEmpty;
|
||||
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
||||
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
||||
@end
|
||||
|
||||
#endif
|
||||
#if __has_attribute(external_source_symbol)
|
||||
# pragma clang attribute pop
|
||||
#endif
|
||||
#if defined(__cplusplus)
|
||||
#endif
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#else
|
||||
#error unsupported Swift architecture
|
||||
#endif
|
||||
@@ -0,0 +1,16 @@
|
||||
#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
|
||||
|
||||
|
||||
FOUNDATION_EXPORT double FirebaseCoreInternalVersionNumber;
|
||||
FOUNDATION_EXPORT const unsigned char FirebaseCoreInternalVersionString[];
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
<?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>23F79</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>FirebaseCoreInternal</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.cocoapods.FirebaseCoreInternal</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>FirebaseCoreInternal</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>10.29.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>iPhoneOS</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>DTCompiler</key>
|
||||
<string>com.apple.compilers.llvm.clang.1_0</string>
|
||||
<key>DTPlatformBuild</key>
|
||||
<string>21C52</string>
|
||||
<key>DTPlatformName</key>
|
||||
<string>iphoneos</string>
|
||||
<key>DTPlatformVersion</key>
|
||||
<string>17.2</string>
|
||||
<key>DTSDKBuild</key>
|
||||
<string>21C52</string>
|
||||
<key>DTSDKName</key>
|
||||
<string>iphoneos17.2</string>
|
||||
<key>DTXcode</key>
|
||||
<string>1520</string>
|
||||
<key>DTXcodeBuild</key>
|
||||
<string>15C500b</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>100.0</string>
|
||||
<key>UIDeviceFamily</key>
|
||||
<array>
|
||||
<integer>1</integer>
|
||||
<integer>2</integer>
|
||||
</array>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,59 @@
|
||||
// swift-interface-format-version: 1.0
|
||||
// swift-compiler-version: Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
|
||||
// swift-module-flags: -target arm64-apple-ios10.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name FirebaseCoreInternal
|
||||
// swift-module-flags-ignorable: -enable-bare-slash-regex
|
||||
@_exported import FirebaseCoreInternal
|
||||
import Foundation
|
||||
import Swift
|
||||
import _Concurrency
|
||||
import _StringProcessing
|
||||
import _SwiftConcurrencyShims
|
||||
@objc(FIRHeartbeatController) @objcMembers public class _ObjC_HeartbeatController : ObjectiveC.NSObject {
|
||||
@objc public init(id: Swift.String)
|
||||
@objc public func log(_ agent: Swift.String)
|
||||
@objc public func flush() -> FirebaseCoreInternal._ObjC_HeartbeatsPayload
|
||||
@objc public func flushHeartbeatFromToday() -> FirebaseCoreInternal._ObjC_HeartbeatsPayload
|
||||
@objc deinit
|
||||
}
|
||||
@objc(FIRHeartbeatsPayload) public class _ObjC_HeartbeatsPayload : ObjectiveC.NSObject, FirebaseCoreInternal.HTTPHeaderRepresentable {
|
||||
public init(_ heartbeatsPayload: FirebaseCoreInternal.HeartbeatsPayload)
|
||||
@objc public func headerValue() -> Swift.String
|
||||
@objc public var isEmpty: Swift.Bool {
|
||||
@objc get
|
||||
}
|
||||
@objc deinit
|
||||
}
|
||||
@_hasMissingDesignatedInitializers final public class HeartbeatController {
|
||||
convenience public init(id: Swift.String)
|
||||
final public func log(_ agent: Swift.String)
|
||||
@discardableResult
|
||||
final public func flush() -> FirebaseCoreInternal.HeartbeatsPayload
|
||||
@discardableResult
|
||||
final public func flushHeartbeatFromToday() -> FirebaseCoreInternal.HeartbeatsPayload
|
||||
@objc deinit
|
||||
}
|
||||
public protocol HTTPHeaderRepresentable {
|
||||
func headerValue() -> Swift.String
|
||||
}
|
||||
public struct HeartbeatsPayload : Swift.Codable {
|
||||
public var isEmpty: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public func encode(to encoder: any Swift.Encoder) throws
|
||||
public init(from decoder: any Swift.Decoder) throws
|
||||
}
|
||||
extension FirebaseCoreInternal.HeartbeatsPayload : FirebaseCoreInternal.HTTPHeaderRepresentable {
|
||||
public func headerValue() -> Swift.String
|
||||
}
|
||||
extension FirebaseCoreInternal.HeartbeatsPayload {
|
||||
public static let dateFormatter: Foundation.DateFormatter
|
||||
}
|
||||
extension FirebaseCoreInternal.HeartbeatsPayload : Swift.Equatable {
|
||||
public static func == (a: FirebaseCoreInternal.HeartbeatsPayload, b: FirebaseCoreInternal.HeartbeatsPayload) -> Swift.Bool
|
||||
}
|
||||
extension Foundation.Data {
|
||||
public func base64URLEncodedString(options: Foundation.Data.Base64EncodingOptions = []) -> Swift.String
|
||||
public init?(base64URLEncoded base64URLString: Swift.String, options: Foundation.Data.Base64DecodingOptions = [])
|
||||
public func zipped() throws -> Foundation.Data
|
||||
public func unzipped() throws -> Foundation.Data
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,59 @@
|
||||
// swift-interface-format-version: 1.0
|
||||
// swift-compiler-version: Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
|
||||
// swift-module-flags: -target arm64-apple-ios10.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name FirebaseCoreInternal
|
||||
// swift-module-flags-ignorable: -enable-bare-slash-regex
|
||||
@_exported import FirebaseCoreInternal
|
||||
import Foundation
|
||||
import Swift
|
||||
import _Concurrency
|
||||
import _StringProcessing
|
||||
import _SwiftConcurrencyShims
|
||||
@objc(FIRHeartbeatController) @objcMembers public class _ObjC_HeartbeatController : ObjectiveC.NSObject {
|
||||
@objc public init(id: Swift.String)
|
||||
@objc public func log(_ agent: Swift.String)
|
||||
@objc public func flush() -> FirebaseCoreInternal._ObjC_HeartbeatsPayload
|
||||
@objc public func flushHeartbeatFromToday() -> FirebaseCoreInternal._ObjC_HeartbeatsPayload
|
||||
@objc deinit
|
||||
}
|
||||
@objc(FIRHeartbeatsPayload) public class _ObjC_HeartbeatsPayload : ObjectiveC.NSObject, FirebaseCoreInternal.HTTPHeaderRepresentable {
|
||||
public init(_ heartbeatsPayload: FirebaseCoreInternal.HeartbeatsPayload)
|
||||
@objc public func headerValue() -> Swift.String
|
||||
@objc public var isEmpty: Swift.Bool {
|
||||
@objc get
|
||||
}
|
||||
@objc deinit
|
||||
}
|
||||
@_hasMissingDesignatedInitializers final public class HeartbeatController {
|
||||
convenience public init(id: Swift.String)
|
||||
final public func log(_ agent: Swift.String)
|
||||
@discardableResult
|
||||
final public func flush() -> FirebaseCoreInternal.HeartbeatsPayload
|
||||
@discardableResult
|
||||
final public func flushHeartbeatFromToday() -> FirebaseCoreInternal.HeartbeatsPayload
|
||||
@objc deinit
|
||||
}
|
||||
public protocol HTTPHeaderRepresentable {
|
||||
func headerValue() -> Swift.String
|
||||
}
|
||||
public struct HeartbeatsPayload : Swift.Codable {
|
||||
public var isEmpty: Swift.Bool {
|
||||
get
|
||||
}
|
||||
public func encode(to encoder: any Swift.Encoder) throws
|
||||
public init(from decoder: any Swift.Decoder) throws
|
||||
}
|
||||
extension FirebaseCoreInternal.HeartbeatsPayload : FirebaseCoreInternal.HTTPHeaderRepresentable {
|
||||
public func headerValue() -> Swift.String
|
||||
}
|
||||
extension FirebaseCoreInternal.HeartbeatsPayload {
|
||||
public static let dateFormatter: Foundation.DateFormatter
|
||||
}
|
||||
extension FirebaseCoreInternal.HeartbeatsPayload : Swift.Equatable {
|
||||
public static func == (a: FirebaseCoreInternal.HeartbeatsPayload, b: FirebaseCoreInternal.HeartbeatsPayload) -> Swift.Bool
|
||||
}
|
||||
extension Foundation.Data {
|
||||
public func base64URLEncodedString(options: Foundation.Data.Base64EncodingOptions = []) -> Swift.String
|
||||
public init?(base64URLEncoded base64URLString: Swift.String, options: Foundation.Data.Base64DecodingOptions = [])
|
||||
public func zipped() throws -> Foundation.Data
|
||||
public func unzipped() throws -> Foundation.Data
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
framework module FirebaseCoreInternal {
|
||||
umbrella header "FirebaseCoreInternal-umbrella.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
||||
|
||||
module FirebaseCoreInternal.Swift {
|
||||
header "FirebaseCoreInternal-Swift.h"
|
||||
requires objc
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6c17ff952bb734975b17dd73d216265c
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 1
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,30 @@
|
||||
<?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>NSPrivacyTracking</key>
|
||||
<false/>
|
||||
<key>NSPrivacyTrackingDomains</key>
|
||||
<array>
|
||||
</array>
|
||||
<key>NSPrivacyCollectedDataTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>NSPrivacyCollectedDataType</key>
|
||||
<string>NSPrivacyCollectedDataTypeOtherDiagnosticData</string>
|
||||
<key>NSPrivacyCollectedDataTypeLinked</key>
|
||||
<false/>
|
||||
<key>NSPrivacyCollectedDataTypeTracking</key>
|
||||
<false/>
|
||||
<key>NSPrivacyCollectedDataTypePurposes</key>
|
||||
<array>
|
||||
<string>NSPrivacyCollectedDataTypePurposeAnalytics</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>NSPrivacyAccessedAPITypes</key>
|
||||
<array>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
/*
|
||||
* Copyright 2019 Google
|
||||
*
|
||||
* 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>
|
||||
|
||||
@class FIRApp;
|
||||
@class FIRInstallationsAuthTokenResult;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/** A notification with this name is sent each time an installation is created or deleted. */
|
||||
// clang-format off
|
||||
// clang-format12 merges the next two lines.
|
||||
FOUNDATION_EXPORT const NSNotificationName FIRInstallationIDDidChangeNotification
|
||||
NS_SWIFT_NAME(InstallationIDDidChange);
|
||||
/** `userInfo` key for the `FirebaseApp.name` in `InstallationIDDidChangeNotification`. */
|
||||
FOUNDATION_EXPORT NSString *const kFIRInstallationIDDidChangeNotificationAppNameKey
|
||||
NS_SWIFT_NAME(InstallationIDDidChangeAppNameKey);
|
||||
// clang-format on
|
||||
|
||||
/**
|
||||
* An installation ID handler block.
|
||||
* @param identifier The installation ID string if exists or `nil` otherwise.
|
||||
* @param error The error when `identifier == nil` or `nil` otherwise.
|
||||
*/
|
||||
typedef void (^FIRInstallationsIDHandler)(NSString *__nullable identifier,
|
||||
NSError *__nullable error)
|
||||
NS_SWIFT_UNAVAILABLE("Use Swift's closure syntax instead.");
|
||||
|
||||
/**
|
||||
* An authorization token handler block.
|
||||
* @param tokenResult An instance of `InstallationsAuthTokenResult` in case of success or `nil`
|
||||
* otherwise.
|
||||
* @param error The error when `tokenResult == nil` or `nil` otherwise.
|
||||
*/
|
||||
typedef void (^FIRInstallationsTokenHandler)(
|
||||
FIRInstallationsAuthTokenResult *__nullable tokenResult, NSError *__nullable error)
|
||||
NS_SWIFT_UNAVAILABLE("Use Swift's closure syntax instead.");
|
||||
|
||||
/**
|
||||
* The class provides API for Firebase Installations.
|
||||
* Each configured `FirebaseApp` has a corresponding single instance of `Installations`.
|
||||
* An instance of the class provides access to the installation info for the `FirebaseApp` as well
|
||||
* as the ability to delete it. A Firebase Installation is unique by `FirebaseApp.name` and
|
||||
* `FirebaseApp.options.googleAppID` .
|
||||
*/
|
||||
NS_SWIFT_NAME(Installations)
|
||||
@interface FIRInstallations : NSObject
|
||||
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
|
||||
/**
|
||||
* Returns a default instance of `Installations`.
|
||||
* @return An instance of `Installations` for `FirebaseApp.defaultApp().
|
||||
* @throw Throws an exception if the default app is not configured yet or required `FirebaseApp`
|
||||
* options are missing.
|
||||
*/
|
||||
+ (FIRInstallations *)installations NS_SWIFT_NAME(installations());
|
||||
|
||||
/**
|
||||
* Returns an instance of `Installations` for an application.
|
||||
* @param application A configured `FirebaseApp` instance.
|
||||
* @return An instance of `Installations` corresponding to the passed application.
|
||||
* @throw Throws an exception if required `FirebaseApp` options are missing.
|
||||
*/
|
||||
+ (FIRInstallations *)installationsWithApp:(FIRApp *)application NS_SWIFT_NAME(installations(app:));
|
||||
|
||||
/**
|
||||
* The method creates or retrieves an installation ID. The installation ID is a stable identifier
|
||||
* that uniquely identifies the app instance. NOTE: If the application already has an existing
|
||||
* FirebaseInstanceID then the InstanceID identifier will be used.
|
||||
* @param completion A completion handler which is invoked when the operation completes.
|
||||
*/
|
||||
- (void)installationIDWithCompletion:(void (^)(NSString *__nullable identifier,
|
||||
NSError *__nullable error))completion;
|
||||
|
||||
/**
|
||||
* Retrieves (locally if it exists or from the server) a valid installation auth token. An existing
|
||||
* token may be invalidated or expired, so it is recommended to fetch the installation auth token
|
||||
* before each server request. The method does the same as
|
||||
* `Installations.authToken(forcingRefresh:completion:)` with forcing refresh `false`.
|
||||
* @param completion A completion handler which is invoked when the operation completes.
|
||||
*/
|
||||
- (void)authTokenWithCompletion:(void (^)(FIRInstallationsAuthTokenResult *__nullable tokenResult,
|
||||
NSError *__nullable error))completion;
|
||||
|
||||
/**
|
||||
* Retrieves (locally or from the server depending on `forceRefresh` value) a valid installation
|
||||
* auth token. An existing token may be invalidated or expire, so it is recommended to fetch the
|
||||
* installation auth token before each server request. This method should be used with `forceRefresh
|
||||
* == true` when e.g. a request with the previously fetched installation auth token failed with "Not
|
||||
* Authorized" error.
|
||||
* @param forceRefresh If `true` then the locally cached installation auth token will be ignored and
|
||||
* a new one will be requested from the server. If `false`, then the locally cached installation
|
||||
* auth token will be returned if exists and has not expired yet.
|
||||
* @param completion A completion handler which is invoked when the operation completes. See
|
||||
* `InstallationsTokenHandler` for additional details.
|
||||
*/
|
||||
- (void)authTokenForcingRefresh:(BOOL)forceRefresh
|
||||
completion:(void (^)(FIRInstallationsAuthTokenResult *__nullable tokenResult,
|
||||
NSError *__nullable error))completion;
|
||||
|
||||
/**
|
||||
* Deletes all the installation data including the unique identifier, auth tokens and
|
||||
* all related data on the server side. A network connection is required for the method to
|
||||
* succeed. If fails, the existing installation data remains untouched.
|
||||
* @param completion A completion handler which is invoked when the operation completes. `error ==
|
||||
* nil` indicates success.
|
||||
*/
|
||||
- (void)deleteWithCompletion:(void (^)(NSError *__nullable error))completion;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright 2019 Google
|
||||
*
|
||||
* 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
|
||||
|
||||
/** The class represents a result of the installation auth token request. */
|
||||
NS_SWIFT_NAME(InstallationsAuthTokenResult)
|
||||
@interface FIRInstallationsAuthTokenResult : NSObject
|
||||
|
||||
/** The installation auth token string. */
|
||||
@property(nonatomic, readonly) NSString *authToken;
|
||||
|
||||
/** The installation auth token expiration date. */
|
||||
@property(nonatomic, readonly) NSDate *expirationDate;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright 2019 Google
|
||||
*
|
||||
* 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>
|
||||
|
||||
extern NSString *const kFirebaseInstallationsErrorDomain NS_SWIFT_NAME(InstallationsErrorDomain);
|
||||
|
||||
typedef NS_ERROR_ENUM(kFirebaseInstallationsErrorDomain, FIRInstallationsErrorCode){
|
||||
/** Unknown error. See `userInfo` for details. */
|
||||
FIRInstallationsErrorCodeUnknown = 0,
|
||||
|
||||
/** Keychain error. See `userInfo` for details. */
|
||||
FIRInstallationsErrorCodeKeychain = 1,
|
||||
|
||||
/** Server unreachable. A network error or server is unavailable. See `userInfo` for details. */
|
||||
FIRInstallationsErrorCodeServerUnreachable = 2,
|
||||
|
||||
/** FirebaseApp configuration issues e.g. invalid GMP-App-ID, etc. See `userInfo` for details.
|
||||
*/
|
||||
FIRInstallationsErrorCodeInvalidConfiguration = 3,
|
||||
|
||||
} NS_SWIFT_NAME(InstallationsErrorCode);
|
||||
@@ -0,0 +1,20 @@
|
||||
#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 "FirebaseInstallations.h"
|
||||
#import "FIRInstallations.h"
|
||||
#import "FIRInstallationsAuthTokenResult.h"
|
||||
#import "FIRInstallationsErrors.h"
|
||||
|
||||
FOUNDATION_EXPORT double FirebaseInstallationsVersionNumber;
|
||||
FOUNDATION_EXPORT const unsigned char FirebaseInstallationsVersionString[];
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Copyright 2019 Google
|
||||
*
|
||||
* 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 "FIRInstallations.h"
|
||||
#import "FIRInstallationsAuthTokenResult.h"
|
||||
#import "FIRInstallationsErrors.h"
|
||||
@@ -0,0 +1,57 @@
|
||||
<?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>23F79</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>FirebaseInstallations</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.cocoapods.FirebaseInstallations</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>FirebaseInstallations</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>10.29.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>iPhoneOS</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>DTCompiler</key>
|
||||
<string>com.apple.compilers.llvm.clang.1_0</string>
|
||||
<key>DTPlatformBuild</key>
|
||||
<string>21C52</string>
|
||||
<key>DTPlatformName</key>
|
||||
<string>iphoneos</string>
|
||||
<key>DTPlatformVersion</key>
|
||||
<string>17.2</string>
|
||||
<key>DTSDKBuild</key>
|
||||
<string>21C52</string>
|
||||
<key>DTSDKName</key>
|
||||
<string>iphoneos17.2</string>
|
||||
<key>DTXcode</key>
|
||||
<string>1520</string>
|
||||
<key>DTXcodeBuild</key>
|
||||
<string>15C500b</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>100.0</string>
|
||||
<key>UIDeviceFamily</key>
|
||||
<array>
|
||||
<integer>1</integer>
|
||||
<integer>2</integer>
|
||||
</array>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,9 @@
|
||||
framework module FirebaseInstallations {
|
||||
umbrella header "FirebaseInstallations-umbrella.h"
|
||||
export *
|
||||
module * { export * }
|
||||
link framework "Foundation"
|
||||
link framework "Security"
|
||||
link framework "UIKit"
|
||||
link "z"
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 36517c7f192934bc796d18d7970f00d4
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 1
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,57 @@
|
||||
<?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>23F79</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>GoogleAppMeasurement</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.cocoapods.GoogleAppMeasurement</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>GoogleAppMeasurement</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>10.28.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>iPhoneOS</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>DTCompiler</key>
|
||||
<string>com.apple.compilers.llvm.clang.1_0</string>
|
||||
<key>DTPlatformBuild</key>
|
||||
<string>21C52</string>
|
||||
<key>DTPlatformName</key>
|
||||
<string>iphoneos</string>
|
||||
<key>DTPlatformVersion</key>
|
||||
<string>17.2</string>
|
||||
<key>DTSDKBuild</key>
|
||||
<string>21C52</string>
|
||||
<key>DTSDKName</key>
|
||||
<string>iphoneos17.2</string>
|
||||
<key>DTXcode</key>
|
||||
<string>1520</string>
|
||||
<key>DTXcodeBuild</key>
|
||||
<string>15C500b</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>100.0</string>
|
||||
<key>UIDeviceFamily</key>
|
||||
<array>
|
||||
<integer>1</integer>
|
||||
<integer>2</integer>
|
||||
</array>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,10 @@
|
||||
framework module GoogleAppMeasurement {
|
||||
umbrella header "GoogleAppMeasurement-umbrella.h"
|
||||
export *
|
||||
module * { export * }
|
||||
link framework "Security"
|
||||
link framework "SystemConfiguration"
|
||||
link "c++"
|
||||
link "sqlite3"
|
||||
link "z"
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1517531ffcaec418fb3551d08a5c96e3
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 1
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,57 @@
|
||||
<?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>23F79</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>GoogleAppMeasurementIdentitySupport</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.cocoapods.GoogleAppMeasurementIdentitySupport</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>GoogleAppMeasurementIdentitySupport</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>10.28.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>iPhoneOS</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>DTCompiler</key>
|
||||
<string>com.apple.compilers.llvm.clang.1_0</string>
|
||||
<key>DTPlatformBuild</key>
|
||||
<string>21C52</string>
|
||||
<key>DTPlatformName</key>
|
||||
<string>iphoneos</string>
|
||||
<key>DTPlatformVersion</key>
|
||||
<string>17.2</string>
|
||||
<key>DTSDKBuild</key>
|
||||
<string>21C52</string>
|
||||
<key>DTSDKName</key>
|
||||
<string>iphoneos17.2</string>
|
||||
<key>DTXcode</key>
|
||||
<string>1520</string>
|
||||
<key>DTXcodeBuild</key>
|
||||
<string>15C500b</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>100.0</string>
|
||||
<key>UIDeviceFamily</key>
|
||||
<array>
|
||||
<integer>1</integer>
|
||||
<integer>2</integer>
|
||||
</array>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,5 @@
|
||||
framework module GoogleAppMeasurementIdentitySupport {
|
||||
umbrella header "GoogleAppMeasurementIdentitySupport-umbrella.h"
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b8bf23b2ddf674ce3b495083b4f440b5
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 1
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,35 @@
|
||||
<?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>NSPrivacyTracking</key>
|
||||
<false/>
|
||||
<key>NSPrivacyTrackingDomains</key>
|
||||
<array>
|
||||
</array>
|
||||
<key>NSPrivacyCollectedDataTypes</key>
|
||||
<array>
|
||||
</array>
|
||||
<key>NSPrivacyAccessedAPITypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>NSPrivacyAccessedAPIType</key>
|
||||
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
|
||||
<key>NSPrivacyAccessedAPITypeReasons</key>
|
||||
<array>
|
||||
<string>C617.1</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>NSPrivacyAccessedAPIType</key>
|
||||
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
|
||||
<key>NSPrivacyAccessedAPITypeReasons</key>
|
||||
<array>
|
||||
<string>1C8F.1</string>
|
||||
<string>C56D.1</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
/*
|
||||
* Copyright 2018 Google LLC
|
||||
*
|
||||
* 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>
|
||||
|
||||
#import "GULApplication.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef NSString *const GULAppDelegateInterceptorID;
|
||||
|
||||
/** This class contains methods that isa swizzle the app delegate. */
|
||||
@interface GULAppDelegateSwizzler : NSProxy
|
||||
|
||||
/** Registers an app delegate interceptor whose methods will be invoked as they're invoked on the
|
||||
* original app delegate.
|
||||
*
|
||||
* @param interceptor An instance of a class that conforms to the application delegate protocol.
|
||||
* The interceptor is NOT retained.
|
||||
* @return A unique GULAppDelegateInterceptorID if interceptor was successfully registered; nil
|
||||
* if it fails.
|
||||
*/
|
||||
+ (nullable GULAppDelegateInterceptorID)registerAppDelegateInterceptor:
|
||||
(id<GULApplicationDelegate>)interceptor;
|
||||
|
||||
/** Unregisters an interceptor with the given ID if it exists.
|
||||
*
|
||||
* @param interceptorID The object that was generated when the interceptor was registered.
|
||||
*/
|
||||
+ (void)unregisterAppDelegateInterceptorWithID:(GULAppDelegateInterceptorID)interceptorID;
|
||||
|
||||
/** This method ensures that the original app delegate has been proxied. Call this before
|
||||
* registering your interceptor. This method is safe to call multiple times (but it only proxies
|
||||
* the app delegate once).
|
||||
*
|
||||
* This method doesn't proxy APNS related methods:
|
||||
* @code
|
||||
* - application:didRegisterForRemoteNotificationsWithDeviceToken:
|
||||
* - application:didFailToRegisterForRemoteNotificationsWithError:
|
||||
* - application:didReceiveRemoteNotification:fetchCompletionHandler:
|
||||
* - application:didReceiveRemoteNotification:
|
||||
* @endcode
|
||||
*
|
||||
* To proxy these methods use +[GULAppDelegateSwizzler
|
||||
* proxyOriginalDelegateIncludingAPNSMethods]. The methods have to be proxied separately to
|
||||
* avoid potential warnings from Apple review about missing Push Notification Entitlement (e.g.
|
||||
* https://github.com/firebase/firebase-ios-sdk/issues/2807)
|
||||
*
|
||||
* The method has no effect for extensions.
|
||||
*
|
||||
* @see proxyOriginalDelegateIncludingAPNSMethods
|
||||
*/
|
||||
+ (void)proxyOriginalDelegate;
|
||||
|
||||
/** This method ensures that the original app delegate has been proxied including APNS related
|
||||
* methods. Call this before registering your interceptor. This method is safe to call multiple
|
||||
* times (but it only proxies the app delegate once) or
|
||||
* after +[GULAppDelegateSwizzler proxyOriginalDelegate]
|
||||
*
|
||||
* This method calls +[GULAppDelegateSwizzler proxyOriginalDelegate] under the hood.
|
||||
* After calling this method the following App Delegate methods will be proxied in addition to
|
||||
* the methods proxied by proxyOriginalDelegate:
|
||||
* @code
|
||||
* - application:didRegisterForRemoteNotificationsWithDeviceToken:
|
||||
* - application:didFailToRegisterForRemoteNotificationsWithError:
|
||||
* - application:didReceiveRemoteNotification:fetchCompletionHandler:
|
||||
* - application:didReceiveRemoteNotification:
|
||||
* @endcode
|
||||
*
|
||||
* The method has no effect for extensions.
|
||||
*
|
||||
* @see proxyOriginalDelegate
|
||||
*/
|
||||
+ (void)proxyOriginalDelegateIncludingAPNSMethods;
|
||||
|
||||
/** Indicates whether app delegate proxy is explicitly disabled or enabled. Enabled by default.
|
||||
*
|
||||
* @return YES if AppDelegateProxy is Enabled, NO otherwise.
|
||||
*/
|
||||
+ (BOOL)isAppDelegateProxyEnabled;
|
||||
|
||||
/** Returns the current sharedApplication.
|
||||
*
|
||||
* @return the current application instance if in an app, or nil if in extension or if it doesn't
|
||||
* exist.
|
||||
*/
|
||||
+ (nullable GULApplication *)sharedApplication;
|
||||
|
||||
/** Do not initialize this class. */
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* Copyright 2017 Google
|
||||
*
|
||||
* 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
|
||||
|
||||
@interface GULAppEnvironmentUtil : NSObject
|
||||
|
||||
/// Indicates whether the app is from Apple Store or not. Returns NO if the app is on simulator,
|
||||
/// development environment or sideloaded.
|
||||
+ (BOOL)isFromAppStore;
|
||||
|
||||
/// Indicates whether the app is a Testflight app. Returns YES if the app has sandbox receipt.
|
||||
/// Returns NO otherwise.
|
||||
+ (BOOL)isAppStoreReceiptSandbox;
|
||||
|
||||
/// Indicates whether the app is on simulator or not at runtime depending on the device
|
||||
/// architecture.
|
||||
+ (BOOL)isSimulator;
|
||||
|
||||
/// The current device model. Returns an empty string if device model cannot be retrieved.
|
||||
+ (nullable NSString *)deviceModel;
|
||||
|
||||
/// The current device model, with simulator-specific values. Returns an empty string if device
|
||||
/// model cannot be retrieved.
|
||||
+ (nullable NSString *)deviceSimulatorModel;
|
||||
|
||||
/// The current operating system version. Returns an empty string if the system version cannot be
|
||||
/// retrieved.
|
||||
+ (NSString *)systemVersion;
|
||||
|
||||
/// Indicates whether it is running inside an extension or an app.
|
||||
+ (BOOL)isAppExtension;
|
||||
|
||||
/// @return Returns @YES when is run on iOS version greater or equal to 7.0
|
||||
+ (BOOL)isIOS7OrHigher DEPRECATED_MSG_ATTRIBUTE(
|
||||
"Always `YES` because only iOS 8 and higher supported. The method will be removed.");
|
||||
|
||||
/// @return YES if Swift runtime detected in the app.
|
||||
+ (BOOL)hasSwiftRuntime __deprecated;
|
||||
|
||||
/// @return An Apple platform. Possible values "ios", "tvos", "macos", "watchos", "maccatalyst", and
|
||||
/// "visionos".
|
||||
+ (NSString *)applePlatform;
|
||||
|
||||
/// @return An Apple Device platform. Same possible values as `applePlatform`, with the addition of
|
||||
/// "ipados".
|
||||
+ (NSString *)appleDevicePlatform;
|
||||
|
||||
/// @return The way the library was added to the app, e.g. "swiftpm", "cocoapods", etc.
|
||||
+ (NSString *)deploymentType;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* 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>
|
||||
|
||||
#if TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#define GULApplication UIApplication
|
||||
#define GULApplicationDelegate UIApplicationDelegate
|
||||
#define GULUserActivityRestoring UIUserActivityRestoring
|
||||
|
||||
static NSString *const kGULApplicationClassName = @"UIApplication";
|
||||
|
||||
#elif TARGET_OS_OSX
|
||||
|
||||
#import <AppKit/AppKit.h>
|
||||
|
||||
#define GULApplication NSApplication
|
||||
#define GULApplicationDelegate NSApplicationDelegate
|
||||
#define GULUserActivityRestoring NSUserActivityRestoring
|
||||
|
||||
static NSString *const kGULApplicationClassName = @"NSApplication";
|
||||
|
||||
#elif TARGET_OS_WATCH
|
||||
|
||||
#import <WatchKit/WatchKit.h>
|
||||
|
||||
// We match the according watchOS API but swizzling should not work in watch
|
||||
#define GULApplication WKExtension
|
||||
#define GULApplicationDelegate WKExtensionDelegate
|
||||
#define GULUserActivityRestoring NSUserActivityRestoring
|
||||
|
||||
static NSString *const kGULApplicationClassName = @"WKExtension";
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright 2021 Google LLC
|
||||
*
|
||||
* 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
|
||||
|
||||
/**
|
||||
* Describes an object that can store and fetch heartbeat dates for given tags.
|
||||
*/
|
||||
@protocol GULHeartbeatDateStorable <NSObject>
|
||||
|
||||
/**
|
||||
* Reads the date from the specified file for the given tag.
|
||||
* @return Returns date if exists, otherwise `nil`.
|
||||
*/
|
||||
- (nullable NSDate *)heartbeatDateForTag:(NSString *)tag;
|
||||
|
||||
/**
|
||||
* Saves the date for the specified tag in the specified file.
|
||||
* @return YES on success, NO otherwise.
|
||||
*/
|
||||
- (BOOL)setHearbeatDate:(NSDate *)date forTag:(NSString *)tag;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user