commit | author | age
|
2e29a3
|
1 |
/* |
L |
2 |
* Copyright (c) Meta Platforms, Inc. and affiliates. |
|
3 |
* All rights reserved. |
|
4 |
* |
|
5 |
* This source code is licensed under the license found in the |
|
6 |
* LICENSE file in the root directory of this source tree. |
|
7 |
*/ |
|
8 |
|
|
9 |
#import <TargetConditionals.h> |
|
10 |
|
|
11 |
#if !TARGET_OS_TV |
|
12 |
|
|
13 |
#import <Foundation/Foundation.h> |
|
14 |
|
|
15 |
#import <FBAEMKit/FBAEMNetworking.h> |
|
16 |
#import <FBAEMKit/FBSKAdNetworkReporting.h> |
|
17 |
|
|
18 |
NS_ASSUME_NONNULL_BEGIN |
|
19 |
|
|
20 |
NS_SWIFT_NAME(AEMReporter) |
|
21 |
@interface FBAEMReporter : NSObject |
|
22 |
|
|
23 |
/** |
|
24 |
|
|
25 |
Configure networker used for calling Facebook AEM Graph API endpoint |
|
26 |
and Facebook App ID |
|
27 |
|
|
28 |
This function should be called in application(_:open:options:) from ApplicationDelegate |
|
29 |
and BEFORE [FBAEMReporter enable] function |
|
30 |
|
|
31 |
@param networker An optional networker conforms to FBAEMNetworking which handles Graph API request |
|
32 |
@param appID An optional Facebook app ID, if it's null, we will get it from info.plist file with key: FacebookAppID |
|
33 |
*/ |
|
34 |
+ (void)configureWithNetworker:(nullable id<FBAEMNetworking>)networker |
|
35 |
appID:(nullable NSString *)appID; |
|
36 |
|
|
37 |
/** |
|
38 |
|
|
39 |
Configure networker used for calling Facebook AEM Graph API endpoint |
|
40 |
and Facebook App ID |
|
41 |
|
|
42 |
This function should be called in application(_:open:options:) from ApplicationDelegate |
|
43 |
and BEFORE [FBAEMReporter enable] function. We will use SKAdNetwork reporter to prevent |
|
44 |
double counting. |
|
45 |
|
|
46 |
@param networker An optional networker conforms to FBAEMNetworking which handles Graph API request |
|
47 |
@param appID An optional Facebook app ID, if it's null, we will get it from info.plist file with key: FacebookAppID |
|
48 |
@param reporter The SKAdNetwork repoter |
|
49 |
*/ |
|
50 |
+ (void)configureWithNetworker:(nullable id<FBAEMNetworking>)networker |
|
51 |
appID:(nullable NSString *)appID |
|
52 |
reporter:(nullable id<FBSKAdNetworkReporting>)reporter; |
|
53 |
|
|
54 |
/** |
|
55 |
|
|
56 |
Enable AEM reporting |
|
57 |
|
|
58 |
This function should be called in application(_:open:options:) from ApplicationDelegate |
|
59 |
*/ |
|
60 |
+ (void)enable; |
|
61 |
|
|
62 |
/** |
|
63 |
|
|
64 |
Control whether to enable catalog reporting |
|
65 |
|
|
66 |
This function should be called in application(_:open:options:) from ApplicationDelegate |
|
67 |
*/ |
|
68 |
+ (void)setCatalogReportEnabled:(BOOL)enabled; |
|
69 |
|
|
70 |
/** |
|
71 |
|
|
72 |
Handle deeplink |
|
73 |
|
|
74 |
This function should be called in application(_:open:options:) from ApplicationDelegate |
|
75 |
*/ |
|
76 |
+ (void)handleURL:(NSURL *)url; |
|
77 |
|
|
78 |
/** |
|
79 |
|
|
80 |
Calculate the conversion value for the app event based on the AEM configuration |
|
81 |
|
|
82 |
This function should be called when you log any in-app events |
|
83 |
*/ |
|
84 |
|
|
85 |
// UNCRUSTIFY_FORMAT_OFF |
|
86 |
+ (void)recordAndUpdateEvent:(NSString *)event |
|
87 |
currency:(nullable NSString *)currency |
|
88 |
value:(nullable NSNumber *)value |
|
89 |
parameters:(nullable NSDictionary<NSString *, id> *)parameters |
|
90 |
NS_SWIFT_NAME(recordAndUpdate(event:currency:value:parameters:)); |
|
91 |
// UNCRUSTIFY_FORMAT_ON |
|
92 |
|
|
93 |
@end |
|
94 |
|
|
95 |
NS_ASSUME_NONNULL_END |
|
96 |
|
|
97 |
#endif |