com-tapp-so-sdk 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/src/main/java/com/comtappsosdk/ComTappSoSdkModule.kt +1 -1
- package/ios/ComTappSoSdk.h +9 -2
- package/package.json +3 -2
- package/ios/generated/ComTappSoSdkSpec/ComTappSoSdkSpec-generated.mm +0 -109
- package/ios/generated/ComTappSoSdkSpec/ComTappSoSdkSpec.h +0 -89
- package/ios/generated/ComTappSoSdkSpecJSI-generated.cpp +0 -109
- package/ios/generated/ComTappSoSdkSpecJSI.h +0 -161
|
@@ -45,7 +45,7 @@ class ComTappSoSdkModule(reactContext: ReactApplicationContext) :
|
|
|
45
45
|
private var isFlushRetryScheduled = false
|
|
46
46
|
|
|
47
47
|
init {
|
|
48
|
-
|
|
48
|
+
Logger.logInfo("[$NAME] IS_NEW_ARCHITECTURE_ENABLED: ${BuildConfig.IS_NEW_ARCHITECTURE_ENABLED}")
|
|
49
49
|
}
|
|
50
50
|
override fun getName(): String = NAME
|
|
51
51
|
|
package/ios/ComTappSoSdk.h
CHANGED
|
@@ -45,9 +45,16 @@ static inline facebook::react::EventEmitterCallback CTConvertBlockToStdFunction(
|
|
|
45
45
|
#endif // !RCT_NEW_ARCH_ENABLED
|
|
46
46
|
|
|
47
47
|
//
|
|
48
|
-
// For new architecture builds, import the generated Codegen header
|
|
48
|
+
// For new architecture builds, import the generated Codegen header.
|
|
49
|
+
// Use __has_include to support multiple RN/Pods layouts.
|
|
49
50
|
#if defined(RCT_NEW_ARCH_ENABLED)
|
|
50
|
-
#
|
|
51
|
+
#if __has_include(<ComTappSoSdkSpec/ComTappSoSdkSpec.h>)
|
|
52
|
+
#import <ComTappSoSdkSpec/ComTappSoSdkSpec.h>
|
|
53
|
+
#elif __has_include("ComTappSoSdkSpec.h")
|
|
54
|
+
#import "ComTappSoSdkSpec.h"
|
|
55
|
+
#else
|
|
56
|
+
#error "ComTappSoSdkSpec.h not found. Ensure codegen ran during pod install."
|
|
57
|
+
#endif
|
|
51
58
|
#endif
|
|
52
59
|
|
|
53
60
|
//
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "com-tapp-so-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "react native tapp sdk",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"engines": {
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"*.podspec",
|
|
26
26
|
"react-native.config.js",
|
|
27
27
|
"!ios/build",
|
|
28
|
+
"!ios/generated",
|
|
28
29
|
"!android/build",
|
|
29
30
|
"!android/gradle",
|
|
30
31
|
"!android/gradlew",
|
|
@@ -159,7 +160,7 @@
|
|
|
159
160
|
"android": {
|
|
160
161
|
"javaPackageName": "com.comtappsosdk"
|
|
161
162
|
},
|
|
162
|
-
"includesGeneratedCode":
|
|
163
|
+
"includesGeneratedCode": false
|
|
163
164
|
},
|
|
164
165
|
"create-react-native-library": {
|
|
165
166
|
"languages": "kotlin-objc",
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
-
*
|
|
4
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
-
* once the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @generated by codegen project: GenerateModuleObjCpp
|
|
8
|
-
*
|
|
9
|
-
* We create an umbrella header (and corresponding implementation) here since
|
|
10
|
-
* Cxx compilation in BUCK has a limitation: source-code producing genrule()s
|
|
11
|
-
* must have a single output. More files => more genrule()s => slower builds.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
#import "ComTappSoSdkSpec.h"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
@implementation NativeComTappSoSdkSpecBase
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
- (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper
|
|
21
|
-
{
|
|
22
|
-
_eventEmitterCallback = std::move(eventEmitterCallbackWrapper->_eventEmitterCallback);
|
|
23
|
-
}
|
|
24
|
-
@end
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
namespace facebook::react {
|
|
28
|
-
|
|
29
|
-
static facebook::jsi::Value __hostFunction_NativeComTappSoSdkSpecJSI_start(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
30
|
-
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "start", @selector(start:env:tappToken:), args, count);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
static facebook::jsi::Value __hostFunction_NativeComTappSoSdkSpecJSI_url(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
34
|
-
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "url", @selector(url:adGroup:creative:data:resolve:reject:), args, count);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
static facebook::jsi::Value __hostFunction_NativeComTappSoSdkSpecJSI_handleTappEvent(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
38
|
-
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "handleTappEvent", @selector(handleTappEvent:customValue:metadata:resolve:reject:), args, count);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
static facebook::jsi::Value __hostFunction_NativeComTappSoSdkSpecJSI_fetchLinkData(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
42
|
-
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "fetchLinkData", @selector(fetchLinkData:resolve:reject:), args, count);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
static facebook::jsi::Value __hostFunction_NativeComTappSoSdkSpecJSI_shouldProcess(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
46
|
-
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "shouldProcess", @selector(shouldProcess:resolve:reject:), args, count);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
static facebook::jsi::Value __hostFunction_NativeComTappSoSdkSpecJSI_fetchOriginLinkData(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
50
|
-
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "fetchOriginLinkData", @selector(fetchOriginLinkData:reject:), args, count);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
static facebook::jsi::Value __hostFunction_NativeComTappSoSdkSpecJSI_simulateTestEvent(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
54
|
-
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "simulateTestEvent", @selector(simulateTestEvent), args, count);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
static facebook::jsi::Value __hostFunction_NativeComTappSoSdkSpecJSI_simulateDeferredLink(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
58
|
-
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "simulateDeferredLink", @selector(simulateDeferredLink:), args, count);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
static facebook::jsi::Value __hostFunction_NativeComTappSoSdkSpecJSI_simulateFailResolving(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
62
|
-
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "simulateFailResolving", @selector(simulateFailResolving:errorMessage:), args, count);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
static facebook::jsi::Value __hostFunction_NativeComTappSoSdkSpecJSI_addListener(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
66
|
-
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "addListener", @selector(addListener:), args, count);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
static facebook::jsi::Value __hostFunction_NativeComTappSoSdkSpecJSI_removeListeners(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
70
|
-
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "removeListeners", @selector(removeListeners:), args, count);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
NativeComTappSoSdkSpecJSI::NativeComTappSoSdkSpecJSI(const ObjCTurboModule::InitParams ¶ms)
|
|
74
|
-
: ObjCTurboModule(params) {
|
|
75
|
-
|
|
76
|
-
methodMap_["start"] = MethodMetadata {3, __hostFunction_NativeComTappSoSdkSpecJSI_start};
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
methodMap_["url"] = MethodMetadata {4, __hostFunction_NativeComTappSoSdkSpecJSI_url};
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
methodMap_["handleTappEvent"] = MethodMetadata {3, __hostFunction_NativeComTappSoSdkSpecJSI_handleTappEvent};
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
methodMap_["fetchLinkData"] = MethodMetadata {1, __hostFunction_NativeComTappSoSdkSpecJSI_fetchLinkData};
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
methodMap_["shouldProcess"] = MethodMetadata {1, __hostFunction_NativeComTappSoSdkSpecJSI_shouldProcess};
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
methodMap_["fetchOriginLinkData"] = MethodMetadata {0, __hostFunction_NativeComTappSoSdkSpecJSI_fetchOriginLinkData};
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
methodMap_["simulateTestEvent"] = MethodMetadata {0, __hostFunction_NativeComTappSoSdkSpecJSI_simulateTestEvent};
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
methodMap_["simulateDeferredLink"] = MethodMetadata {1, __hostFunction_NativeComTappSoSdkSpecJSI_simulateDeferredLink};
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
methodMap_["simulateFailResolving"] = MethodMetadata {2, __hostFunction_NativeComTappSoSdkSpecJSI_simulateFailResolving};
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
methodMap_["addListener"] = MethodMetadata {1, __hostFunction_NativeComTappSoSdkSpecJSI_addListener};
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
methodMap_["removeListeners"] = MethodMetadata {1, __hostFunction_NativeComTappSoSdkSpecJSI_removeListeners};
|
|
107
|
-
|
|
108
|
-
}
|
|
109
|
-
} // namespace facebook::react
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
-
*
|
|
4
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
-
* once the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @generated by codegen project: GenerateModuleObjCpp
|
|
8
|
-
*
|
|
9
|
-
* We create an umbrella header (and corresponding implementation) here since
|
|
10
|
-
* Cxx compilation in BUCK has a limitation: source-code producing genrule()s
|
|
11
|
-
* must have a single output. More files => more genrule()s => slower builds.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
#ifndef __cplusplus
|
|
15
|
-
#error This file must be compiled as Obj-C++. If you are importing it, you must change your file extension to .mm.
|
|
16
|
-
#endif
|
|
17
|
-
|
|
18
|
-
// Avoid multiple includes of ComTappSoSdkSpec symbols
|
|
19
|
-
#ifndef ComTappSoSdkSpec_H
|
|
20
|
-
#define ComTappSoSdkSpec_H
|
|
21
|
-
|
|
22
|
-
#import <Foundation/Foundation.h>
|
|
23
|
-
#import <RCTRequired/RCTRequired.h>
|
|
24
|
-
#import <RCTTypeSafety/RCTConvertHelpers.h>
|
|
25
|
-
#import <RCTTypeSafety/RCTTypedModuleConstants.h>
|
|
26
|
-
#import <React/RCTBridgeModule.h>
|
|
27
|
-
#import <React/RCTCxxConvert.h>
|
|
28
|
-
#import <React/RCTManagedPointer.h>
|
|
29
|
-
#import <ReactCommon/RCTTurboModule.h>
|
|
30
|
-
#import <optional>
|
|
31
|
-
#import <vector>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
NS_ASSUME_NONNULL_BEGIN
|
|
35
|
-
|
|
36
|
-
@protocol NativeComTappSoSdkSpec <RCTBridgeModule, RCTTurboModule>
|
|
37
|
-
|
|
38
|
-
- (void)start:(NSString *)authToken
|
|
39
|
-
env:(NSString *)env
|
|
40
|
-
tappToken:(NSString *)tappToken;
|
|
41
|
-
- (void)url:(NSString *)influencer
|
|
42
|
-
adGroup:(NSString *)adGroup
|
|
43
|
-
creative:(NSString *)creative
|
|
44
|
-
data:(NSDictionary *)data
|
|
45
|
-
resolve:(RCTPromiseResolveBlock)resolve
|
|
46
|
-
reject:(RCTPromiseRejectBlock)reject;
|
|
47
|
-
- (void)handleTappEvent:(double)eventAction
|
|
48
|
-
customValue:(NSString *)customValue
|
|
49
|
-
metadata:(NSDictionary *)metadata
|
|
50
|
-
resolve:(RCTPromiseResolveBlock)resolve
|
|
51
|
-
reject:(RCTPromiseRejectBlock)reject;
|
|
52
|
-
- (void)fetchLinkData:(NSString *)deepLink
|
|
53
|
-
resolve:(RCTPromiseResolveBlock)resolve
|
|
54
|
-
reject:(RCTPromiseRejectBlock)reject;
|
|
55
|
-
- (void)shouldProcess:(NSString *)deepLink
|
|
56
|
-
resolve:(RCTPromiseResolveBlock)resolve
|
|
57
|
-
reject:(RCTPromiseRejectBlock)reject;
|
|
58
|
-
- (void)fetchOriginLinkData:(RCTPromiseResolveBlock)resolve
|
|
59
|
-
reject:(RCTPromiseRejectBlock)reject;
|
|
60
|
-
- (void)simulateTestEvent;
|
|
61
|
-
- (void)simulateDeferredLink:(NSDictionary *)payload;
|
|
62
|
-
- (void)simulateFailResolving:(NSString *)url
|
|
63
|
-
errorMessage:(NSString *)errorMessage;
|
|
64
|
-
- (void)addListener:(NSString *)eventName;
|
|
65
|
-
- (void)removeListeners:(double)count;
|
|
66
|
-
|
|
67
|
-
@end
|
|
68
|
-
|
|
69
|
-
@interface NativeComTappSoSdkSpecBase : NSObject {
|
|
70
|
-
@protected
|
|
71
|
-
facebook::react::EventEmitterCallback _eventEmitterCallback;
|
|
72
|
-
}
|
|
73
|
-
- (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper;
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
@end
|
|
77
|
-
|
|
78
|
-
namespace facebook::react {
|
|
79
|
-
/**
|
|
80
|
-
* ObjC++ class for module 'NativeComTappSoSdk'
|
|
81
|
-
*/
|
|
82
|
-
class JSI_EXPORT NativeComTappSoSdkSpecJSI : public ObjCTurboModule {
|
|
83
|
-
public:
|
|
84
|
-
NativeComTappSoSdkSpecJSI(const ObjCTurboModule::InitParams ¶ms);
|
|
85
|
-
};
|
|
86
|
-
} // namespace facebook::react
|
|
87
|
-
|
|
88
|
-
NS_ASSUME_NONNULL_END
|
|
89
|
-
#endif // ComTappSoSdkSpec_H
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
-
*
|
|
4
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
-
* once the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @generated by codegen project: GenerateModuleCpp.js
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
#include "ComTappSoSdkSpecJSI.h"
|
|
11
|
-
|
|
12
|
-
namespace facebook::react {
|
|
13
|
-
|
|
14
|
-
static jsi::Value __hostFunction_NativeComTappSoSdkCxxSpecJSI_start(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
15
|
-
static_cast<NativeComTappSoSdkCxxSpecJSI *>(&turboModule)->start(
|
|
16
|
-
rt,
|
|
17
|
-
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
|
|
18
|
-
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt),
|
|
19
|
-
count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asString(rt)
|
|
20
|
-
);
|
|
21
|
-
return jsi::Value::undefined();
|
|
22
|
-
}
|
|
23
|
-
static jsi::Value __hostFunction_NativeComTappSoSdkCxxSpecJSI_url(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
24
|
-
return static_cast<NativeComTappSoSdkCxxSpecJSI *>(&turboModule)->url(
|
|
25
|
-
rt,
|
|
26
|
-
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
|
|
27
|
-
count <= 1 || args[1].isUndefined() ? std::nullopt : std::make_optional(args[1].asString(rt)),
|
|
28
|
-
count <= 2 || args[2].isUndefined() ? std::nullopt : std::make_optional(args[2].asString(rt)),
|
|
29
|
-
count <= 3 || args[3].isUndefined() ? std::nullopt : std::make_optional(args[3].asObject(rt))
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
static jsi::Value __hostFunction_NativeComTappSoSdkCxxSpecJSI_handleTappEvent(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
33
|
-
return static_cast<NativeComTappSoSdkCxxSpecJSI *>(&turboModule)->handleTappEvent(
|
|
34
|
-
rt,
|
|
35
|
-
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(),
|
|
36
|
-
count <= 1 || args[1].isUndefined() ? std::nullopt : std::make_optional(args[1].asString(rt)),
|
|
37
|
-
count <= 2 || args[2].isUndefined() ? std::nullopt : std::make_optional(args[2].asObject(rt))
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
static jsi::Value __hostFunction_NativeComTappSoSdkCxxSpecJSI_fetchLinkData(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
41
|
-
return static_cast<NativeComTappSoSdkCxxSpecJSI *>(&turboModule)->fetchLinkData(
|
|
42
|
-
rt,
|
|
43
|
-
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
static jsi::Value __hostFunction_NativeComTappSoSdkCxxSpecJSI_shouldProcess(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
47
|
-
return static_cast<NativeComTappSoSdkCxxSpecJSI *>(&turboModule)->shouldProcess(
|
|
48
|
-
rt,
|
|
49
|
-
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
static jsi::Value __hostFunction_NativeComTappSoSdkCxxSpecJSI_fetchOriginLinkData(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
53
|
-
return static_cast<NativeComTappSoSdkCxxSpecJSI *>(&turboModule)->fetchOriginLinkData(
|
|
54
|
-
rt
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
static jsi::Value __hostFunction_NativeComTappSoSdkCxxSpecJSI_simulateTestEvent(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
58
|
-
static_cast<NativeComTappSoSdkCxxSpecJSI *>(&turboModule)->simulateTestEvent(
|
|
59
|
-
rt
|
|
60
|
-
);
|
|
61
|
-
return jsi::Value::undefined();
|
|
62
|
-
}
|
|
63
|
-
static jsi::Value __hostFunction_NativeComTappSoSdkCxxSpecJSI_simulateDeferredLink(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
64
|
-
static_cast<NativeComTappSoSdkCxxSpecJSI *>(&turboModule)->simulateDeferredLink(
|
|
65
|
-
rt,
|
|
66
|
-
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt)
|
|
67
|
-
);
|
|
68
|
-
return jsi::Value::undefined();
|
|
69
|
-
}
|
|
70
|
-
static jsi::Value __hostFunction_NativeComTappSoSdkCxxSpecJSI_simulateFailResolving(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
71
|
-
static_cast<NativeComTappSoSdkCxxSpecJSI *>(&turboModule)->simulateFailResolving(
|
|
72
|
-
rt,
|
|
73
|
-
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
|
|
74
|
-
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt)
|
|
75
|
-
);
|
|
76
|
-
return jsi::Value::undefined();
|
|
77
|
-
}
|
|
78
|
-
static jsi::Value __hostFunction_NativeComTappSoSdkCxxSpecJSI_addListener(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
79
|
-
static_cast<NativeComTappSoSdkCxxSpecJSI *>(&turboModule)->addListener(
|
|
80
|
-
rt,
|
|
81
|
-
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
|
|
82
|
-
);
|
|
83
|
-
return jsi::Value::undefined();
|
|
84
|
-
}
|
|
85
|
-
static jsi::Value __hostFunction_NativeComTappSoSdkCxxSpecJSI_removeListeners(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
86
|
-
static_cast<NativeComTappSoSdkCxxSpecJSI *>(&turboModule)->removeListeners(
|
|
87
|
-
rt,
|
|
88
|
-
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber()
|
|
89
|
-
);
|
|
90
|
-
return jsi::Value::undefined();
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
NativeComTappSoSdkCxxSpecJSI::NativeComTappSoSdkCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
|
|
94
|
-
: TurboModule("ComTappSoSdk", jsInvoker) {
|
|
95
|
-
methodMap_["start"] = MethodMetadata {3, __hostFunction_NativeComTappSoSdkCxxSpecJSI_start};
|
|
96
|
-
methodMap_["url"] = MethodMetadata {4, __hostFunction_NativeComTappSoSdkCxxSpecJSI_url};
|
|
97
|
-
methodMap_["handleTappEvent"] = MethodMetadata {3, __hostFunction_NativeComTappSoSdkCxxSpecJSI_handleTappEvent};
|
|
98
|
-
methodMap_["fetchLinkData"] = MethodMetadata {1, __hostFunction_NativeComTappSoSdkCxxSpecJSI_fetchLinkData};
|
|
99
|
-
methodMap_["shouldProcess"] = MethodMetadata {1, __hostFunction_NativeComTappSoSdkCxxSpecJSI_shouldProcess};
|
|
100
|
-
methodMap_["fetchOriginLinkData"] = MethodMetadata {0, __hostFunction_NativeComTappSoSdkCxxSpecJSI_fetchOriginLinkData};
|
|
101
|
-
methodMap_["simulateTestEvent"] = MethodMetadata {0, __hostFunction_NativeComTappSoSdkCxxSpecJSI_simulateTestEvent};
|
|
102
|
-
methodMap_["simulateDeferredLink"] = MethodMetadata {1, __hostFunction_NativeComTappSoSdkCxxSpecJSI_simulateDeferredLink};
|
|
103
|
-
methodMap_["simulateFailResolving"] = MethodMetadata {2, __hostFunction_NativeComTappSoSdkCxxSpecJSI_simulateFailResolving};
|
|
104
|
-
methodMap_["addListener"] = MethodMetadata {1, __hostFunction_NativeComTappSoSdkCxxSpecJSI_addListener};
|
|
105
|
-
methodMap_["removeListeners"] = MethodMetadata {1, __hostFunction_NativeComTappSoSdkCxxSpecJSI_removeListeners};
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
} // namespace facebook::react
|
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
-
*
|
|
4
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
-
* once the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @generated by codegen project: GenerateModuleH.js
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
#pragma once
|
|
11
|
-
|
|
12
|
-
#include <ReactCommon/TurboModule.h>
|
|
13
|
-
#include <react/bridging/Bridging.h>
|
|
14
|
-
|
|
15
|
-
namespace facebook::react {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
class JSI_EXPORT NativeComTappSoSdkCxxSpecJSI : public TurboModule {
|
|
19
|
-
protected:
|
|
20
|
-
NativeComTappSoSdkCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
|
21
|
-
|
|
22
|
-
public:
|
|
23
|
-
virtual void start(jsi::Runtime &rt, jsi::String authToken, jsi::String env, jsi::String tappToken) = 0;
|
|
24
|
-
virtual jsi::Value url(jsi::Runtime &rt, jsi::String influencer, std::optional<jsi::String> adGroup, std::optional<jsi::String> creative, std::optional<jsi::Object> data) = 0;
|
|
25
|
-
virtual jsi::Value handleTappEvent(jsi::Runtime &rt, double eventAction, std::optional<jsi::String> customValue, std::optional<jsi::Object> metadata) = 0;
|
|
26
|
-
virtual jsi::Value fetchLinkData(jsi::Runtime &rt, jsi::String deepLink) = 0;
|
|
27
|
-
virtual jsi::Value shouldProcess(jsi::Runtime &rt, jsi::String deepLink) = 0;
|
|
28
|
-
virtual jsi::Value fetchOriginLinkData(jsi::Runtime &rt) = 0;
|
|
29
|
-
virtual void simulateTestEvent(jsi::Runtime &rt) = 0;
|
|
30
|
-
virtual void simulateDeferredLink(jsi::Runtime &rt, jsi::Object payload) = 0;
|
|
31
|
-
virtual void simulateFailResolving(jsi::Runtime &rt, jsi::String url, jsi::String errorMessage) = 0;
|
|
32
|
-
virtual void addListener(jsi::Runtime &rt, jsi::String eventName) = 0;
|
|
33
|
-
virtual void removeListeners(jsi::Runtime &rt, double count) = 0;
|
|
34
|
-
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
template <typename T>
|
|
38
|
-
class JSI_EXPORT NativeComTappSoSdkCxxSpec : public TurboModule {
|
|
39
|
-
public:
|
|
40
|
-
jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
|
|
41
|
-
return delegate_.create(rt, propName);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime& runtime) override {
|
|
45
|
-
return delegate_.getPropertyNames(runtime);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
static constexpr std::string_view kModuleName = "ComTappSoSdk";
|
|
49
|
-
|
|
50
|
-
protected:
|
|
51
|
-
NativeComTappSoSdkCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
52
|
-
: TurboModule(std::string{NativeComTappSoSdkCxxSpec::kModuleName}, jsInvoker),
|
|
53
|
-
delegate_(reinterpret_cast<T*>(this), jsInvoker) {}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
private:
|
|
57
|
-
class Delegate : public NativeComTappSoSdkCxxSpecJSI {
|
|
58
|
-
public:
|
|
59
|
-
Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
|
|
60
|
-
NativeComTappSoSdkCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
void start(jsi::Runtime &rt, jsi::String authToken, jsi::String env, jsi::String tappToken) override {
|
|
65
|
-
static_assert(
|
|
66
|
-
bridging::getParameterCount(&T::start) == 4,
|
|
67
|
-
"Expected start(...) to have 4 parameters");
|
|
68
|
-
|
|
69
|
-
return bridging::callFromJs<void>(
|
|
70
|
-
rt, &T::start, jsInvoker_, instance_, std::move(authToken), std::move(env), std::move(tappToken));
|
|
71
|
-
}
|
|
72
|
-
jsi::Value url(jsi::Runtime &rt, jsi::String influencer, std::optional<jsi::String> adGroup, std::optional<jsi::String> creative, std::optional<jsi::Object> data) override {
|
|
73
|
-
static_assert(
|
|
74
|
-
bridging::getParameterCount(&T::url) == 5,
|
|
75
|
-
"Expected url(...) to have 5 parameters");
|
|
76
|
-
|
|
77
|
-
return bridging::callFromJs<jsi::Value>(
|
|
78
|
-
rt, &T::url, jsInvoker_, instance_, std::move(influencer), std::move(adGroup), std::move(creative), std::move(data));
|
|
79
|
-
}
|
|
80
|
-
jsi::Value handleTappEvent(jsi::Runtime &rt, double eventAction, std::optional<jsi::String> customValue, std::optional<jsi::Object> metadata) override {
|
|
81
|
-
static_assert(
|
|
82
|
-
bridging::getParameterCount(&T::handleTappEvent) == 4,
|
|
83
|
-
"Expected handleTappEvent(...) to have 4 parameters");
|
|
84
|
-
|
|
85
|
-
return bridging::callFromJs<jsi::Value>(
|
|
86
|
-
rt, &T::handleTappEvent, jsInvoker_, instance_, std::move(eventAction), std::move(customValue), std::move(metadata));
|
|
87
|
-
}
|
|
88
|
-
jsi::Value fetchLinkData(jsi::Runtime &rt, jsi::String deepLink) override {
|
|
89
|
-
static_assert(
|
|
90
|
-
bridging::getParameterCount(&T::fetchLinkData) == 2,
|
|
91
|
-
"Expected fetchLinkData(...) to have 2 parameters");
|
|
92
|
-
|
|
93
|
-
return bridging::callFromJs<jsi::Value>(
|
|
94
|
-
rt, &T::fetchLinkData, jsInvoker_, instance_, std::move(deepLink));
|
|
95
|
-
}
|
|
96
|
-
jsi::Value shouldProcess(jsi::Runtime &rt, jsi::String deepLink) override {
|
|
97
|
-
static_assert(
|
|
98
|
-
bridging::getParameterCount(&T::shouldProcess) == 2,
|
|
99
|
-
"Expected shouldProcess(...) to have 2 parameters");
|
|
100
|
-
|
|
101
|
-
return bridging::callFromJs<jsi::Value>(
|
|
102
|
-
rt, &T::shouldProcess, jsInvoker_, instance_, std::move(deepLink));
|
|
103
|
-
}
|
|
104
|
-
jsi::Value fetchOriginLinkData(jsi::Runtime &rt) override {
|
|
105
|
-
static_assert(
|
|
106
|
-
bridging::getParameterCount(&T::fetchOriginLinkData) == 1,
|
|
107
|
-
"Expected fetchOriginLinkData(...) to have 1 parameters");
|
|
108
|
-
|
|
109
|
-
return bridging::callFromJs<jsi::Value>(
|
|
110
|
-
rt, &T::fetchOriginLinkData, jsInvoker_, instance_);
|
|
111
|
-
}
|
|
112
|
-
void simulateTestEvent(jsi::Runtime &rt) override {
|
|
113
|
-
static_assert(
|
|
114
|
-
bridging::getParameterCount(&T::simulateTestEvent) == 1,
|
|
115
|
-
"Expected simulateTestEvent(...) to have 1 parameters");
|
|
116
|
-
|
|
117
|
-
return bridging::callFromJs<void>(
|
|
118
|
-
rt, &T::simulateTestEvent, jsInvoker_, instance_);
|
|
119
|
-
}
|
|
120
|
-
void simulateDeferredLink(jsi::Runtime &rt, jsi::Object payload) override {
|
|
121
|
-
static_assert(
|
|
122
|
-
bridging::getParameterCount(&T::simulateDeferredLink) == 2,
|
|
123
|
-
"Expected simulateDeferredLink(...) to have 2 parameters");
|
|
124
|
-
|
|
125
|
-
return bridging::callFromJs<void>(
|
|
126
|
-
rt, &T::simulateDeferredLink, jsInvoker_, instance_, std::move(payload));
|
|
127
|
-
}
|
|
128
|
-
void simulateFailResolving(jsi::Runtime &rt, jsi::String url, jsi::String errorMessage) override {
|
|
129
|
-
static_assert(
|
|
130
|
-
bridging::getParameterCount(&T::simulateFailResolving) == 3,
|
|
131
|
-
"Expected simulateFailResolving(...) to have 3 parameters");
|
|
132
|
-
|
|
133
|
-
return bridging::callFromJs<void>(
|
|
134
|
-
rt, &T::simulateFailResolving, jsInvoker_, instance_, std::move(url), std::move(errorMessage));
|
|
135
|
-
}
|
|
136
|
-
void addListener(jsi::Runtime &rt, jsi::String eventName) override {
|
|
137
|
-
static_assert(
|
|
138
|
-
bridging::getParameterCount(&T::addListener) == 2,
|
|
139
|
-
"Expected addListener(...) to have 2 parameters");
|
|
140
|
-
|
|
141
|
-
return bridging::callFromJs<void>(
|
|
142
|
-
rt, &T::addListener, jsInvoker_, instance_, std::move(eventName));
|
|
143
|
-
}
|
|
144
|
-
void removeListeners(jsi::Runtime &rt, double count) override {
|
|
145
|
-
static_assert(
|
|
146
|
-
bridging::getParameterCount(&T::removeListeners) == 2,
|
|
147
|
-
"Expected removeListeners(...) to have 2 parameters");
|
|
148
|
-
|
|
149
|
-
return bridging::callFromJs<void>(
|
|
150
|
-
rt, &T::removeListeners, jsInvoker_, instance_, std::move(count));
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
private:
|
|
154
|
-
friend class NativeComTappSoSdkCxxSpec;
|
|
155
|
-
T *instance_;
|
|
156
|
-
};
|
|
157
|
-
|
|
158
|
-
Delegate delegate_;
|
|
159
|
-
};
|
|
160
|
-
|
|
161
|
-
} // namespace facebook::react
|