@thealteroffice/react-native-adgeist 0.0.22 → 0.0.24-beta
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/Adgeist.podspec +1 -1
- package/README.md +3 -11
- package/android/{generated/java/com/adgeist → app/build/generated/source/codegen/java/com/facebook/fbreact/specs}/NativeAdgeistSpec.java +1 -1
- package/{ios/generated → android/app/build/generated/source/codegen/jni/react/renderer/components}/RNAdgeistSpec/ComponentDescriptors.cpp +1 -1
- package/{ios/generated → android/app/build/generated/source/codegen/jni/react/renderer/components}/RNAdgeistSpec/ComponentDescriptors.h +1 -1
- package/android/{generated → app/build/generated/source/codegen}/jni/react/renderer/components/RNAdgeistSpec/EventEmitters.cpp +1 -1
- package/{ios/generated → android/app/build/generated/source/codegen/jni/react/renderer/components}/RNAdgeistSpec/Props.cpp +1 -1
- package/{ios/generated → android/app/build/generated/source/codegen/jni/react/renderer/components}/RNAdgeistSpec/ShadowNodes.cpp +1 -1
- package/android/{generated → app/build/generated/source/codegen}/jni/react/renderer/components/RNAdgeistSpec/ShadowNodes.h +3 -3
- package/android/{generated → app/build/generated/source/codegen}/jni/react/renderer/components/RNAdgeistSpec/States.cpp +1 -1
- package/android/build.gradle +5 -5
- package/ios/Adgeist.h +1 -1
- package/ios/NativeHTML5AdManager.mm +9 -4
- package/package.json +1 -1
- package/react-native.config.js +2 -3
- package/android/generated/jni/react/renderer/components/RNAdgeistSpec/ComponentDescriptors.cpp +0 -22
- package/android/generated/jni/react/renderer/components/RNAdgeistSpec/ComponentDescriptors.h +0 -24
- package/android/generated/jni/react/renderer/components/RNAdgeistSpec/Props.cpp +0 -28
- package/android/generated/jni/react/renderer/components/RNAdgeistSpec/ShadowNodes.cpp +0 -17
- package/ios/generated/RNAdgeistSpec/EventEmitters.cpp +0 -60
- package/ios/generated/RNAdgeistSpec/EventEmitters.h +0 -49
- package/ios/generated/RNAdgeistSpec/Props.h +0 -52
- package/ios/generated/RNAdgeistSpec/RCTComponentViewHelpers.h +0 -65
- package/ios/generated/RNAdgeistSpec/RNAdgeistSpec-generated.mm +0 -116
- package/ios/generated/RNAdgeistSpec/RNAdgeistSpec.h +0 -125
- package/ios/generated/RNAdgeistSpec/ShadowNodes.h +0 -32
- package/ios/generated/RNAdgeistSpec/States.cpp +0 -16
- package/ios/generated/RNAdgeistSpec/States.h +0 -29
- package/ios/generated/RNAdgeistSpecJSI-generated.cpp +0 -141
- package/ios/generated/RNAdgeistSpecJSI.h +0 -170
- /package/android/{generated → app/build/generated/source/codegen}/java/com/facebook/react/viewmanagers/HTML5AdNativeComponentManagerDelegate.java +0 -0
- /package/android/{generated → app/build/generated/source/codegen}/java/com/facebook/react/viewmanagers/HTML5AdNativeComponentManagerInterface.java +0 -0
- /package/android/{generated → app/build/generated/source/codegen}/jni/CMakeLists.txt +0 -0
- /package/android/{generated → app/build/generated/source/codegen}/jni/RNAdgeistSpec-generated.cpp +0 -0
- /package/android/{generated → app/build/generated/source/codegen}/jni/RNAdgeistSpec.h +0 -0
- /package/android/{generated → app/build/generated/source/codegen}/jni/react/renderer/components/RNAdgeistSpec/EventEmitters.h +0 -0
- /package/android/{generated → app/build/generated/source/codegen}/jni/react/renderer/components/RNAdgeistSpec/Props.h +0 -0
- /package/android/{generated → app/build/generated/source/codegen}/jni/react/renderer/components/RNAdgeistSpec/RNAdgeistSpecJSI-generated.cpp +0 -0
- /package/android/{generated → app/build/generated/source/codegen}/jni/react/renderer/components/RNAdgeistSpec/RNAdgeistSpecJSI.h +0 -0
- /package/android/{generated → app/build/generated/source/codegen}/jni/react/renderer/components/RNAdgeistSpec/States.h +0 -0
package/Adgeist.podspec
CHANGED
|
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
|
|
|
16
16
|
s.source_files = "ios/**/*.{h,m,mm,cpp,swift}"
|
|
17
17
|
s.private_header_files = "ios/**/*.h"
|
|
18
18
|
|
|
19
|
-
s.dependency "AdgeistKit", '= 1.0.
|
|
19
|
+
s.dependency "AdgeistKit", '= 1.0.2-beta'
|
|
20
20
|
|
|
21
21
|
# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
|
|
22
22
|
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
|
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ yarn add @thealteroffice/react-native-adgeist
|
|
|
31
31
|
|
|
32
32
|
### Android Configuration
|
|
33
33
|
|
|
34
|
-
Add your Adgeist publisher ID, api key and package id, as identified in the Adgeist web interface, to your app's `AndroidManifest.xml` file. To do so, add a `<meta-data>` tag with `android:name="com.adgeistkit.ads.ADGEIST_APP_ID"
|
|
34
|
+
Add your Adgeist publisher ID, api key and package id, as identified in the Adgeist web interface, to your app's `AndroidManifest.xml` file. To do so, add a `<meta-data>` tag with `android:name="com.adgeistkit.ads.ADGEIST_APP_ID"` and `android:name="com.adgeistkit.ads.ADGEIST_API_KEY"`
|
|
35
35
|
|
|
36
36
|
You can find your app ID in the Adgeist web interface. For `android:value`, insert your own Adgeist publisher ID, surrounded by quotation marks.
|
|
37
37
|
|
|
@@ -40,7 +40,6 @@ You can find your app ID in the Adgeist web interface. For `android:value`, inse
|
|
|
40
40
|
<application>
|
|
41
41
|
<!-- Sample Adgeist app ID: 69326f9fbb280f9241cabc94 -->
|
|
42
42
|
<!-- Sample Adgeist api key: b4e33bb73061d4e33670f229033f14bf770d35b15512dc1f106529e38946e49c -->
|
|
43
|
-
<!-- Sample Adgeist package id: https://adgeist-ad-integration.d49kd6luw1c4m.amplifyapp.com -->
|
|
44
43
|
|
|
45
44
|
<meta-data
|
|
46
45
|
android:name="com.adgeistkit.ads.ADGEIST_APP_ID"
|
|
@@ -49,15 +48,11 @@ You can find your app ID in the Adgeist web interface. For `android:value`, inse
|
|
|
49
48
|
<meta-data
|
|
50
49
|
android:name="com.adgeistkit.ads.ADGEIST_API_KEY"
|
|
51
50
|
android:value="ADGEIST_API_KEY"/>
|
|
52
|
-
|
|
53
|
-
<meta-data
|
|
54
|
-
android:name="com.adgeistkit.ads.ADGEIST_CUSTOM_PACKAGE_OR_BUNDLE_ID"
|
|
55
|
-
android:value="ADGEIST_CUSTOM_PACKAGE_OR_BUNDLE_ID"/>
|
|
56
51
|
</application>
|
|
57
52
|
</manifest>
|
|
58
53
|
```
|
|
59
54
|
|
|
60
|
-
Replace `ADGEIST_APP_ID`, `ADGEIST_API_KEY
|
|
55
|
+
Replace `ADGEIST_APP_ID`, `ADGEIST_API_KEY` with your Adgeist IDs.
|
|
61
56
|
|
|
62
57
|
### iOS Configuration
|
|
63
58
|
|
|
@@ -77,15 +72,13 @@ cd ios && pod install --repo-update
|
|
|
77
72
|
|
|
78
73
|
Update your app's `Info.plist` file to add three keys:
|
|
79
74
|
|
|
80
|
-
A `ADGEIST_APP_ID
|
|
75
|
+
A `ADGEIST_APP_ID` and `ADGEIST_API_KEY` key with a string value of your Adgeist IDs found in the Adgeist UI.
|
|
81
76
|
|
|
82
77
|
```xml
|
|
83
78
|
<key>ADGEIST_API_KEY</key>
|
|
84
79
|
<string>e31edf10067897a3904b64b6a4b5f18b1260470183ae203cc521b0479166d597</string>
|
|
85
80
|
<key>ADGEIST_APP_ID</key>
|
|
86
81
|
<string>69326f9fbb280f9241cabc94</string>
|
|
87
|
-
<key>ADGEIST_CUSTOM_PACKAGE_OR_BUNDLE_ID</key>
|
|
88
|
-
<string>https://adgeist-ad-integration.d49kd6luw1c4m.amplifyapp.com/</string>
|
|
89
82
|
```
|
|
90
83
|
|
|
91
84
|
## Perform the Configuration of AdgeistProvider
|
|
@@ -121,5 +114,4 @@ import { HTML5AdView } from '@thealteroffice/react-native-adgeist';
|
|
|
121
114
|
onAdClicked={}
|
|
122
115
|
adType="display"
|
|
123
116
|
/>;
|
|
124
|
-
|
|
125
117
|
```
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @generated by codegen project: GenerateComponentDescriptorCpp.js
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
#include
|
|
11
|
+
#include <react/renderer/components/RNAdgeistSpec/ComponentDescriptors.h>
|
|
12
12
|
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
|
13
13
|
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
|
|
14
14
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
#pragma once
|
|
12
12
|
|
|
13
|
-
#include
|
|
13
|
+
#include <react/renderer/components/RNAdgeistSpec/ShadowNodes.h>
|
|
14
14
|
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
|
15
15
|
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
|
|
16
16
|
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
|
|
11
11
|
#pragma once
|
|
12
12
|
|
|
13
|
-
#include
|
|
14
|
-
#include
|
|
15
|
-
#include
|
|
13
|
+
#include <react/renderer/components/RNAdgeistSpec/EventEmitters.h>
|
|
14
|
+
#include <react/renderer/components/RNAdgeistSpec/Props.h>
|
|
15
|
+
#include <react/renderer/components/RNAdgeistSpec/States.h>
|
|
16
16
|
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
|
17
17
|
#include <jsi/jsi.h>
|
|
18
18
|
|
package/android/build.gradle
CHANGED
|
@@ -82,11 +82,11 @@ android {
|
|
|
82
82
|
"src/newarch",
|
|
83
83
|
|
|
84
84
|
// This is needed to build Kotlin project with NewArch enabled
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
"${project.buildDir}/generated/source/codegen/java",
|
|
86
|
+
"${project.buildDir}/generated/source/codegen/jni"
|
|
87
87
|
|
|
88
|
-
"generated/java",
|
|
89
|
-
"generated/jni"
|
|
88
|
+
// "generated/java",
|
|
89
|
+
// "generated/jni"
|
|
90
90
|
]
|
|
91
91
|
}else{
|
|
92
92
|
java.srcDirs += ["src/oldarch"]
|
|
@@ -104,7 +104,7 @@ def kotlin_version = getExtOrDefault("kotlinVersion")
|
|
|
104
104
|
|
|
105
105
|
dependencies {
|
|
106
106
|
implementation "com.facebook.react:react-android"
|
|
107
|
-
implementation "ai.adgeist:adgeistkit:1.1.
|
|
107
|
+
implementation "ai.adgeist:adgeistkit:1.1.11-beta"
|
|
108
108
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
109
109
|
}
|
|
110
110
|
|
package/ios/Adgeist.h
CHANGED
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
@import adgeist;
|
|
14
14
|
#endif
|
|
15
15
|
|
|
16
|
-
#import "
|
|
17
|
-
#import "
|
|
18
|
-
#import "
|
|
19
|
-
#import "
|
|
16
|
+
#import "react/renderer/components/RNAdgeistSpec/ComponentDescriptors.h"
|
|
17
|
+
#import "react/renderer/components/RNAdgeistSpec/EventEmitters.h"
|
|
18
|
+
#import "react/renderer/components/RNAdgeistSpec/Props.h"
|
|
19
|
+
#import "react/renderer/components/RNAdgeistSpec/RCTComponentViewHelpers.h"
|
|
20
20
|
|
|
21
21
|
using namespace facebook::react;
|
|
22
22
|
|
|
@@ -176,3 +176,8 @@ using namespace facebook::react;
|
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
@end
|
|
179
|
+
|
|
180
|
+
Class<RCTComponentViewProtocol> HTML5AdNativeComponentCls(void)
|
|
181
|
+
{
|
|
182
|
+
return RCTNativeHTML5AdManager.class;
|
|
183
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thealteroffice/react-native-adgeist",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.24-beta",
|
|
4
4
|
"description": "Publishers can integrate our SDK to connect their ad spaces to the AdGeist marketplace.",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"module": "./lib/module/index.js",
|
package/react-native.config.js
CHANGED
package/android/generated/jni/react/renderer/components/RNAdgeistSpec/ComponentDescriptors.cpp
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateComponentDescriptorCpp.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#include "ComponentDescriptors.h"
|
|
12
|
-
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
|
13
|
-
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
|
|
14
|
-
|
|
15
|
-
namespace facebook::react {
|
|
16
|
-
|
|
17
|
-
void RNAdgeistSpec_registerComponentDescriptorsFromCodegen(
|
|
18
|
-
std::shared_ptr<const ComponentDescriptorProviderRegistry> registry) {
|
|
19
|
-
registry->add(concreteComponentDescriptorProvider<HTML5AdNativeComponentComponentDescriptor>());
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
} // namespace facebook::react
|
package/android/generated/jni/react/renderer/components/RNAdgeistSpec/ComponentDescriptors.h
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateComponentDescriptorH.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#pragma once
|
|
12
|
-
|
|
13
|
-
#include "ShadowNodes.h"
|
|
14
|
-
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
|
15
|
-
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
|
|
16
|
-
|
|
17
|
-
namespace facebook::react {
|
|
18
|
-
|
|
19
|
-
using HTML5AdNativeComponentComponentDescriptor = ConcreteComponentDescriptor<HTML5AdNativeComponentShadowNode>;
|
|
20
|
-
|
|
21
|
-
void RNAdgeistSpec_registerComponentDescriptorsFromCodegen(
|
|
22
|
-
std::shared_ptr<const ComponentDescriptorProviderRegistry> registry);
|
|
23
|
-
|
|
24
|
-
} // namespace facebook::react
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GeneratePropsCpp.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#include "Props.h"
|
|
12
|
-
#include <react/renderer/core/PropsParserContext.h>
|
|
13
|
-
#include <react/renderer/core/propsConversions.h>
|
|
14
|
-
|
|
15
|
-
namespace facebook::react {
|
|
16
|
-
|
|
17
|
-
HTML5AdNativeComponentProps::HTML5AdNativeComponentProps(
|
|
18
|
-
const PropsParserContext &context,
|
|
19
|
-
const HTML5AdNativeComponentProps &sourceProps,
|
|
20
|
-
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
|
|
21
|
-
|
|
22
|
-
adUnitID(convertRawProp(context, rawProps, "adUnitID", sourceProps.adUnitID, {})),
|
|
23
|
-
adIsResponsive(convertRawProp(context, rawProps, "adIsResponsive", sourceProps.adIsResponsive, {false})),
|
|
24
|
-
adSize(convertRawProp(context, rawProps, "adSize", sourceProps.adSize, {})),
|
|
25
|
-
adType(convertRawProp(context, rawProps, "adType", sourceProps.adType, {}))
|
|
26
|
-
{}
|
|
27
|
-
|
|
28
|
-
} // namespace facebook::react
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateShadowNodeCpp.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#include "ShadowNodes.h"
|
|
12
|
-
|
|
13
|
-
namespace facebook::react {
|
|
14
|
-
|
|
15
|
-
extern const char HTML5AdNativeComponentComponentName[] = "HTML5AdNativeComponent";
|
|
16
|
-
|
|
17
|
-
} // namespace facebook::react
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateEventEmitterCpp.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#include "EventEmitters.h"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
namespace facebook::react {
|
|
15
|
-
|
|
16
|
-
void HTML5AdNativeComponentEventEmitter::onAdLoaded(OnAdLoaded $event) const {
|
|
17
|
-
dispatchEvent("adLoaded", [](jsi::Runtime &runtime) {
|
|
18
|
-
auto $payload = jsi::Object(runtime);
|
|
19
|
-
|
|
20
|
-
return $payload;
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
void HTML5AdNativeComponentEventEmitter::onAdFailedToLoad(OnAdFailedToLoad $event) const {
|
|
26
|
-
dispatchEvent("adFailedToLoad", [$event=std::move($event)](jsi::Runtime &runtime) {
|
|
27
|
-
auto $payload = jsi::Object(runtime);
|
|
28
|
-
$payload.setProperty(runtime, "error", $event.error);
|
|
29
|
-
return $payload;
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
void HTML5AdNativeComponentEventEmitter::onAdOpened(OnAdOpened $event) const {
|
|
35
|
-
dispatchEvent("adOpened", [](jsi::Runtime &runtime) {
|
|
36
|
-
auto $payload = jsi::Object(runtime);
|
|
37
|
-
|
|
38
|
-
return $payload;
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
void HTML5AdNativeComponentEventEmitter::onAdClosed(OnAdClosed $event) const {
|
|
44
|
-
dispatchEvent("adClosed", [](jsi::Runtime &runtime) {
|
|
45
|
-
auto $payload = jsi::Object(runtime);
|
|
46
|
-
|
|
47
|
-
return $payload;
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
void HTML5AdNativeComponentEventEmitter::onAdClicked(OnAdClicked $event) const {
|
|
53
|
-
dispatchEvent("adClicked", [](jsi::Runtime &runtime) {
|
|
54
|
-
auto $payload = jsi::Object(runtime);
|
|
55
|
-
|
|
56
|
-
return $payload;
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
} // namespace facebook::react
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateEventEmitterH.js
|
|
9
|
-
*/
|
|
10
|
-
#pragma once
|
|
11
|
-
|
|
12
|
-
#include <react/renderer/components/view/ViewEventEmitter.h>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
namespace facebook::react {
|
|
16
|
-
class HTML5AdNativeComponentEventEmitter : public ViewEventEmitter {
|
|
17
|
-
public:
|
|
18
|
-
using ViewEventEmitter::ViewEventEmitter;
|
|
19
|
-
|
|
20
|
-
struct OnAdLoaded {
|
|
21
|
-
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
struct OnAdFailedToLoad {
|
|
25
|
-
std::string error;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
struct OnAdOpened {
|
|
29
|
-
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
struct OnAdClosed {
|
|
33
|
-
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
struct OnAdClicked {
|
|
37
|
-
|
|
38
|
-
};
|
|
39
|
-
void onAdLoaded(OnAdLoaded value) const;
|
|
40
|
-
|
|
41
|
-
void onAdFailedToLoad(OnAdFailedToLoad value) const;
|
|
42
|
-
|
|
43
|
-
void onAdOpened(OnAdOpened value) const;
|
|
44
|
-
|
|
45
|
-
void onAdClosed(OnAdClosed value) const;
|
|
46
|
-
|
|
47
|
-
void onAdClicked(OnAdClicked value) const;
|
|
48
|
-
};
|
|
49
|
-
} // namespace facebook::react
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GeneratePropsH.js
|
|
9
|
-
*/
|
|
10
|
-
#pragma once
|
|
11
|
-
|
|
12
|
-
#include <react/renderer/components/view/ViewProps.h>
|
|
13
|
-
#include <react/renderer/core/PropsParserContext.h>
|
|
14
|
-
#include <react/renderer/core/propsConversions.h>
|
|
15
|
-
|
|
16
|
-
namespace facebook::react {
|
|
17
|
-
|
|
18
|
-
struct HTML5AdNativeComponentAdSizeStruct {
|
|
19
|
-
double width{0.0};
|
|
20
|
-
double height{0.0};
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, HTML5AdNativeComponentAdSizeStruct &result) {
|
|
24
|
-
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
25
|
-
|
|
26
|
-
auto tmp_width = map.find("width");
|
|
27
|
-
if (tmp_width != map.end()) {
|
|
28
|
-
fromRawValue(context, tmp_width->second, result.width);
|
|
29
|
-
}
|
|
30
|
-
auto tmp_height = map.find("height");
|
|
31
|
-
if (tmp_height != map.end()) {
|
|
32
|
-
fromRawValue(context, tmp_height->second, result.height);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
static inline std::string toString(const HTML5AdNativeComponentAdSizeStruct &value) {
|
|
37
|
-
return "[Object HTML5AdNativeComponentAdSizeStruct]";
|
|
38
|
-
}
|
|
39
|
-
class HTML5AdNativeComponentProps final : public ViewProps {
|
|
40
|
-
public:
|
|
41
|
-
HTML5AdNativeComponentProps() = default;
|
|
42
|
-
HTML5AdNativeComponentProps(const PropsParserContext& context, const HTML5AdNativeComponentProps &sourceProps, const RawProps &rawProps);
|
|
43
|
-
|
|
44
|
-
#pragma mark - Props
|
|
45
|
-
|
|
46
|
-
std::string adUnitID{};
|
|
47
|
-
bool adIsResponsive{false};
|
|
48
|
-
HTML5AdNativeComponentAdSizeStruct adSize{};
|
|
49
|
-
std::string adType{};
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
} // namespace facebook::react
|
|
@@ -1,65 +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: GenerateComponentHObjCpp.js
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
#import <Foundation/Foundation.h>
|
|
11
|
-
#import <React/RCTDefines.h>
|
|
12
|
-
#import <React/RCTLog.h>
|
|
13
|
-
|
|
14
|
-
NS_ASSUME_NONNULL_BEGIN
|
|
15
|
-
|
|
16
|
-
@protocol RCTHTML5AdNativeComponentViewProtocol <NSObject>
|
|
17
|
-
- (void)loadAd:(BOOL)isTestMode;
|
|
18
|
-
- (void)destroy;
|
|
19
|
-
@end
|
|
20
|
-
|
|
21
|
-
RCT_EXTERN inline void RCTHTML5AdNativeComponentHandleCommand(
|
|
22
|
-
id<RCTHTML5AdNativeComponentViewProtocol> componentView,
|
|
23
|
-
NSString const *commandName,
|
|
24
|
-
NSArray const *args)
|
|
25
|
-
{
|
|
26
|
-
if ([commandName isEqualToString:@"loadAd"]) {
|
|
27
|
-
#if RCT_DEBUG
|
|
28
|
-
if ([args count] != 1) {
|
|
29
|
-
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"HTML5AdNativeComponent", commandName, (int)[args count], 1);
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
#endif
|
|
33
|
-
|
|
34
|
-
NSObject *arg0 = args[0];
|
|
35
|
-
#if RCT_DEBUG
|
|
36
|
-
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSNumber class], @"boolean", @"HTML5AdNativeComponent", commandName, @"1st")) {
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
#endif
|
|
40
|
-
BOOL isTestMode = [(NSNumber *)arg0 boolValue];
|
|
41
|
-
|
|
42
|
-
[componentView loadAd:isTestMode];
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
if ([commandName isEqualToString:@"destroy"]) {
|
|
47
|
-
#if RCT_DEBUG
|
|
48
|
-
if ([args count] != 0) {
|
|
49
|
-
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"HTML5AdNativeComponent", commandName, (int)[args count], 0);
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
#endif
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
[componentView destroy];
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
#if RCT_DEBUG
|
|
61
|
-
RCTLogError(@"%@ received command %@, which is not a supported command.", @"HTML5AdNativeComponent", commandName);
|
|
62
|
-
#endif
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
NS_ASSUME_NONNULL_END
|
|
@@ -1,116 +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 "RNAdgeistSpec.h"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
@implementation NativeAdgeistSpecBase
|
|
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_NativeAdgeistSpecJSI_initializeSdk(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
30
|
-
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "initializeSdk", @selector(initializeSdk:customPackageOrBundleID:customAdgeistAppID:resolve:reject:), args, count);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
static facebook::jsi::Value __hostFunction_NativeAdgeistSpecJSI_destroySdk(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
34
|
-
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "destroySdk", @selector(destroySdk:reject:), args, count);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
static facebook::jsi::Value __hostFunction_NativeAdgeistSpecJSI_fetchCreative(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
38
|
-
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "fetchCreative", @selector(fetchCreative:buyType:isTestEnvironment:resolve:reject:), args, count);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
static facebook::jsi::Value __hostFunction_NativeAdgeistSpecJSI_setUserDetails(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
42
|
-
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "setUserDetails", @selector(setUserDetails:), args, count);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
static facebook::jsi::Value __hostFunction_NativeAdgeistSpecJSI_logEvent(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
46
|
-
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "logEvent", @selector(logEvent:), args, count);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
static facebook::jsi::Value __hostFunction_NativeAdgeistSpecJSI_getConsentStatus(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
50
|
-
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "getConsentStatus", @selector(getConsentStatus:reject:), args, count);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
static facebook::jsi::Value __hostFunction_NativeAdgeistSpecJSI_updateConsentStatus(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
54
|
-
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "updateConsentStatus", @selector(updateConsentStatus:), args, count);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
static facebook::jsi::Value __hostFunction_NativeAdgeistSpecJSI_trackImpression(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
58
|
-
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "trackImpression", @selector(trackImpression:adSpaceId:bidId:bidMeta:buyType:isTestEnvironment:renderTime:resolve:reject:), args, count);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
static facebook::jsi::Value __hostFunction_NativeAdgeistSpecJSI_trackView(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
62
|
-
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "trackView", @selector(trackView:adSpaceId:bidId:bidMeta:buyType:isTestEnvironment:viewTime:visibilityRatio:scrollDepth:timeToVisible:resolve:reject:), args, count);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
static facebook::jsi::Value __hostFunction_NativeAdgeistSpecJSI_trackTotalView(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
66
|
-
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "trackTotalView", @selector(trackTotalView:adSpaceId:bidId:bidMeta:buyType:isTestEnvironment:totalViewTime:resolve:reject:), args, count);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
static facebook::jsi::Value __hostFunction_NativeAdgeistSpecJSI_trackClick(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
70
|
-
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "trackClick", @selector(trackClick:adSpaceId:bidId:bidMeta:buyType:isTestEnvironment:resolve:reject:), args, count);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
static facebook::jsi::Value __hostFunction_NativeAdgeistSpecJSI_trackVideoPlayback(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
74
|
-
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "trackVideoPlayback", @selector(trackVideoPlayback:adSpaceId:bidId:bidMeta:buyType:isTestEnvironment:totalPlaybackTime:resolve:reject:), args, count);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
NativeAdgeistSpecJSI::NativeAdgeistSpecJSI(const ObjCTurboModule::InitParams ¶ms)
|
|
78
|
-
: ObjCTurboModule(params) {
|
|
79
|
-
|
|
80
|
-
methodMap_["initializeSdk"] = MethodMetadata {3, __hostFunction_NativeAdgeistSpecJSI_initializeSdk};
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
methodMap_["destroySdk"] = MethodMetadata {0, __hostFunction_NativeAdgeistSpecJSI_destroySdk};
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
methodMap_["fetchCreative"] = MethodMetadata {3, __hostFunction_NativeAdgeistSpecJSI_fetchCreative};
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
methodMap_["setUserDetails"] = MethodMetadata {1, __hostFunction_NativeAdgeistSpecJSI_setUserDetails};
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
methodMap_["logEvent"] = MethodMetadata {1, __hostFunction_NativeAdgeistSpecJSI_logEvent};
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
methodMap_["getConsentStatus"] = MethodMetadata {0, __hostFunction_NativeAdgeistSpecJSI_getConsentStatus};
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
methodMap_["updateConsentStatus"] = MethodMetadata {1, __hostFunction_NativeAdgeistSpecJSI_updateConsentStatus};
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
methodMap_["trackImpression"] = MethodMetadata {7, __hostFunction_NativeAdgeistSpecJSI_trackImpression};
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
methodMap_["trackView"] = MethodMetadata {10, __hostFunction_NativeAdgeistSpecJSI_trackView};
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
methodMap_["trackTotalView"] = MethodMetadata {7, __hostFunction_NativeAdgeistSpecJSI_trackTotalView};
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
methodMap_["trackClick"] = MethodMetadata {6, __hostFunction_NativeAdgeistSpecJSI_trackClick};
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
methodMap_["trackVideoPlayback"] = MethodMetadata {7, __hostFunction_NativeAdgeistSpecJSI_trackVideoPlayback};
|
|
114
|
-
|
|
115
|
-
}
|
|
116
|
-
} // namespace facebook::react
|
|
@@ -1,125 +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 RNAdgeistSpec symbols
|
|
19
|
-
#ifndef RNAdgeistSpec_H
|
|
20
|
-
#define RNAdgeistSpec_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 NativeAdgeistSpec <RCTBridgeModule, RCTTurboModule>
|
|
37
|
-
|
|
38
|
-
- (void)initializeSdk:(NSString *)customBidRequestBackendDomain
|
|
39
|
-
customPackageOrBundleID:(NSString *)customPackageOrBundleID
|
|
40
|
-
customAdgeistAppID:(NSString *)customAdgeistAppID
|
|
41
|
-
resolve:(RCTPromiseResolveBlock)resolve
|
|
42
|
-
reject:(RCTPromiseRejectBlock)reject;
|
|
43
|
-
- (void)destroySdk:(RCTPromiseResolveBlock)resolve
|
|
44
|
-
reject:(RCTPromiseRejectBlock)reject;
|
|
45
|
-
- (void)fetchCreative:(NSString *)adSpaceId
|
|
46
|
-
buyType:(NSString *)buyType
|
|
47
|
-
isTestEnvironment:(BOOL)isTestEnvironment
|
|
48
|
-
resolve:(RCTPromiseResolveBlock)resolve
|
|
49
|
-
reject:(RCTPromiseRejectBlock)reject;
|
|
50
|
-
- (void)setUserDetails:(NSDictionary *)user;
|
|
51
|
-
- (void)logEvent:(NSDictionary *)event;
|
|
52
|
-
- (void)getConsentStatus:(RCTPromiseResolveBlock)resolve
|
|
53
|
-
reject:(RCTPromiseRejectBlock)reject;
|
|
54
|
-
- (void)updateConsentStatus:(BOOL)consent;
|
|
55
|
-
- (void)trackImpression:(NSString *)campaignId
|
|
56
|
-
adSpaceId:(NSString *)adSpaceId
|
|
57
|
-
bidId:(NSString *)bidId
|
|
58
|
-
bidMeta:(NSString *)bidMeta
|
|
59
|
-
buyType:(NSString *)buyType
|
|
60
|
-
isTestEnvironment:(BOOL)isTestEnvironment
|
|
61
|
-
renderTime:(double)renderTime
|
|
62
|
-
resolve:(RCTPromiseResolveBlock)resolve
|
|
63
|
-
reject:(RCTPromiseRejectBlock)reject;
|
|
64
|
-
- (void)trackView:(NSString *)campaignId
|
|
65
|
-
adSpaceId:(NSString *)adSpaceId
|
|
66
|
-
bidId:(NSString *)bidId
|
|
67
|
-
bidMeta:(NSString *)bidMeta
|
|
68
|
-
buyType:(NSString *)buyType
|
|
69
|
-
isTestEnvironment:(BOOL)isTestEnvironment
|
|
70
|
-
viewTime:(double)viewTime
|
|
71
|
-
visibilityRatio:(double)visibilityRatio
|
|
72
|
-
scrollDepth:(double)scrollDepth
|
|
73
|
-
timeToVisible:(double)timeToVisible
|
|
74
|
-
resolve:(RCTPromiseResolveBlock)resolve
|
|
75
|
-
reject:(RCTPromiseRejectBlock)reject;
|
|
76
|
-
- (void)trackTotalView:(NSString *)campaignId
|
|
77
|
-
adSpaceId:(NSString *)adSpaceId
|
|
78
|
-
bidId:(NSString *)bidId
|
|
79
|
-
bidMeta:(NSString *)bidMeta
|
|
80
|
-
buyType:(NSString *)buyType
|
|
81
|
-
isTestEnvironment:(BOOL)isTestEnvironment
|
|
82
|
-
totalViewTime:(double)totalViewTime
|
|
83
|
-
resolve:(RCTPromiseResolveBlock)resolve
|
|
84
|
-
reject:(RCTPromiseRejectBlock)reject;
|
|
85
|
-
- (void)trackClick:(NSString *)campaignId
|
|
86
|
-
adSpaceId:(NSString *)adSpaceId
|
|
87
|
-
bidId:(NSString *)bidId
|
|
88
|
-
bidMeta:(NSString *)bidMeta
|
|
89
|
-
buyType:(NSString *)buyType
|
|
90
|
-
isTestEnvironment:(BOOL)isTestEnvironment
|
|
91
|
-
resolve:(RCTPromiseResolveBlock)resolve
|
|
92
|
-
reject:(RCTPromiseRejectBlock)reject;
|
|
93
|
-
- (void)trackVideoPlayback:(NSString *)campaignId
|
|
94
|
-
adSpaceId:(NSString *)adSpaceId
|
|
95
|
-
bidId:(NSString *)bidId
|
|
96
|
-
bidMeta:(NSString *)bidMeta
|
|
97
|
-
buyType:(NSString *)buyType
|
|
98
|
-
isTestEnvironment:(BOOL)isTestEnvironment
|
|
99
|
-
totalPlaybackTime:(double)totalPlaybackTime
|
|
100
|
-
resolve:(RCTPromiseResolveBlock)resolve
|
|
101
|
-
reject:(RCTPromiseRejectBlock)reject;
|
|
102
|
-
|
|
103
|
-
@end
|
|
104
|
-
|
|
105
|
-
@interface NativeAdgeistSpecBase : NSObject {
|
|
106
|
-
@protected
|
|
107
|
-
facebook::react::EventEmitterCallback _eventEmitterCallback;
|
|
108
|
-
}
|
|
109
|
-
- (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper;
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
@end
|
|
113
|
-
|
|
114
|
-
namespace facebook::react {
|
|
115
|
-
/**
|
|
116
|
-
* ObjC++ class for module 'NativeAdgeist'
|
|
117
|
-
*/
|
|
118
|
-
class JSI_EXPORT NativeAdgeistSpecJSI : public ObjCTurboModule {
|
|
119
|
-
public:
|
|
120
|
-
NativeAdgeistSpecJSI(const ObjCTurboModule::InitParams ¶ms);
|
|
121
|
-
};
|
|
122
|
-
} // namespace facebook::react
|
|
123
|
-
|
|
124
|
-
NS_ASSUME_NONNULL_END
|
|
125
|
-
#endif // RNAdgeistSpec_H
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateShadowNodeH.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#pragma once
|
|
12
|
-
|
|
13
|
-
#include "EventEmitters.h"
|
|
14
|
-
#include "Props.h"
|
|
15
|
-
#include "States.h"
|
|
16
|
-
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
|
17
|
-
#include <jsi/jsi.h>
|
|
18
|
-
|
|
19
|
-
namespace facebook::react {
|
|
20
|
-
|
|
21
|
-
JSI_EXPORT extern const char HTML5AdNativeComponentComponentName[];
|
|
22
|
-
|
|
23
|
-
/*
|
|
24
|
-
* `ShadowNode` for <HTML5AdNativeComponent> component.
|
|
25
|
-
*/
|
|
26
|
-
using HTML5AdNativeComponentShadowNode = ConcreteViewShadowNode<
|
|
27
|
-
HTML5AdNativeComponentComponentName,
|
|
28
|
-
HTML5AdNativeComponentProps,
|
|
29
|
-
HTML5AdNativeComponentEventEmitter,
|
|
30
|
-
HTML5AdNativeComponentState>;
|
|
31
|
-
|
|
32
|
-
} // namespace facebook::react
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateStateCpp.js
|
|
9
|
-
*/
|
|
10
|
-
#include "States.h"
|
|
11
|
-
|
|
12
|
-
namespace facebook::react {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
} // namespace facebook::react
|
|
@@ -1,29 +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: GenerateStateH.js
|
|
8
|
-
*/
|
|
9
|
-
#pragma once
|
|
10
|
-
|
|
11
|
-
#ifdef ANDROID
|
|
12
|
-
#include <folly/dynamic.h>
|
|
13
|
-
#endif
|
|
14
|
-
|
|
15
|
-
namespace facebook::react {
|
|
16
|
-
|
|
17
|
-
class HTML5AdNativeComponentState {
|
|
18
|
-
public:
|
|
19
|
-
HTML5AdNativeComponentState() = default;
|
|
20
|
-
|
|
21
|
-
#ifdef ANDROID
|
|
22
|
-
HTML5AdNativeComponentState(HTML5AdNativeComponentState const &previousState, folly::dynamic data){};
|
|
23
|
-
folly::dynamic getDynamic() const {
|
|
24
|
-
return {};
|
|
25
|
-
};
|
|
26
|
-
#endif
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
} // namespace facebook::react
|
|
@@ -1,141 +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 "RNAdgeistSpecJSI.h"
|
|
11
|
-
|
|
12
|
-
namespace facebook::react {
|
|
13
|
-
|
|
14
|
-
static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_initializeSdk(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
15
|
-
return static_cast<NativeAdgeistCxxSpecJSI *>(&turboModule)->initializeSdk(
|
|
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
|
-
}
|
|
22
|
-
static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_destroySdk(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
23
|
-
return static_cast<NativeAdgeistCxxSpecJSI *>(&turboModule)->destroySdk(
|
|
24
|
-
rt
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_fetchCreative(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
28
|
-
return static_cast<NativeAdgeistCxxSpecJSI *>(&turboModule)->fetchCreative(
|
|
29
|
-
rt,
|
|
30
|
-
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
|
|
31
|
-
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt),
|
|
32
|
-
count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asBool()
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_setUserDetails(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
36
|
-
static_cast<NativeAdgeistCxxSpecJSI *>(&turboModule)->setUserDetails(
|
|
37
|
-
rt,
|
|
38
|
-
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt)
|
|
39
|
-
);
|
|
40
|
-
return jsi::Value::undefined();
|
|
41
|
-
}
|
|
42
|
-
static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_logEvent(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
43
|
-
static_cast<NativeAdgeistCxxSpecJSI *>(&turboModule)->logEvent(
|
|
44
|
-
rt,
|
|
45
|
-
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt)
|
|
46
|
-
);
|
|
47
|
-
return jsi::Value::undefined();
|
|
48
|
-
}
|
|
49
|
-
static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_getConsentStatus(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
50
|
-
return static_cast<NativeAdgeistCxxSpecJSI *>(&turboModule)->getConsentStatus(
|
|
51
|
-
rt
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_updateConsentStatus(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
55
|
-
static_cast<NativeAdgeistCxxSpecJSI *>(&turboModule)->updateConsentStatus(
|
|
56
|
-
rt,
|
|
57
|
-
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asBool()
|
|
58
|
-
);
|
|
59
|
-
return jsi::Value::undefined();
|
|
60
|
-
}
|
|
61
|
-
static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_trackImpression(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
62
|
-
return static_cast<NativeAdgeistCxxSpecJSI *>(&turboModule)->trackImpression(
|
|
63
|
-
rt,
|
|
64
|
-
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
|
|
65
|
-
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt),
|
|
66
|
-
count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asString(rt),
|
|
67
|
-
count <= 3 ? throw jsi::JSError(rt, "Expected argument in position 3 to be passed") : args[3].asString(rt),
|
|
68
|
-
count <= 4 ? throw jsi::JSError(rt, "Expected argument in position 4 to be passed") : args[4].asString(rt),
|
|
69
|
-
count <= 5 ? throw jsi::JSError(rt, "Expected argument in position 5 to be passed") : args[5].asBool(),
|
|
70
|
-
count <= 6 ? throw jsi::JSError(rt, "Expected argument in position 6 to be passed") : args[6].asNumber()
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_trackView(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
74
|
-
return static_cast<NativeAdgeistCxxSpecJSI *>(&turboModule)->trackView(
|
|
75
|
-
rt,
|
|
76
|
-
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
|
|
77
|
-
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt),
|
|
78
|
-
count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asString(rt),
|
|
79
|
-
count <= 3 ? throw jsi::JSError(rt, "Expected argument in position 3 to be passed") : args[3].asString(rt),
|
|
80
|
-
count <= 4 ? throw jsi::JSError(rt, "Expected argument in position 4 to be passed") : args[4].asString(rt),
|
|
81
|
-
count <= 5 ? throw jsi::JSError(rt, "Expected argument in position 5 to be passed") : args[5].asBool(),
|
|
82
|
-
count <= 6 ? throw jsi::JSError(rt, "Expected argument in position 6 to be passed") : args[6].asNumber(),
|
|
83
|
-
count <= 7 ? throw jsi::JSError(rt, "Expected argument in position 7 to be passed") : args[7].asNumber(),
|
|
84
|
-
count <= 8 ? throw jsi::JSError(rt, "Expected argument in position 8 to be passed") : args[8].asNumber(),
|
|
85
|
-
count <= 9 ? throw jsi::JSError(rt, "Expected argument in position 9 to be passed") : args[9].asNumber()
|
|
86
|
-
);
|
|
87
|
-
}
|
|
88
|
-
static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_trackTotalView(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
89
|
-
return static_cast<NativeAdgeistCxxSpecJSI *>(&turboModule)->trackTotalView(
|
|
90
|
-
rt,
|
|
91
|
-
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
|
|
92
|
-
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt),
|
|
93
|
-
count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asString(rt),
|
|
94
|
-
count <= 3 ? throw jsi::JSError(rt, "Expected argument in position 3 to be passed") : args[3].asString(rt),
|
|
95
|
-
count <= 4 ? throw jsi::JSError(rt, "Expected argument in position 4 to be passed") : args[4].asString(rt),
|
|
96
|
-
count <= 5 ? throw jsi::JSError(rt, "Expected argument in position 5 to be passed") : args[5].asBool(),
|
|
97
|
-
count <= 6 ? throw jsi::JSError(rt, "Expected argument in position 6 to be passed") : args[6].asNumber()
|
|
98
|
-
);
|
|
99
|
-
}
|
|
100
|
-
static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_trackClick(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
101
|
-
return static_cast<NativeAdgeistCxxSpecJSI *>(&turboModule)->trackClick(
|
|
102
|
-
rt,
|
|
103
|
-
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
|
|
104
|
-
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt),
|
|
105
|
-
count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asString(rt),
|
|
106
|
-
count <= 3 ? throw jsi::JSError(rt, "Expected argument in position 3 to be passed") : args[3].asString(rt),
|
|
107
|
-
count <= 4 ? throw jsi::JSError(rt, "Expected argument in position 4 to be passed") : args[4].asString(rt),
|
|
108
|
-
count <= 5 ? throw jsi::JSError(rt, "Expected argument in position 5 to be passed") : args[5].asBool()
|
|
109
|
-
);
|
|
110
|
-
}
|
|
111
|
-
static jsi::Value __hostFunction_NativeAdgeistCxxSpecJSI_trackVideoPlayback(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
112
|
-
return static_cast<NativeAdgeistCxxSpecJSI *>(&turboModule)->trackVideoPlayback(
|
|
113
|
-
rt,
|
|
114
|
-
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
|
|
115
|
-
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt),
|
|
116
|
-
count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asString(rt),
|
|
117
|
-
count <= 3 ? throw jsi::JSError(rt, "Expected argument in position 3 to be passed") : args[3].asString(rt),
|
|
118
|
-
count <= 4 ? throw jsi::JSError(rt, "Expected argument in position 4 to be passed") : args[4].asString(rt),
|
|
119
|
-
count <= 5 ? throw jsi::JSError(rt, "Expected argument in position 5 to be passed") : args[5].asBool(),
|
|
120
|
-
count <= 6 ? throw jsi::JSError(rt, "Expected argument in position 6 to be passed") : args[6].asNumber()
|
|
121
|
-
);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
NativeAdgeistCxxSpecJSI::NativeAdgeistCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
|
|
125
|
-
: TurboModule("Adgeist", jsInvoker) {
|
|
126
|
-
methodMap_["initializeSdk"] = MethodMetadata {3, __hostFunction_NativeAdgeistCxxSpecJSI_initializeSdk};
|
|
127
|
-
methodMap_["destroySdk"] = MethodMetadata {0, __hostFunction_NativeAdgeistCxxSpecJSI_destroySdk};
|
|
128
|
-
methodMap_["fetchCreative"] = MethodMetadata {3, __hostFunction_NativeAdgeistCxxSpecJSI_fetchCreative};
|
|
129
|
-
methodMap_["setUserDetails"] = MethodMetadata {1, __hostFunction_NativeAdgeistCxxSpecJSI_setUserDetails};
|
|
130
|
-
methodMap_["logEvent"] = MethodMetadata {1, __hostFunction_NativeAdgeistCxxSpecJSI_logEvent};
|
|
131
|
-
methodMap_["getConsentStatus"] = MethodMetadata {0, __hostFunction_NativeAdgeistCxxSpecJSI_getConsentStatus};
|
|
132
|
-
methodMap_["updateConsentStatus"] = MethodMetadata {1, __hostFunction_NativeAdgeistCxxSpecJSI_updateConsentStatus};
|
|
133
|
-
methodMap_["trackImpression"] = MethodMetadata {7, __hostFunction_NativeAdgeistCxxSpecJSI_trackImpression};
|
|
134
|
-
methodMap_["trackView"] = MethodMetadata {10, __hostFunction_NativeAdgeistCxxSpecJSI_trackView};
|
|
135
|
-
methodMap_["trackTotalView"] = MethodMetadata {7, __hostFunction_NativeAdgeistCxxSpecJSI_trackTotalView};
|
|
136
|
-
methodMap_["trackClick"] = MethodMetadata {6, __hostFunction_NativeAdgeistCxxSpecJSI_trackClick};
|
|
137
|
-
methodMap_["trackVideoPlayback"] = MethodMetadata {7, __hostFunction_NativeAdgeistCxxSpecJSI_trackVideoPlayback};
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
} // namespace facebook::react
|
|
@@ -1,170 +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 NativeAdgeistCxxSpecJSI : public TurboModule {
|
|
19
|
-
protected:
|
|
20
|
-
NativeAdgeistCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
|
21
|
-
|
|
22
|
-
public:
|
|
23
|
-
virtual jsi::Value initializeSdk(jsi::Runtime &rt, jsi::String customBidRequestBackendDomain, jsi::String customPackageOrBundleID, jsi::String customAdgeistAppID) = 0;
|
|
24
|
-
virtual jsi::Value destroySdk(jsi::Runtime &rt) = 0;
|
|
25
|
-
virtual jsi::Value fetchCreative(jsi::Runtime &rt, jsi::String adSpaceId, jsi::String buyType, bool isTestEnvironment) = 0;
|
|
26
|
-
virtual void setUserDetails(jsi::Runtime &rt, jsi::Object user) = 0;
|
|
27
|
-
virtual void logEvent(jsi::Runtime &rt, jsi::Object event) = 0;
|
|
28
|
-
virtual jsi::Value getConsentStatus(jsi::Runtime &rt) = 0;
|
|
29
|
-
virtual void updateConsentStatus(jsi::Runtime &rt, bool consent) = 0;
|
|
30
|
-
virtual jsi::Value trackImpression(jsi::Runtime &rt, jsi::String campaignId, jsi::String adSpaceId, jsi::String bidId, jsi::String bidMeta, jsi::String buyType, bool isTestEnvironment, double renderTime) = 0;
|
|
31
|
-
virtual jsi::Value trackView(jsi::Runtime &rt, jsi::String campaignId, jsi::String adSpaceId, jsi::String bidId, jsi::String bidMeta, jsi::String buyType, bool isTestEnvironment, double viewTime, double visibilityRatio, double scrollDepth, double timeToVisible) = 0;
|
|
32
|
-
virtual jsi::Value trackTotalView(jsi::Runtime &rt, jsi::String campaignId, jsi::String adSpaceId, jsi::String bidId, jsi::String bidMeta, jsi::String buyType, bool isTestEnvironment, double totalViewTime) = 0;
|
|
33
|
-
virtual jsi::Value trackClick(jsi::Runtime &rt, jsi::String campaignId, jsi::String adSpaceId, jsi::String bidId, jsi::String bidMeta, jsi::String buyType, bool isTestEnvironment) = 0;
|
|
34
|
-
virtual jsi::Value trackVideoPlayback(jsi::Runtime &rt, jsi::String campaignId, jsi::String adSpaceId, jsi::String bidId, jsi::String bidMeta, jsi::String buyType, bool isTestEnvironment, double totalPlaybackTime) = 0;
|
|
35
|
-
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
template <typename T>
|
|
39
|
-
class JSI_EXPORT NativeAdgeistCxxSpec : public TurboModule {
|
|
40
|
-
public:
|
|
41
|
-
jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
|
|
42
|
-
return delegate_.create(rt, propName);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime& runtime) override {
|
|
46
|
-
return delegate_.getPropertyNames(runtime);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
static constexpr std::string_view kModuleName = "Adgeist";
|
|
50
|
-
|
|
51
|
-
protected:
|
|
52
|
-
NativeAdgeistCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
53
|
-
: TurboModule(std::string{NativeAdgeistCxxSpec::kModuleName}, jsInvoker),
|
|
54
|
-
delegate_(reinterpret_cast<T*>(this), jsInvoker) {}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
private:
|
|
58
|
-
class Delegate : public NativeAdgeistCxxSpecJSI {
|
|
59
|
-
public:
|
|
60
|
-
Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
|
|
61
|
-
NativeAdgeistCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
jsi::Value initializeSdk(jsi::Runtime &rt, jsi::String customBidRequestBackendDomain, jsi::String customPackageOrBundleID, jsi::String customAdgeistAppID) override {
|
|
66
|
-
static_assert(
|
|
67
|
-
bridging::getParameterCount(&T::initializeSdk) == 4,
|
|
68
|
-
"Expected initializeSdk(...) to have 4 parameters");
|
|
69
|
-
|
|
70
|
-
return bridging::callFromJs<jsi::Value>(
|
|
71
|
-
rt, &T::initializeSdk, jsInvoker_, instance_, std::move(customBidRequestBackendDomain), std::move(customPackageOrBundleID), std::move(customAdgeistAppID));
|
|
72
|
-
}
|
|
73
|
-
jsi::Value destroySdk(jsi::Runtime &rt) override {
|
|
74
|
-
static_assert(
|
|
75
|
-
bridging::getParameterCount(&T::destroySdk) == 1,
|
|
76
|
-
"Expected destroySdk(...) to have 1 parameters");
|
|
77
|
-
|
|
78
|
-
return bridging::callFromJs<jsi::Value>(
|
|
79
|
-
rt, &T::destroySdk, jsInvoker_, instance_);
|
|
80
|
-
}
|
|
81
|
-
jsi::Value fetchCreative(jsi::Runtime &rt, jsi::String adSpaceId, jsi::String buyType, bool isTestEnvironment) override {
|
|
82
|
-
static_assert(
|
|
83
|
-
bridging::getParameterCount(&T::fetchCreative) == 4,
|
|
84
|
-
"Expected fetchCreative(...) to have 4 parameters");
|
|
85
|
-
|
|
86
|
-
return bridging::callFromJs<jsi::Value>(
|
|
87
|
-
rt, &T::fetchCreative, jsInvoker_, instance_, std::move(adSpaceId), std::move(buyType), std::move(isTestEnvironment));
|
|
88
|
-
}
|
|
89
|
-
void setUserDetails(jsi::Runtime &rt, jsi::Object user) override {
|
|
90
|
-
static_assert(
|
|
91
|
-
bridging::getParameterCount(&T::setUserDetails) == 2,
|
|
92
|
-
"Expected setUserDetails(...) to have 2 parameters");
|
|
93
|
-
|
|
94
|
-
return bridging::callFromJs<void>(
|
|
95
|
-
rt, &T::setUserDetails, jsInvoker_, instance_, std::move(user));
|
|
96
|
-
}
|
|
97
|
-
void logEvent(jsi::Runtime &rt, jsi::Object event) override {
|
|
98
|
-
static_assert(
|
|
99
|
-
bridging::getParameterCount(&T::logEvent) == 2,
|
|
100
|
-
"Expected logEvent(...) to have 2 parameters");
|
|
101
|
-
|
|
102
|
-
return bridging::callFromJs<void>(
|
|
103
|
-
rt, &T::logEvent, jsInvoker_, instance_, std::move(event));
|
|
104
|
-
}
|
|
105
|
-
jsi::Value getConsentStatus(jsi::Runtime &rt) override {
|
|
106
|
-
static_assert(
|
|
107
|
-
bridging::getParameterCount(&T::getConsentStatus) == 1,
|
|
108
|
-
"Expected getConsentStatus(...) to have 1 parameters");
|
|
109
|
-
|
|
110
|
-
return bridging::callFromJs<jsi::Value>(
|
|
111
|
-
rt, &T::getConsentStatus, jsInvoker_, instance_);
|
|
112
|
-
}
|
|
113
|
-
void updateConsentStatus(jsi::Runtime &rt, bool consent) override {
|
|
114
|
-
static_assert(
|
|
115
|
-
bridging::getParameterCount(&T::updateConsentStatus) == 2,
|
|
116
|
-
"Expected updateConsentStatus(...) to have 2 parameters");
|
|
117
|
-
|
|
118
|
-
return bridging::callFromJs<void>(
|
|
119
|
-
rt, &T::updateConsentStatus, jsInvoker_, instance_, std::move(consent));
|
|
120
|
-
}
|
|
121
|
-
jsi::Value trackImpression(jsi::Runtime &rt, jsi::String campaignId, jsi::String adSpaceId, jsi::String bidId, jsi::String bidMeta, jsi::String buyType, bool isTestEnvironment, double renderTime) override {
|
|
122
|
-
static_assert(
|
|
123
|
-
bridging::getParameterCount(&T::trackImpression) == 8,
|
|
124
|
-
"Expected trackImpression(...) to have 8 parameters");
|
|
125
|
-
|
|
126
|
-
return bridging::callFromJs<jsi::Value>(
|
|
127
|
-
rt, &T::trackImpression, jsInvoker_, instance_, std::move(campaignId), std::move(adSpaceId), std::move(bidId), std::move(bidMeta), std::move(buyType), std::move(isTestEnvironment), std::move(renderTime));
|
|
128
|
-
}
|
|
129
|
-
jsi::Value trackView(jsi::Runtime &rt, jsi::String campaignId, jsi::String adSpaceId, jsi::String bidId, jsi::String bidMeta, jsi::String buyType, bool isTestEnvironment, double viewTime, double visibilityRatio, double scrollDepth, double timeToVisible) override {
|
|
130
|
-
static_assert(
|
|
131
|
-
bridging::getParameterCount(&T::trackView) == 11,
|
|
132
|
-
"Expected trackView(...) to have 11 parameters");
|
|
133
|
-
|
|
134
|
-
return bridging::callFromJs<jsi::Value>(
|
|
135
|
-
rt, &T::trackView, jsInvoker_, instance_, std::move(campaignId), std::move(adSpaceId), std::move(bidId), std::move(bidMeta), std::move(buyType), std::move(isTestEnvironment), std::move(viewTime), std::move(visibilityRatio), std::move(scrollDepth), std::move(timeToVisible));
|
|
136
|
-
}
|
|
137
|
-
jsi::Value trackTotalView(jsi::Runtime &rt, jsi::String campaignId, jsi::String adSpaceId, jsi::String bidId, jsi::String bidMeta, jsi::String buyType, bool isTestEnvironment, double totalViewTime) override {
|
|
138
|
-
static_assert(
|
|
139
|
-
bridging::getParameterCount(&T::trackTotalView) == 8,
|
|
140
|
-
"Expected trackTotalView(...) to have 8 parameters");
|
|
141
|
-
|
|
142
|
-
return bridging::callFromJs<jsi::Value>(
|
|
143
|
-
rt, &T::trackTotalView, jsInvoker_, instance_, std::move(campaignId), std::move(adSpaceId), std::move(bidId), std::move(bidMeta), std::move(buyType), std::move(isTestEnvironment), std::move(totalViewTime));
|
|
144
|
-
}
|
|
145
|
-
jsi::Value trackClick(jsi::Runtime &rt, jsi::String campaignId, jsi::String adSpaceId, jsi::String bidId, jsi::String bidMeta, jsi::String buyType, bool isTestEnvironment) override {
|
|
146
|
-
static_assert(
|
|
147
|
-
bridging::getParameterCount(&T::trackClick) == 7,
|
|
148
|
-
"Expected trackClick(...) to have 7 parameters");
|
|
149
|
-
|
|
150
|
-
return bridging::callFromJs<jsi::Value>(
|
|
151
|
-
rt, &T::trackClick, jsInvoker_, instance_, std::move(campaignId), std::move(adSpaceId), std::move(bidId), std::move(bidMeta), std::move(buyType), std::move(isTestEnvironment));
|
|
152
|
-
}
|
|
153
|
-
jsi::Value trackVideoPlayback(jsi::Runtime &rt, jsi::String campaignId, jsi::String adSpaceId, jsi::String bidId, jsi::String bidMeta, jsi::String buyType, bool isTestEnvironment, double totalPlaybackTime) override {
|
|
154
|
-
static_assert(
|
|
155
|
-
bridging::getParameterCount(&T::trackVideoPlayback) == 8,
|
|
156
|
-
"Expected trackVideoPlayback(...) to have 8 parameters");
|
|
157
|
-
|
|
158
|
-
return bridging::callFromJs<jsi::Value>(
|
|
159
|
-
rt, &T::trackVideoPlayback, jsInvoker_, instance_, std::move(campaignId), std::move(adSpaceId), std::move(bidId), std::move(bidMeta), std::move(buyType), std::move(isTestEnvironment), std::move(totalPlaybackTime));
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
private:
|
|
163
|
-
friend class NativeAdgeistCxxSpec;
|
|
164
|
-
T *instance_;
|
|
165
|
-
};
|
|
166
|
-
|
|
167
|
-
Delegate delegate_;
|
|
168
|
-
};
|
|
169
|
-
|
|
170
|
-
} // namespace facebook::react
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/android/{generated → app/build/generated/source/codegen}/jni/RNAdgeistSpec-generated.cpp
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|