@react-native-firebase/analytics 25.1.0 → 26.0.0

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 (60) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/RNFBAnalytics.podspec +9 -5
  3. package/android/build.gradle +19 -0
  4. package/android/src/reactnative/java/io/invertase/firebase/analytics/{ReactNativeFirebaseAnalyticsModule.java → NativeRNFBTurboAnalytics.java} +57 -19
  5. package/android/src/reactnative/java/io/invertase/firebase/analytics/ReactNativeFirebaseAnalyticsPackage.java +1 -1
  6. package/android/src/reactnative/java/io/invertase/firebase/analytics/generated/java/com/facebook/fbreact/specs/NativeRNFBTurboAnalyticsSpec.java +100 -0
  7. package/android/src/reactnative/java/io/invertase/firebase/analytics/generated/jni/CMakeLists.txt +36 -0
  8. package/android/src/reactnative/java/io/invertase/firebase/analytics/generated/jni/RNFBAnalyticsTurboModules-generated.cpp +122 -0
  9. package/android/src/reactnative/java/io/invertase/firebase/analytics/generated/jni/RNFBAnalyticsTurboModules.h +31 -0
  10. package/android/src/reactnative/java/io/invertase/firebase/analytics/generated/jni/react/renderer/components/RNFBAnalyticsTurboModules/RNFBAnalyticsTurboModulesJSI-generated.cpp +131 -0
  11. package/android/src/reactnative/java/io/invertase/firebase/analytics/generated/jni/react/renderer/components/RNFBAnalyticsTurboModules/RNFBAnalyticsTurboModulesJSI.h +206 -0
  12. package/app.plugin.js +1 -1
  13. package/dist/module/index.js +965 -6
  14. package/dist/module/index.js.map +1 -1
  15. package/dist/module/types/analytics.js +1 -72
  16. package/dist/module/types/analytics.js.map +1 -1
  17. package/dist/module/version.js +1 -1
  18. package/dist/typescript/lib/index.d.ts +500 -4
  19. package/dist/typescript/lib/index.d.ts.map +1 -1
  20. package/dist/typescript/lib/types/analytics.d.ts +0 -103
  21. package/dist/typescript/lib/types/analytics.d.ts.map +1 -1
  22. package/dist/typescript/lib/types/internal.d.ts +1 -1
  23. package/dist/typescript/lib/types/internal.d.ts.map +1 -1
  24. package/dist/typescript/lib/version.d.ts +1 -1
  25. package/ios/RNFBAnalytics/RNFBAnalyticsModule.h +2 -2
  26. package/ios/RNFBAnalytics/{RNFBAnalyticsModule.m → RNFBAnalyticsModule.mm} +52 -66
  27. package/ios/RNFBAnalytics.xcodeproj/project.pbxproj +8 -8
  28. package/ios/generated/RCTAppDependencyProvider.h +25 -0
  29. package/ios/generated/RCTAppDependencyProvider.mm +55 -0
  30. package/ios/generated/RCTModulesConformingToProtocolsProvider.h +18 -0
  31. package/ios/generated/RCTModulesConformingToProtocolsProvider.mm +33 -0
  32. package/ios/generated/RCTThirdPartyComponentsProvider.h +16 -0
  33. package/ios/generated/RCTThirdPartyComponentsProvider.mm +23 -0
  34. package/ios/generated/RNFBAnalyticsTurboModules/RNFBAnalyticsTurboModules-generated.mm +144 -0
  35. package/ios/generated/RNFBAnalyticsTurboModules/RNFBAnalyticsTurboModules.h +108 -0
  36. package/ios/generated/RNFBAnalyticsTurboModulesJSI-generated.cpp +131 -0
  37. package/ios/generated/RNFBAnalyticsTurboModulesJSI.h +206 -0
  38. package/ios/generated/ReactAppDependencyProvider.podspec +34 -0
  39. package/lib/index.ts +1846 -7
  40. package/lib/types/analytics.ts +0 -118
  41. package/lib/types/internal.ts +1 -1
  42. package/lib/version.ts +1 -1
  43. package/package.json +30 -5
  44. package/plugin/build/app.plugin.d.ts +2 -0
  45. package/plugin/build/app.plugin.js +6 -0
  46. package/plugin/src/app.plugin.ts +3 -0
  47. package/plugin/tsconfig.tsbuildinfo +1 -1
  48. package/react-native.config.js +10 -0
  49. package/specs/NativeRNFBTurboAnalytics.ts +33 -0
  50. package/typedoc.json +2 -45
  51. package/dist/module/modular.js +0 -567
  52. package/dist/module/modular.js.map +0 -1
  53. package/dist/module/namespaced.js +0 -445
  54. package/dist/module/namespaced.js.map +0 -1
  55. package/dist/typescript/lib/modular.d.ts +0 -481
  56. package/dist/typescript/lib/modular.d.ts.map +0 -1
  57. package/dist/typescript/lib/namespaced.d.ts +0 -13
  58. package/dist/typescript/lib/namespaced.d.ts.map +0 -1
  59. package/lib/modular.ts +0 -1040
  60. package/lib/namespaced.ts +0 -915
