react-native-idosdk 1.0.4 → 1.0.6

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.
Files changed (39) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +56 -68
  3. package/android/build.gradle +11 -14
  4. package/android/src/main/AndroidManifest.xml +11 -3
  5. package/android/src/main/java/com/getui/{reactnativegetui → reactnativeido}/GetuiIdoModule.java +7 -3
  6. package/android/src/main/java/com/getui/{reactnativegetui → reactnativeido}/GetuiIdoPackage.java +1 -1
  7. package/android/src/main/java/com/getui/{reactnativegetui → reactnativeido}/GetuiLogger.java +1 -1
  8. package/docs/superpowers/plans/2026-07-13-android-getui-maven-dependencies.md +323 -0
  9. package/docs/superpowers/specs/2026-07-13-android-getui-maven-dependencies-design.md +96 -0
  10. package/document/android.md +48 -112
  11. package/document/iOS.md +31 -283
  12. package/package.json +4 -1
  13. package/react-native-harmony-ido/README.md +266 -0
  14. package/react-native-harmony-ido/gt-ido-ohos-plugin-1.0.1.tgz +0 -0
  15. package/react-native-harmony-ido/harmony/BuildProfile.ets +17 -0
  16. package/react-native-harmony-ido/harmony/IdoOhosSdk.har +0 -0
  17. package/react-native-harmony-ido/harmony/Index.ets +1 -0
  18. package/react-native-harmony-ido/harmony/build-profile.json5 +36 -0
  19. package/react-native-harmony-ido/harmony/consumer-rules.txt +0 -0
  20. package/react-native-harmony-ido/harmony/hvigorfile.ts +6 -0
  21. package/react-native-harmony-ido/harmony/libs/getui_ido_1.0.1.har +0 -0
  22. package/react-native-harmony-ido/harmony/obfuscation-rules.txt +23 -0
  23. package/react-native-harmony-ido/harmony/oh-package-lock.json5 +38 -0
  24. package/react-native-harmony-ido/harmony/oh-package.json5 +12 -0
  25. package/react-native-harmony-ido/harmony/src/main/cpp/CMakeLists.txt +7 -0
  26. package/react-native-harmony-ido/harmony/src/main/cpp/IdoModule.cpp +38 -0
  27. package/react-native-harmony-ido/harmony/src/main/cpp/IdoModule.h +21 -0
  28. package/react-native-harmony-ido/harmony/src/main/cpp/IdoPackage.h +76 -0
  29. package/react-native-harmony-ido/harmony/src/main/ets/IdoModule.ets +150 -0
  30. package/react-native-harmony-ido/harmony/src/main/ets/IdoPackage.ets +24 -0
  31. package/react-native-harmony-ido/harmony/src/main/module.json5 +9 -0
  32. package/react-native-harmony-ido/harmony/src/main/resources/base/element/float.json +8 -0
  33. package/react-native-harmony-ido/harmony/src/main/resources/base/element/string.json +8 -0
  34. package/react-native-harmony-ido/harmony/ts.ets +2 -0
  35. package/react-native-harmony-ido/index.ts +4 -0
  36. package/react-native-harmony-ido/package.json +35 -0
  37. package/react-native-harmony-ido/src/specs/v1/NativeIdo.ts +44 -0
  38. package/android/libs/gs-1.4.12.0.jar +0 -0
  39. package/android/libs/gtc-3.2.18.0.jar +0 -0