package/CHANGELOG.md CHANGED
@@ -3,6 +3,35 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [26.0.0](https://github.com/invertase/react-native-firebase/compare/v25.1.0...v26.0.0) (2026-07-29)
7
+
8
+ ### ⚠ BREAKING CHANGES
9
+
10
+ - logEvent, initializeAppCheck, and initializeFirestore return
11
+ synchronously; remove await and .then() chains on these APIs.
12
+
13
+ * Analytics: align logEvent return type with firebase-js-sdk sync void.
14
+ * App Check: align initializeAppCheck with sync AppCheck return.
15
+ * Firestore: align initializeFirestore with sync Firestore return.
16
+ * Firestore: export aggregateFieldEqual for aggregate query parity.
17
+ * Remote Config: accept RemoteConfigOptions in getRemoteConfig.
18
+ * Remote Config: document native FetchStatus literals as intentional drift.
19
+ * Docs: add firebase-js-sdk API parity improvements to v26 migration guide.
20
+
21
+ - **analytics:** migrate analytics to TurboModules
22
+
23
+ - refactor!(types): align modular APIs with firebase-js-sdk sync signatures ([b42d1f7](https://github.com/invertase/react-native-firebase/commit/b42d1f7dd2629184e26ab71936ab1d47878d0f64))
24
+
25
+ ### Features
26
+
27
+ - **analytics:** migrate analytics to TurboModules ([5cc1c9c](https://github.com/invertase/react-native-firebase/commit/5cc1c9ca6a320cda3e4b5ba8497d81b2587722a3))
28
+
29
+ ### Bug Fixes
30
+
31
+ - add codegen verify and spec-native parity tests ([49d9f1b](https://github.com/invertase/react-native-firebase/commit/49d9f1baba4fc83c1dd4983f582bbd7352d78809))
32
+ - correct links in skill / single isBoolean import ([cd77cc9](https://github.com/invertase/react-native-firebase/commit/cd77cc94a67df7ba26a95a0391bdc88f9150b84f))
33
+ - **ios:** set IPHONEOS_DEPLOYMENT_TARGET to 15.0, update platform support docs/conditionals ([#9108](https://github.com/invertase/react-native-firebase/issues/9108)) ([99d0899](https://github.com/invertase/react-native-firebase/commit/99d089908e3eec6155d73ecf05ff7274ad33c46e)), closes [#8882](https://github.com/invertase/react-native-firebase/issues/8882)
34
+
6
35
  ## [25.1.0](https://github.com/invertase/react-native-firebase/compare/v25.0.1...v25.1.0) (2026-06-25)
7
36
 
8
37
  **Note:** Version bump only for package @react-native-firebase/analytics
@@ -28,15 +28,19 @@ Pod::Spec.new do |s|
28
28
  s.macos.deployment_target = firebase_macos_target
29
29
  s.tvos.deployment_target = firebase_tvos_target
30
30
  s.source_files = 'ios/**/*.{h,m,mm,cpp,swift}'
31
+ s.private_header_files = "ios/**/*.h"
32
+ s.exclude_files = 'ios/generated/RCTThirdPartyComponentsProvider.*', 'ios/generated/RCTAppDependencyProvider.*', 'ios/generated/RCTModuleProviders.*', 'ios/generated/RCTModulesConformingToProtocolsProvider.*', 'ios/generated/RCTUnstableModulesRequiringMainQueueSetupProvider.*'
31
33
  s.swift_version = '5.0'
34
+ s.pod_target_xcconfig = {
35
+ "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ios/generated/RNFBAnalyticsTurboModules\" \"$(PODS_TARGET_SRCROOT)/ios/generated\"",
36
+ }
32
37
 
33
38
  s.dependency 'RNFBApp'
34
39
 
35
- # React Native dependencies
36
- if defined?(install_modules_dependencies()) != nil
37
- install_modules_dependencies(s);
38
- else
39
- s.dependency "React-Core"
40
+ install_modules_dependencies(s);
41
+
42
+ if defined?(ENV["RCT_NEW_ARCH_ENABLED"]) != nil && (ENV["RCT_NEW_ARCH_ENABLED"] == '0')
43
+ raise "#{s.name} requires New Architecture. Enable New Architecture to use this module"
40
44
  end
41
45
 
42
46
  if defined?($FirebaseSDKVersion)
@@ -156,6 +156,7 @@ android {
156
156
  sourceSets {
157
157
  main {
158
158
  java.srcDirs = ['src/main/java', 'src/reactnative/java']
159
+ java.excludes = ['**/generated/jni/**']
159
160
  }
160
161
  }
161
162
  }
@@ -175,3 +176,21 @@ ReactNative.shared.applyPackageVersion()
175
176
  ReactNative.shared.applyDefaultExcludes()
176
177
  ReactNative.module.applyAndroidVersions()
177
178
  ReactNative.module.applyReactNativeDependency("api")
179
+
180
+ def isNewArchitectureDisabled() {
181
+ return project.hasProperty("newArchEnabled") && project.newArchEnabled != "true"
182
+ }
183
+
184
+ if (isNewArchitectureDisabled()) {
185
+ def ANSI_RED = "\u001B[31m";
186
+ def ANSI_RESET = "\u001B[0m";
187
+
188
+ println("\n\n\n")
189
+ println(ANSI_RED + "**************************************************************************************************************")
190
+ println("\n\n\n")
191
+ println("New Architecture support is required for @react-native-firebase/analytics")
192
+ println("\n\n\n")
193
+ println("**************************************************************************************************************" + ANSI_RESET)
194
+ println("\n\n\n")
195
+ System.exit(1)
196
+ }
@@ -17,22 +17,23 @@ package io.invertase.firebase.analytics;
17
17
  *
18
18
  */
19
19
 
20
+ import static io.invertase.firebase.common.ReactNativeFirebaseModule.rejectPromiseWithExceptionMap;
21
+
20
22
  import android.os.Bundle;
21
23
  import android.os.Handler;
22
24
  import android.os.Looper;
25
+ import com.facebook.fbreact.specs.NativeRNFBTurboAnalyticsSpec;
23
26
  import com.facebook.react.bridge.Arguments;
24
27
  import com.facebook.react.bridge.Promise;
25
28
  import com.facebook.react.bridge.ReactApplicationContext;
26
- import com.facebook.react.bridge.ReactMethod;
27
29
  import com.facebook.react.bridge.ReadableMap;
28
30
  import com.google.firebase.analytics.FirebaseAnalytics;
29
- import io.invertase.firebase.common.ReactNativeFirebaseModule;
30
31
  import java.util.ArrayList;
31
32
  import java.util.Locale;
32
33
  import java.util.concurrent.atomic.AtomicBoolean;
33
34
  import javax.annotation.Nullable;
34
35
 
35
- public class ReactNativeFirebaseAnalyticsModule extends ReactNativeFirebaseModule {
36
+ public class NativeRNFBTurboAnalytics extends NativeRNFBTurboAnalyticsSpec {
36
37
  private static final String SERVICE_NAME = "Analytics";
37
38
  private static final long GET_SESSION_ID_TIMEOUT_MS = 60_000L;
38
39
 
@@ -53,12 +54,12 @@ public class ReactNativeFirebaseAnalyticsModule extends ReactNativeFirebaseModul
53
54
 
54
55
  private final UniversalFirebaseAnalyticsModule module;
55
56
 
56
- ReactNativeFirebaseAnalyticsModule(ReactApplicationContext reactContext) {
57
- super(reactContext, SERVICE_NAME);
57
+ public NativeRNFBTurboAnalytics(ReactApplicationContext reactContext) {
58
+ super(reactContext);
58
59
  module = new UniversalFirebaseAnalyticsModule(reactContext, SERVICE_NAME);
59
60
  }
60
61
 
61
- @ReactMethod
62
+ @Override
62
63
  public void logEvent(String name, @Nullable ReadableMap params, Promise promise) {
63
64
  module
64
65
  .logEvent(name, toBundle(params))
@@ -72,8 +73,8 @@ public class ReactNativeFirebaseAnalyticsModule extends ReactNativeFirebaseModul
72
73
  });
73
74
  }
74
75
 
75
- @ReactMethod
76
- public void setAnalyticsCollectionEnabled(Boolean enabled, Promise promise) {
76
+ @Override
77
+ public void setAnalyticsCollectionEnabled(boolean enabled, Promise promise) {
77
78
  module
78
79
  .setAnalyticsCollectionEnabled(enabled)
79
80
  .addOnCompleteListener(
@@ -86,7 +87,7 @@ public class ReactNativeFirebaseAnalyticsModule extends ReactNativeFirebaseModul
86
87
  });
87
88
  }
88
89
 
89
- @ReactMethod
90
+ @Override
90
91
  public void setSessionTimeoutDuration(double milliseconds, Promise promise) {
91
92
  module
92
93
  .setSessionTimeoutDuration((long) milliseconds)
@@ -100,7 +101,7 @@ public class ReactNativeFirebaseAnalyticsModule extends ReactNativeFirebaseModul
100
101
  });
101
102
  }
102
103
 
103
- @ReactMethod
104
+ @Override
104
105
  public void getAppInstanceId(Promise promise) {
105
106
  module
106
107
  .getAppInstanceId()
@@ -114,7 +115,7 @@ public class ReactNativeFirebaseAnalyticsModule extends ReactNativeFirebaseModul
114
115
  });
115
116
  }
116
117
 
117
- @ReactMethod
118
+ @Override
118
119
  public void getSessionId(Promise promise) {
119
120
  final AtomicBoolean completed = new AtomicBoolean(false);
120
121
  final Handler handler = new Handler(Looper.getMainLooper());
@@ -143,8 +144,8 @@ public class ReactNativeFirebaseAnalyticsModule extends ReactNativeFirebaseModul
143
144
  });
144
145
  }
145
146
 
146
- @ReactMethod
147
- public void setUserId(String id, Promise promise) {
147
+ @Override
148
+ public void setUserId(@Nullable String id, Promise promise) {
148
149
  module
149
150
  .setUserId(id)
150
151
  .addOnCompleteListener(
@@ -157,8 +158,8 @@ public class ReactNativeFirebaseAnalyticsModule extends ReactNativeFirebaseModul
157
158
  });
158
159
  }
159
160
 
160
- @ReactMethod
161
- public void setUserProperty(String name, String value, Promise promise) {
161
+ @Override
162
+ public void setUserProperty(String name, @Nullable String value, Promise promise) {
162
163
  module
163
164
  .setUserProperty(name, value)
164
165
  .addOnCompleteListener(
@@ -171,7 +172,7 @@ public class ReactNativeFirebaseAnalyticsModule extends ReactNativeFirebaseModul
171
172
  });
172
173
  }
173
174
 
174
- @ReactMethod
175
+ @Override
175
176
  public void setUserProperties(ReadableMap properties, Promise promise) {
176
177
  module
177
178
  .setUserProperties(Arguments.toBundle(properties))
@@ -185,7 +186,7 @@ public class ReactNativeFirebaseAnalyticsModule extends ReactNativeFirebaseModul
185
186
  });
186
187
  }
187
188
 
188
- @ReactMethod
189
+ @Override
189
190
  public void resetAnalyticsData(Promise promise) {
190
191
  module
191
192
  .resetAnalyticsData()
@@ -199,7 +200,7 @@ public class ReactNativeFirebaseAnalyticsModule extends ReactNativeFirebaseModul
199
200
  });
200
201
  }
201
202
 
202
- @ReactMethod
203
+ @Override
203
204
  public void setDefaultEventParameters(@Nullable ReadableMap params, Promise promise) {
204
205
  module
205
206
  .setDefaultEventParameters(toBundle(params))
@@ -213,7 +214,7 @@ public class ReactNativeFirebaseAnalyticsModule extends ReactNativeFirebaseModul
213
214
  });
214
215
  }
215
216
 
216
- @ReactMethod
217
+ @Override
217
218
  public void setConsent(ReadableMap consentSettings, Promise promise) {
218
219
  module
219
220
  .setConsent(Arguments.toBundle(consentSettings))
@@ -227,6 +228,43 @@ public class ReactNativeFirebaseAnalyticsModule extends ReactNativeFirebaseModul
227
228
  });
228
229
  }
229
230
 
231
+ @Override
232
+ public void logTransaction(String transactionId, Promise promise) {
233
+ promise.reject("platform-unsupported", "logTransaction is only supported on iOS");
234
+ }
235
+
236
+ @Override
237
+ public void initiateOnDeviceConversionMeasurementWithEmailAddress(
238
+ String emailAddress, Promise promise) {
239
+ promise.reject(
240
+ "platform-unsupported",
241
+ "initiateOnDeviceConversionMeasurementWithEmailAddress is only supported on iOS");
242
+ }
243
+
244
+ @Override
245
+ public void initiateOnDeviceConversionMeasurementWithHashedEmailAddress(
246
+ String hashedEmailAddress, Promise promise) {
247
+ promise.reject(
248
+ "platform-unsupported",
249
+ "initiateOnDeviceConversionMeasurementWithHashedEmailAddress is only supported on iOS");
250
+ }
251
+
252
+ @Override
253
+ public void initiateOnDeviceConversionMeasurementWithPhoneNumber(
254
+ String phoneNumber, Promise promise) {
255
+ promise.reject(
256
+ "platform-unsupported",
257
+ "initiateOnDeviceConversionMeasurementWithPhoneNumber is only supported on iOS");
258
+ }
259
+
260
+ @Override
261
+ public void initiateOnDeviceConversionMeasurementWithHashedPhoneNumber(
262
+ String hashedPhoneNumber, Promise promise) {
263
+ promise.reject(
264
+ "platform-unsupported",
265
+ "initiateOnDeviceConversionMeasurementWithHashedPhoneNumber is only supported on iOS");
266
+ }
267
+
230
268
  private Bundle toBundle(ReadableMap readableMap) {
231
269
  Bundle bundle = Arguments.toBundle(readableMap);
232
270
  if (bundle == null) {
@@ -30,7 +30,7 @@ public class ReactNativeFirebaseAnalyticsPackage implements ReactPackage {
30
30
  @Override
31
31
  public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
32
32
  List<NativeModule> modules = new ArrayList<>();
33
- modules.add(new ReactNativeFirebaseAnalyticsModule(reactContext));
33
+ modules.add(new NativeRNFBTurboAnalytics(reactContext));
34
34
  return modules;
35
35
  }
36
36
 
@@ -0,0 +1,100 @@
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: GenerateModuleJavaSpec.js
9
+ *
10
+ * @nolint
11
+ */
12
+
13
+ package com.facebook.fbreact.specs;
14
+
15
+ import com.facebook.proguard.annotations.DoNotStrip;
16
+ import com.facebook.react.bridge.Promise;
17
+ import com.facebook.react.bridge.ReactApplicationContext;
18
+ import com.facebook.react.bridge.ReactContextBaseJavaModule;
19
+ import com.facebook.react.bridge.ReactMethod;
20
+ import com.facebook.react.bridge.ReadableMap;
21
+ import com.facebook.react.turbomodule.core.interfaces.TurboModule;
22
+ import javax.annotation.Nonnull;
23
+ import javax.annotation.Nullable;
24
+
25
+ public abstract class NativeRNFBTurboAnalyticsSpec extends ReactContextBaseJavaModule implements TurboModule {
26
+ public static final String NAME = "NativeRNFBTurboAnalytics";
27
+
28
+ public NativeRNFBTurboAnalyticsSpec(ReactApplicationContext reactContext) {
29
+ super(reactContext);
30
+ }
31
+
32
+ @Override
33
+ public @Nonnull String getName() {
34
+ return NAME;
35
+ }
36
+
37
+ @ReactMethod
38
+ @DoNotStrip
39
+ public abstract void logEvent(String name, @Nullable ReadableMap params, Promise promise);
40
+
41
+ @ReactMethod
42
+ @DoNotStrip
43
+ public abstract void setAnalyticsCollectionEnabled(boolean enabled, Promise promise);
44
+
45
+ @ReactMethod
46
+ @DoNotStrip
47
+ public abstract void setSessionTimeoutDuration(double milliseconds, Promise promise);
48
+
49
+ @ReactMethod
50
+ @DoNotStrip
51
+ public abstract void getAppInstanceId(Promise promise);
52
+
53
+ @ReactMethod
54
+ @DoNotStrip
55
+ public abstract void getSessionId(Promise promise);
56
+
57
+ @ReactMethod
58
+ @DoNotStrip
59
+ public abstract void setUserId(@Nullable String id, Promise promise);
60
+
61
+ @ReactMethod
62
+ @DoNotStrip
63
+ public abstract void setUserProperty(String name, @Nullable String value, Promise promise);
64
+
65
+ @ReactMethod
66
+ @DoNotStrip
67
+ public abstract void setUserProperties(ReadableMap properties, Promise promise);
68
+
69
+ @ReactMethod
70
+ @DoNotStrip
71
+ public abstract void resetAnalyticsData(Promise promise);
72
+
73
+ @ReactMethod
74
+ @DoNotStrip
75
+ public abstract void setDefaultEventParameters(@Nullable ReadableMap params, Promise promise);
76
+
77
+ @ReactMethod
78
+ @DoNotStrip
79
+ public abstract void setConsent(ReadableMap consentSettings, Promise promise);
80
+
81
+ @ReactMethod
82
+ @DoNotStrip
83
+ public abstract void logTransaction(String transactionId, Promise promise);
84
+
85
+ @ReactMethod
86
+ @DoNotStrip
87
+ public abstract void initiateOnDeviceConversionMeasurementWithEmailAddress(String emailAddress, Promise promise);
88
+
89
+ @ReactMethod
90
+ @DoNotStrip
91
+ public abstract void initiateOnDeviceConversionMeasurementWithHashedEmailAddress(String hashedEmailAddress, Promise promise);
92
+
93
+ @ReactMethod
94
+ @DoNotStrip
95
+ public abstract void initiateOnDeviceConversionMeasurementWithPhoneNumber(String phoneNumber, Promise promise);
96
+
97
+ @ReactMethod
98
+ @DoNotStrip
99
+ public abstract void initiateOnDeviceConversionMeasurementWithHashedPhoneNumber(String hashedPhoneNumber, Promise promise);
100
+ }
@@ -0,0 +1,36 @@
1
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2
+ #
3
+ # This source code is licensed under the MIT license found in the
4
+ # LICENSE file in the root directory of this source tree.
5
+
6
+ cmake_minimum_required(VERSION 3.13)
7
+ set(CMAKE_VERBOSE_MAKEFILE on)
8
+
9
+ file(GLOB react_codegen_SRCS CONFIGURE_DEPENDS *.cpp react/renderer/components/RNFBAnalyticsTurboModules/*.cpp)
10
+
11
+ add_library(
12
+ react_codegen_RNFBAnalyticsTurboModules
13
+ OBJECT
14
+ ${react_codegen_SRCS}
15
+ )
16
+
17
+ target_include_directories(react_codegen_RNFBAnalyticsTurboModules PUBLIC . react/renderer/components/RNFBAnalyticsTurboModules)
18
+
19
+ target_link_libraries(
20
+ react_codegen_RNFBAnalyticsTurboModules
21
+ fbjni
22
+ jsi
23
+ # We need to link different libraries based on whether we are building rncore or not, that's necessary
24
+ # because we want to break a circular dependency between react_codegen_rncore and reactnative
25
+ reactnative
26
+ )
27
+
28
+ target_compile_options(
29
+ react_codegen_RNFBAnalyticsTurboModules
30
+ PRIVATE
31
+ -DLOG_TAG=\"ReactNative\"
32
+ -fexceptions
33
+ -frtti
34
+ -std=c++20
35
+ -Wall
36
+ )
@@ -0,0 +1,122 @@
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: GenerateModuleJniCpp.js
9
+ */
10
+
11
+ #include "RNFBAnalyticsTurboModules.h"
12
+
13
+ namespace facebook::react {
14
+
15
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboAnalyticsSpecJSI_logEvent(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
16
+ static jmethodID cachedMethodId = nullptr;
17
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "logEvent", "(Ljava/lang/String;Lcom/facebook/react/bridge/ReadableMap;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
18
+ }
19
+
20
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboAnalyticsSpecJSI_setAnalyticsCollectionEnabled(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
21
+ static jmethodID cachedMethodId = nullptr;
22
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "setAnalyticsCollectionEnabled", "(ZLcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
23
+ }
24
+
25
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboAnalyticsSpecJSI_setSessionTimeoutDuration(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
26
+ static jmethodID cachedMethodId = nullptr;
27
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "setSessionTimeoutDuration", "(DLcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
28
+ }
29
+
30
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboAnalyticsSpecJSI_getAppInstanceId(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
31
+ static jmethodID cachedMethodId = nullptr;
32
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "getAppInstanceId", "(Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
33
+ }
34
+
35
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboAnalyticsSpecJSI_getSessionId(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
36
+ static jmethodID cachedMethodId = nullptr;
37
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "getSessionId", "(Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
38
+ }
39
+
40
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboAnalyticsSpecJSI_setUserId(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
41
+ static jmethodID cachedMethodId = nullptr;
42
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "setUserId", "(Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
43
+ }
44
+
45
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboAnalyticsSpecJSI_setUserProperty(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
46
+ static jmethodID cachedMethodId = nullptr;
47
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "setUserProperty", "(Ljava/lang/String;Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
48
+ }
49
+
50
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboAnalyticsSpecJSI_setUserProperties(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
51
+ static jmethodID cachedMethodId = nullptr;
52
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "setUserProperties", "(Lcom/facebook/react/bridge/ReadableMap;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
53
+ }
54
+
55
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboAnalyticsSpecJSI_resetAnalyticsData(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
56
+ static jmethodID cachedMethodId = nullptr;
57
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "resetAnalyticsData", "(Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
58
+ }
59
+
60
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboAnalyticsSpecJSI_setDefaultEventParameters(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
61
+ static jmethodID cachedMethodId = nullptr;
62
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "setDefaultEventParameters", "(Lcom/facebook/react/bridge/ReadableMap;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
63
+ }
64
+
65
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboAnalyticsSpecJSI_setConsent(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
66
+ static jmethodID cachedMethodId = nullptr;
67
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "setConsent", "(Lcom/facebook/react/bridge/ReadableMap;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
68
+ }
69
+
70
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboAnalyticsSpecJSI_logTransaction(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
71
+ static jmethodID cachedMethodId = nullptr;
72
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "logTransaction", "(Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
73
+ }
74
+
75
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboAnalyticsSpecJSI_initiateOnDeviceConversionMeasurementWithEmailAddress(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
76
+ static jmethodID cachedMethodId = nullptr;
77
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "initiateOnDeviceConversionMeasurementWithEmailAddress", "(Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
78
+ }
79
+
80
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboAnalyticsSpecJSI_initiateOnDeviceConversionMeasurementWithHashedEmailAddress(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
81
+ static jmethodID cachedMethodId = nullptr;
82
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "initiateOnDeviceConversionMeasurementWithHashedEmailAddress", "(Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
83
+ }
84
+
85
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboAnalyticsSpecJSI_initiateOnDeviceConversionMeasurementWithPhoneNumber(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
86
+ static jmethodID cachedMethodId = nullptr;
87
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "initiateOnDeviceConversionMeasurementWithPhoneNumber", "(Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
88
+ }
89
+
90
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboAnalyticsSpecJSI_initiateOnDeviceConversionMeasurementWithHashedPhoneNumber(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
91
+ static jmethodID cachedMethodId = nullptr;
92
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "initiateOnDeviceConversionMeasurementWithHashedPhoneNumber", "(Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
93
+ }
94
+
95
+ NativeRNFBTurboAnalyticsSpecJSI::NativeRNFBTurboAnalyticsSpecJSI(const JavaTurboModule::InitParams &params)
96
+ : JavaTurboModule(params) {
97
+ methodMap_["logEvent"] = MethodMetadata {2, __hostFunction_NativeRNFBTurboAnalyticsSpecJSI_logEvent};
98
+ methodMap_["setAnalyticsCollectionEnabled"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboAnalyticsSpecJSI_setAnalyticsCollectionEnabled};
99
+ methodMap_["setSessionTimeoutDuration"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboAnalyticsSpecJSI_setSessionTimeoutDuration};
100
+ methodMap_["getAppInstanceId"] = MethodMetadata {0, __hostFunction_NativeRNFBTurboAnalyticsSpecJSI_getAppInstanceId};
101
+ methodMap_["getSessionId"] = MethodMetadata {0, __hostFunction_NativeRNFBTurboAnalyticsSpecJSI_getSessionId};
102
+ methodMap_["setUserId"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboAnalyticsSpecJSI_setUserId};
103
+ methodMap_["setUserProperty"] = MethodMetadata {2, __hostFunction_NativeRNFBTurboAnalyticsSpecJSI_setUserProperty};
104
+ methodMap_["setUserProperties"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboAnalyticsSpecJSI_setUserProperties};
105
+ methodMap_["resetAnalyticsData"] = MethodMetadata {0, __hostFunction_NativeRNFBTurboAnalyticsSpecJSI_resetAnalyticsData};
106
+ methodMap_["setDefaultEventParameters"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboAnalyticsSpecJSI_setDefaultEventParameters};
107
+ methodMap_["setConsent"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboAnalyticsSpecJSI_setConsent};
108
+ methodMap_["logTransaction"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboAnalyticsSpecJSI_logTransaction};
109
+ methodMap_["initiateOnDeviceConversionMeasurementWithEmailAddress"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboAnalyticsSpecJSI_initiateOnDeviceConversionMeasurementWithEmailAddress};
110
+ methodMap_["initiateOnDeviceConversionMeasurementWithHashedEmailAddress"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboAnalyticsSpecJSI_initiateOnDeviceConversionMeasurementWithHashedEmailAddress};
111
+ methodMap_["initiateOnDeviceConversionMeasurementWithPhoneNumber"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboAnalyticsSpecJSI_initiateOnDeviceConversionMeasurementWithPhoneNumber};
112
+ methodMap_["initiateOnDeviceConversionMeasurementWithHashedPhoneNumber"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboAnalyticsSpecJSI_initiateOnDeviceConversionMeasurementWithHashedPhoneNumber};
113
+ }
114
+
115
+ std::shared_ptr<TurboModule> RNFBAnalyticsTurboModules_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams &params) {
116
+ if (moduleName == "NativeRNFBTurboAnalytics") {
117
+ return std::make_shared<NativeRNFBTurboAnalyticsSpecJSI>(params);
118
+ }
119
+ return nullptr;
120
+ }
121
+
122
+ } // namespace facebook::react
@@ -0,0 +1,31 @@
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: GenerateModuleJniH.js
9
+ */
10
+
11
+ #pragma once
12
+
13
+ #include <ReactCommon/JavaTurboModule.h>
14
+ #include <ReactCommon/TurboModule.h>
15
+ #include <jsi/jsi.h>
16
+
17
+ namespace facebook::react {
18
+
19
+ /**
20
+ * JNI C++ class for module 'NativeRNFBTurboAnalytics'
21
+ */
22
+ class JSI_EXPORT NativeRNFBTurboAnalyticsSpecJSI : public JavaTurboModule {
23
+ public:
24
+ NativeRNFBTurboAnalyticsSpecJSI(const JavaTurboModule::InitParams &params);
25
+ };
26
+
27
+
28
+ JSI_EXPORT
29
+ std::shared_ptr<TurboModule> RNFBAnalyticsTurboModules_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams &params);
30
+
31
+ } // namespace facebook::react