@@ -0,0 +1,266 @@
1
+ [Github 地址](https://github.com/GetuiLaboratory/react-native-idosdk/tree/main/react-native-harmony-ido)
2
+
3
+ ## 安装与使用
4
+
5
+ 下载 [gt-ido-ohos-plugin-1.0.1.tgz](gt-ido-ohos-plugin-1.0.1.tgz) 并放到 React Native 工程根目录,然后执行:
6
+
7
+ ```sh
8
+ npm install file:./gt-ido-ohos-plugin-1.0.1.tgz
9
+ ```
10
+
11
+
12
+ 下面的代码展示了这个库的基本使用场景:
13
+ 完成代码参考[App.tsx](../example/OhosDemo/App.tsx)
14
+
15
+ > [!WARNING] 使用时 import 的库名不变。
16
+
17
+ ```js
18
+ import { GetuiIdo } from "gt-ido-ohos-plugin";
19
+ //....省略
20
+ function App(): React.JSX.Element {
21
+ const isDarkMode = useColorScheme() === 'dark';
22
+ const [gtcid, setGtcid] = useState<string | null>(null); // 存储 gtcid
23
+ const [version, setVersion] = useState<string>('未知'); // 存储版本号
24
+
25
+ // 初始化运营工具
26
+ const initIdo = () => {
27
+ try {
28
+ // 获取版本号
29
+ GetuiIdo.version((ver: string) => {
30
+ setVersion(ver);
31
+ });
32
+
33
+ const appId = '你的 AppID';
34
+ const channel = 'rn';
35
+ GetuiIdo.setDebugEnable(true)
36
+
37
+ GetuiIdo.startSdk(appId, channel);
38
+
39
+ setTimeout((): void => {
40
+ // 获取 gtcid
41
+ GetuiIdo.gtcid((id: string) => {
42
+ Alert.alert('成功', '运营工具初始化成功 \n '+id);
43
+ setGtcid(id);
44
+ });
45
+ }, 1000);
46
+
47
+ // 开启调试模式(可选)
48
+ GetuiIdo.setDebugEnable(true);
49
+ // 设置其他可选配置(根据需求调整,时间单位为毫秒)
50
+ GetuiIdo.setSessionTime(30000); // 设置会话时间(毫秒)
51
+ GetuiIdo.setMinAppActiveDuration(60000); // 设置最小活跃时长(毫秒)
52
+ GetuiIdo.setMaxAppActiveDuration(3600000); // 设置最大活跃时长(毫秒)
53
+ GetuiIdo.setEventUploadInterval(300000); // 设置事件上传间隔(毫秒)
54
+ GetuiIdo.setEventForceUploadSize(50); // 设置强制上传事件数量
55
+ GetuiIdo.setProfileUploadInterval(600000); // 设置用户画像上传间隔(毫秒)
56
+ GetuiIdo.setProfileForceUploadSize(20); // 设置用户画像强制上传数量
57
+
58
+ const profiles = {
59
+ "userId": 123,
60
+ "name": "Alice",
61
+ "isActive": true
62
+ };
63
+
64
+ GetuiIdo.setProfile(profiles, "sss");
65
+ } catch (error) {
66
+ Alert.alert('错误', '初始化运营工具失败: ' + error);
67
+ }
68
+ };
69
+ const trackCountEvent = () =>{
70
+ const profiles = {
71
+ "userId": 123,
72
+ "name": "Alice",
73
+ "isActive": true
74
+ };
75
+
76
+ GetuiIdo.trackCountEvent("123",profiles,"ss");
77
+ };
78
+ }
79
+ //....省略
80
+ export default App;
81
+
82
+ ```
83
+
84
+ ## Link
85
+
86
+ 目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。
87
+
88
+ 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony`
89
+
90
+ ### 1.在工程根目录的 `oh-package.json5` 添加 overrides 字段
91
+
92
+ ```json
93
+ {
94
+ ...
95
+ "overrides": {
96
+ "@rnoh/react-native-openharmony" : "./react_native_openharmony"
97
+ }
98
+ }
99
+ ```
100
+
101
+ ### 2.引入原生端代码
102
+
103
+ > [!TIP] har 包位于三方库安装路径的 `harmony` 文件夹下。
104
+
105
+ 打开 `entry/oh-package.json5`,添加以下依赖
106
+
107
+ ```json
108
+ "dependencies": {
109
+ "@rnoh/react-native-openharmony": "0.72.90",
110
+ "IdoOhosSdk": "file:../../node_modules/gt-ido-ohos-plugin/harmony/IdoOhosSdk.har"
111
+ }
112
+ ```
113
+ 点击右上角的 `sync` 按钮
114
+
115
+
116
+ ### 3.配置 CMakeLists 和引入 IdoPackage
117
+
118
+ 打开 `entry/src/main/cpp/CMakeLists.txt`,添加:
119
+
120
+ ```diff
121
+ project(rnapp)
122
+ cmake_minimum_required(VERSION 3.4.1)
123
+ set(CMAKE_SKIP_BUILD_RPATH TRUE)
124
+ set(OH_MODULE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules")
125
+ set(RNOH_APP_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
126
+
127
+ set(RNOH_CPP_DIR "${OH_MODULE_DIR}/@rnoh/react-native-openharmony/src/main/cpp")
128
+ set(RNOH_GENERATED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/generated")
129
+ set(CMAKE_ASM_FLAGS "-Wno-error=unused-command-line-argument -Qunused-arguments")
130
+ set(CMAKE_CXX_FLAGS "-fstack-protector-strong -Wl,-z,relro,-z,now,-z,noexecstack -s -fPIE -pie")
131
+ add_compile_definitions(WITH_HITRACE_SYSTRACE)
132
+ set(WITH_HITRACE_SYSTRACE 1) # for other CMakeLists.txt files to use
133
+
134
+ add_subdirectory("${RNOH_CPP_DIR}" ./rn)
135
+ add_subdirectory("${OH_MODULE_DIR}/IdoOhosSdk/src/main/cpp" ./ido)
136
+
137
+ add_library(rnoh_app SHARED
138
+ "./PackageProvider.cpp"
139
+ "${RNOH_CPP_DIR}/RNOHAppNapiBridge.cpp"
140
+ )
141
+
142
+ target_link_libraries(rnoh_app PUBLIC rnoh)
143
+ target_link_libraries(rnoh_app PUBLIC rnoh_ido)
144
+ ```
145
+
146
+ 打开 `entry/src/main/cpp/PackageProvider.cpp`,添加:
147
+
148
+ ```diff
149
+ #include "RNOH/PackageProvider.h"
150
+ #include "IdoPackage.h"
151
+
152
+ using namespace rnoh;
153
+ std::vector<std::shared_ptr<Package>>
154
+ PackageProvider::getPackages(Package::Context ctx) {
155
+ return {
156
+ std::make_shared<IdoPackage>(ctx)
157
+ };
158
+ }
159
+ ```
160
+
161
+ ### 4.在 ArkTS 侧引入 IdoPackage
162
+
163
+ 打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加:
164
+
165
+ ```diff
166
+ import { RNPackageContext, RNPackage } from '@rnoh/react-native-openharmony/ts';
167
+ import { IdoPackage } from 'IdoOhosSdk/ts';
168
+
169
+ export function createRNPackages(ctx: RNPackageContext): RNPackage[] {
170
+ return [
171
+ new IdoPackage(ctx),
172
+ ];
173
+ }
174
+ ```
175
+
176
+ ### 5.配置appid参数
177
+
178
+ 打开 `entry/src/main/module.json5`,添加:
179
+
180
+ ```diff
181
+ "metadata": [
182
+ {
183
+ "name": "GETUI_APPID",
184
+ "value": "你的 AppID"
185
+ },
186
+
187
+ ],
188
+ "requestPermissions": [
189
+ {
190
+ "name": "ohos.permission.INTERNET"
191
+ },
192
+ {
193
+ "name": "ohos.permission.GET_NETWORK_INFO"
194
+ },
195
+ {
196
+ "name": "ohos.permission.GET_WIFI_INFO"
197
+ },
198
+ {
199
+ "name": "ohos.permission.APP_TRACKING_CONSENT",
200
+ "reason" : "$string:oaid_reason",
201
+ "usedScene": {
202
+ "when": "always"
203
+ }
204
+ }
205
+ ]
206
+ ```
207
+
208
+ ### 6.运行
209
+
210
+ 点击右上角的 `sync` 按钮
211
+
212
+ 或者在终端执行:
213
+
214
+ ```bash
215
+ cd entry
216
+ ohpm install
217
+ ```
218
+
219
+ 然后编译、运行即可。
220
+
221
+ ## 约束与限制
222
+
223
+ ## 兼容性
224
+
225
+ 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。
226
+
227
+
228
+ ## 方法
229
+
230
+ ```ts
231
+ export interface Spec extends TurboModule {
232
+
233
+ startSdk(appid: string, channel: string): void;
234
+
235
+ gtcid(cb: (param: string) => void): void;
236
+
237
+ version(cb: (param: string) => void): void;
238
+
239
+ setDebugEnable(isEnable: boolean): void;
240
+
241
+ setSessionTime(time: number): void;
242
+
243
+ setMinAppActiveDuration(val: number): void;
244
+
245
+ setMaxAppActiveDuration(val: number): void;
246
+
247
+ setEventUploadInterval(val: number): void;
248
+
249
+ setEventForceUploadSize(val: number): void;
250
+
251
+ setProfileUploadInterval(val: number): void;
252
+
253
+ setProfileForceUploadSize(val: number): void;
254
+
255
+ setUserId(val: string): void;
256
+
257
+ trackCustomKeyValueEventBegin(eventId: string): void;
258
+
259
+ trackCustomKeyValueEventEnd(eventId: string, args:{[key: string]: string|number|boolean}, ext: string): void;
260
+
261
+ trackCountEvent(eventId: string, args:{[key: string]: string|number|boolean}, ext: string): void;
262
+
263
+ setProfile(profiles: {[key: string]: string|number|boolean}, ext: string): void;
264
+
265
+ }
266
+ ```
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Use these variables when you tailor your ArkTS code. They must be of the const type.
3
+ */
4
+ export const HAR_VERSION = '1.0.0';
5
+ export const BUILD_MODE_NAME = 'debug';
6
+ export const DEBUG = true;
7
+ export const TARGET_NAME = 'default';
8
+
9
+ /**
10
+ * BuildProfile Class is used only for compatibility purposes.
11
+ */
12
+ export default class BuildProfile {
13
+ static readonly HAR_VERSION = HAR_VERSION;
14
+ static readonly BUILD_MODE_NAME = BUILD_MODE_NAME;
15
+ static readonly DEBUG = DEBUG;
16
+ static readonly TARGET_NAME = TARGET_NAME;
17
+ }
@@ -0,0 +1 @@
1
+ export * from './ts'
@@ -0,0 +1,36 @@
1
+ {
2
+ "apiType": "stageMode",
3
+ "buildOption": {
4
+ "resOptions": {
5
+ "copyCodeResource": {
6
+ "enable": false
7
+ }
8
+ }
9
+ },
10
+ "buildOptionSet": [
11
+ {
12
+ "name": "release",
13
+ "arkOptions": {
14
+ "obfuscation": {
15
+ "ruleOptions": {
16
+ "enable": false,
17
+ "files": [
18
+ "./obfuscation-rules.txt"
19
+ ]
20
+ },
21
+ "consumerFiles": [
22
+ "./consumer-rules.txt"
23
+ ]
24
+ }
25
+ },
26
+ },
27
+ ],
28
+ "targets": [
29
+ {
30
+ "name": "default"
31
+ },
32
+ {
33
+ "name": "ohosTest"
34
+ }
35
+ ]
36
+ }
@@ -0,0 +1,6 @@
1
+ import { harTasks } from '@ohos/hvigor-ohos-plugin';
2
+
3
+ export default {
4
+ system: harTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
5
+ plugins: [] /* Custom plugin to extend the functionality of Hvigor. */
6
+ }
@@ -0,0 +1,23 @@
1
+ # Define project specific obfuscation rules here.
2
+ # You can include the obfuscation configuration files in the current module's build-profile.json5.
3
+ #
4
+ # For more details, see
5
+ # https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/source-obfuscation-V5
6
+
7
+ # Obfuscation options:
8
+ # -disable-obfuscation: disable all obfuscations
9
+ # -enable-property-obfuscation: obfuscate the property names
10
+ # -enable-toplevel-obfuscation: obfuscate the names in the global scope
11
+ # -compact: remove unnecessary blank spaces and all line feeds
12
+ # -remove-log: remove all console.* statements
13
+ # -print-namecache: print the name cache that contains the mapping from the old names to new names
14
+ # -apply-namecache: reuse the given cache file
15
+
16
+ # Keep options:
17
+ # -keep-property-name: specifies property names that you want to keep
18
+ # -keep-global-name: specifies names that you want to keep in the global scope
19
+
20
+ -enable-property-obfuscation
21
+ -enable-toplevel-obfuscation
22
+ -enable-filename-obfuscation
23
+ -enable-export-obfuscation
@@ -0,0 +1,38 @@
1
+ {
2
+ "meta": {
3
+ "stableOrder": true,
4
+ "enableUnifiedLockfile": false
5
+ },
6
+ "lockfileVersion": 3,
7
+ "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
8
+ "specifiers": {
9
+ "@getui/gtc@../oh_modules/.ohpm/@getui+ido@zkoyyirssaxz8gef8vqhhop3efu+q3r1jbt0qr5k6hs=/oh_modules/@getui/ido/libs/GTC-HM-1.0.5.har": "@getui/gtc@../oh_modules/.ohpm/@getui+ido@zkoyyirssaxz8gef8vqhhop3efu+q3r1jbt0qr5k6hs=/oh_modules/@getui/ido/libs/GTC-HM-1.0.5.har",
10
+ "@getui/ido@libs/getui_ido_1.0.1.har": "@getui/ido@libs/getui_ido_1.0.1.har",
11
+ "@rnoh/react-native-openharmony@0.72.90": "@rnoh/react-native-openharmony@0.72.90"
12
+ },
13
+ "packages": {
14
+ "@getui/gtc@../oh_modules/.ohpm/@getui+ido@zkoyyirssaxz8gef8vqhhop3efu+q3r1jbt0qr5k6hs=/oh_modules/@getui/ido/libs/GTC-HM-1.0.5.har": {
15
+ "name": "@getui/gtc",
16
+ "version": "1.0.5",
17
+ "resolved": "../oh_modules/.ohpm/@getui+ido@zkoyyirssaxz8gef8vqhhop3efu+q3r1jbt0qr5k6hs=/oh_modules/@getui/ido/libs/GTC-HM-1.0.5.har",
18
+ "registryType": "local"
19
+ },
20
+ "@getui/ido@libs/getui_ido_1.0.1.har": {
21
+ "name": "",
22
+ "version": "1.0.1",
23
+ "integrity": "",
24
+ "resolved": "",
25
+ "registryType": "local",
26
+ "dependencies": {
27
+ "@getui/gtc": "file:./libs/GTC-HM-1.0.5.har"
28
+ }
29
+ },
30
+ "@rnoh/react-native-openharmony@0.72.90": {
31
+ "name": "",
32
+ "version": "0.72.90",
33
+ "integrity": "sha512-15mpPRjzAWad/qTzQasUmKEvQi+FVnrjnduxam7YjOMI8+NNGuF5Srx0B/71KX3hyQTROUlwnUWUdMhfsQ/olw==",
34
+ "resolved": "https://repo.harmonyos.com/ohpm/@rnoh/react-native-openharmony/-/react-native-openharmony-0.72.90.har",
35
+ "registryType": "ohpm"
36
+ }
37
+ }
38
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "IdoOhosSdk",
3
+ "version": "1.0.0",
4
+ "description": "Please describe the basic information.",
5
+ "main": "Index.ets",
6
+ "author": "",
7
+ "license": "Apache-2.0",
8
+ "dependencies": {
9
+ "@rnoh/react-native-openharmony": "0.72.90",
10
+ "@getui/ido": "file:./libs/getui_ido_1.0.1.har"
11
+ }
12
+ }
@@ -0,0 +1,7 @@
1
+ cmake_minimum_required(VERSION 3.4.1)
2
+ set(CMAKE_VERBOSE_MAKEFILE on)
3
+
4
+ file(GLOB rnoh_ido_SRC CONFIGURE_DEPENDS *.cpp)
5
+ add_library(rnoh_ido SHARED ${rnoh_ido_SRC})
6
+ target_include_directories(rnoh_ido PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
7
+ target_link_libraries(rnoh_ido PUBLIC rnoh)
@@ -0,0 +1,38 @@
1
+ /**
2
+ * This code was generated by "react-native codegen-harmony"
3
+ *
4
+ * Do not edit this file as changes may cause incorrect behavior and will be
5
+ * lost once the code is regenerated.
6
+ *
7
+ * @generatorVersion: 1
8
+ */
9
+
10
+
11
+ #include "IdoModule.h"
12
+
13
+ namespace rnoh {
14
+ using namespace facebook;
15
+
16
+ IdoModule::IdoModule(const ArkTSTurboModule::Context ctx, const std::string name) : ArkTSTurboModule(ctx, name) {
17
+ methodMap_ = {
18
+ ARK_METHOD_METADATA(startSdk, 2),
19
+ ARK_METHOD_METADATA(gtcid, 1),
20
+ ARK_METHOD_METADATA(version, 1),
21
+ ARK_METHOD_METADATA(setDebugEnable, 1),
22
+ ARK_METHOD_METADATA(setSessionTime, 1),
23
+ ARK_METHOD_METADATA(setMinAppActiveDuration, 1),
24
+ ARK_METHOD_METADATA(setMaxAppActiveDuration, 1),
25
+ ARK_METHOD_METADATA(setEventUploadInterval, 1),
26
+ ARK_METHOD_METADATA(setEventForceUploadSize, 1),
27
+ ARK_METHOD_METADATA(setProfileUploadInterval, 1),
28
+ ARK_METHOD_METADATA(setProfileForceUploadSize, 1),
29
+ ARK_METHOD_METADATA(setUserId, 1),
30
+ ARK_METHOD_METADATA(trackCustomKeyValueEventBegin, 1),
31
+ ARK_METHOD_METADATA(trackCustomKeyValueEventEnd, 3),
32
+ ARK_METHOD_METADATA(trackCountEvent, 3),
33
+ ARK_METHOD_METADATA(setProfile, 2),
34
+ };
35
+ }
36
+
37
+ } // namespace rnoh
38
+
@@ -0,0 +1,21 @@
1
+ /**
2
+ * This code was generated by "react-native codegen-harmony"
3
+ *
4
+ * Do not edit this file as changes may cause incorrect behavior and will be
5
+ * lost once the code is regenerated.
6
+ *
7
+ * @generatorVersion: 1
8
+ */
9
+
10
+ #pragma once
11
+
12
+ #include "RNOH/ArkTSTurboModule.h"
13
+
14
+ namespace rnoh {
15
+
16
+ class JSI_EXPORT IdoModule : public ArkTSTurboModule {
17
+ public:
18
+ IdoModule(const ArkTSTurboModule::Context ctx, const std::string name);
19
+ };
20
+
21
+ } // namespace rnoh
@@ -0,0 +1,76 @@
1
+ /**
2
+ * This code was generated by "react-native codegen-harmony"
3
+ *
4
+ * Do not edit this file as changes may cause incorrect behavior and will be
5
+ * lost once the code is regenerated.
6
+ *
7
+ * @generatorVersion: 1
8
+ */
9
+
10
+ #pragma once
11
+
12
+ #include "RNOH/Package.h"
13
+ #include "RNOH/ArkTSTurboModule.h"
14
+ #include "IdoModule.h"
15
+
16
+ namespace rnoh {
17
+
18
+ class IdoPackageTurboModuleFactoryDelegate : public TurboModuleFactoryDelegate {
19
+ public:
20
+ SharedTurboModule createTurboModule(Context ctx, const std::string &name) const override {
21
+ if (name == "IdoModule") {
22
+ return std::make_shared<IdoModule>(ctx, name);
23
+ }
24
+ return nullptr;
25
+ };
26
+ };
27
+
28
+ class GeneratedEventEmitRequestHandler : public EventEmitRequestHandler {
29
+ public:
30
+ void handleEvent(Context const &ctx) override {
31
+ auto eventEmitter = ctx.shadowViewRegistry->getEventEmitter<facebook::react::EventEmitter>(ctx.tag);
32
+ auto componentName = ctx.shadowViewRegistry->getComponentName(ctx.tag);
33
+
34
+ if (eventEmitter == nullptr) {
35
+ return;
36
+ }
37
+
38
+ std::vector<std::string> supportedComponentNames = {
39
+ };
40
+
41
+ std::vector<std::string> supportedEventNames = {
42
+ };
43
+
44
+ if (std::find(supportedComponentNames.begin(), supportedComponentNames.end(), componentName) != supportedComponentNames.end() &&
45
+ std::find(supportedEventNames.begin(), supportedEventNames.end(), ctx.eventName) != supportedEventNames.end()) {
46
+ eventEmitter->dispatchEvent(ctx.eventName, ArkJS(ctx.env).getDynamic(ctx.payload));
47
+ }
48
+ }
49
+ };
50
+
51
+ class IdoPackage : public Package {
52
+ public:
53
+ IdoPackage(Package::Context ctx) : Package(ctx){};
54
+
55
+ std::unique_ptr<TurboModuleFactoryDelegate> createTurboModuleFactoryDelegate() override {
56
+ return std::make_unique<IdoPackageTurboModuleFactoryDelegate>();
57
+ }
58
+
59
+ std::vector<facebook::react::ComponentDescriptorProvider> createComponentDescriptorProviders() override {
60
+ return {
61
+ };
62
+ }
63
+
64
+ ComponentJSIBinderByString createComponentJSIBinderByName() override {
65
+ return {
66
+ };
67
+ };
68
+
69
+ EventEmitRequestHandlers createEventEmitRequestHandlers() override {
70
+ return {
71
+ std::make_shared<GeneratedEventEmitRequestHandler>(),
72
+ };
73
+ }
74
+ };
75
+
76
+ } // namespace rnoh