@react-native-firebase/crashlytics 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 (66) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/RNFBCrashlytics.podspec +10 -6
  3. package/android/build.gradle +23 -0
  4. package/android/src/main/java/io/invertase/firebase/crashlytics/{ReactNativeFirebaseCrashlyticsModule.java → NativeRNFBTurboCrashlytics.java} +44 -39
  5. package/android/src/main/java/io/invertase/firebase/crashlytics/ReactNativeFirebaseCrashlyticsPackage.java +1 -1
  6. package/android/src/main/java/io/invertase/firebase/crashlytics/generated/java/com/facebook/fbreact/specs/NativeRNFBTurboCrashlyticsSpec.java +125 -0
  7. package/android/src/main/java/io/invertase/firebase/crashlytics/generated/jni/CMakeLists.txt +36 -0
  8. package/android/src/main/java/io/invertase/firebase/crashlytics/generated/jni/RNFBCrashlyticsTurboModules-generated.cpp +116 -0
  9. package/android/src/main/java/io/invertase/firebase/crashlytics/generated/jni/RNFBCrashlyticsTurboModules.h +31 -0
  10. package/android/src/main/java/io/invertase/firebase/crashlytics/generated/jni/react/renderer/components/RNFBCrashlyticsTurboModules/RNFBCrashlyticsTurboModulesJSI-generated.cpp +124 -0
  11. package/android/src/main/java/io/invertase/firebase/crashlytics/generated/jni/react/renderer/components/RNFBCrashlyticsTurboModules/RNFBCrashlyticsTurboModulesJSI.h +320 -0
  12. package/app.plugin.js +1 -1
  13. package/dist/module/handlers.js +7 -24
  14. package/dist/module/handlers.js.map +1 -1
  15. package/dist/module/index.js +125 -8
  16. package/dist/module/index.js.map +1 -1
  17. package/dist/module/types/crashlytics.js +1 -40
  18. package/dist/module/types/crashlytics.js.map +1 -1
  19. package/dist/module/types/internal.js +4 -0
  20. package/dist/module/types/internal.js.map +1 -0
  21. package/dist/module/version.js +1 -1
  22. package/dist/typescript/lib/handlers.d.ts.map +1 -1
  23. package/dist/typescript/lib/index.d.ts +19 -4
  24. package/dist/typescript/lib/index.d.ts.map +1 -1
  25. package/dist/typescript/lib/types/crashlytics.d.ts +0 -21
  26. package/dist/typescript/lib/types/crashlytics.d.ts.map +1 -1
  27. package/dist/typescript/lib/types/internal.d.ts +44 -0
  28. package/dist/typescript/lib/types/internal.d.ts.map +1 -0
  29. package/dist/typescript/lib/version.d.ts +1 -1
  30. package/ios/RNFBCrashlytics/RNFBCrashlyticsModule.h +2 -3
  31. package/ios/RNFBCrashlytics/{RNFBCrashlyticsModule.m → RNFBCrashlyticsModule.mm} +64 -72
  32. package/ios/RNFBCrashlytics.xcodeproj/project.pbxproj +8 -8
  33. package/ios/generated/RCTAppDependencyProvider.h +25 -0
  34. package/ios/generated/RCTAppDependencyProvider.mm +55 -0
  35. package/ios/generated/RCTModulesConformingToProtocolsProvider.h +18 -0
  36. package/ios/generated/RCTModulesConformingToProtocolsProvider.mm +33 -0
  37. package/ios/generated/RCTThirdPartyComponentsProvider.h +16 -0
  38. package/ios/generated/RCTThirdPartyComponentsProvider.mm +23 -0
  39. package/ios/generated/RNFBCrashlyticsTurboModules/RNFBCrashlyticsTurboModules-generated.mm +148 -0
  40. package/ios/generated/RNFBCrashlyticsTurboModules/RNFBCrashlyticsTurboModules.h +214 -0
  41. package/ios/generated/RNFBCrashlyticsTurboModulesJSI-generated.cpp +124 -0
  42. package/ios/generated/RNFBCrashlyticsTurboModulesJSI.h +320 -0
  43. package/ios/generated/ReactAppDependencyProvider.podspec +34 -0
  44. package/lib/handlers.ts +7 -26
  45. package/lib/index.ts +209 -7
  46. package/lib/types/crashlytics.ts +0 -30
  47. package/lib/types/internal.ts +59 -0
  48. package/lib/version.ts +1 -1
  49. package/package.json +30 -5
  50. package/plugin/build/app.plugin.d.ts +2 -0
  51. package/plugin/build/app.plugin.js +6 -0
  52. package/plugin/src/app.plugin.ts +3 -0
  53. package/plugin/tsconfig.tsbuildinfo +1 -1
  54. package/react-native.config.js +3 -28
  55. package/specs/NativeRNFBTurboCrashlytics.ts +41 -0
  56. package/typedoc.json +2 -3
  57. package/dist/module/modular.js +0 -241
  58. package/dist/module/modular.js.map +0 -1
  59. package/dist/module/namespaced.js +0 -135
  60. package/dist/module/namespaced.js.map +0 -1
  61. package/dist/typescript/lib/modular.d.ts +0 -193
  62. package/dist/typescript/lib/modular.d.ts.map +0 -1
  63. package/dist/typescript/lib/namespaced.d.ts +0 -12
  64. package/dist/typescript/lib/namespaced.d.ts.map +0 -1
  65. package/lib/modular.ts +0 -249
  66. package/lib/namespaced.ts +0 -206
@@ -0,0 +1,18 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #import <Foundation/Foundation.h>
9
+
10
+ @interface RCTModulesConformingToProtocolsProvider: NSObject
11
+
12
+ +(NSArray<NSString *> *)imageURLLoaderClassNames;
13
+
14
+ +(NSArray<NSString *> *)imageDataDecoderClassNames;
15
+
16
+ +(NSArray<NSString *> *)URLRequestHandlerClassNames;
17
+
18
+ @end
@@ -0,0 +1,33 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #import "RCTModulesConformingToProtocolsProvider.h"
9
+
10
+ @implementation RCTModulesConformingToProtocolsProvider
11
+
12
+ +(NSArray<NSString *> *)imageURLLoaderClassNames
13
+ {
14
+ return @[
15
+
16
+ ];
17
+ }
18
+
19
+ +(NSArray<NSString *> *)imageDataDecoderClassNames
20
+ {
21
+ return @[
22
+
23
+ ];
24
+ }
25
+
26
+ +(NSArray<NSString *> *)URLRequestHandlerClassNames
27
+ {
28
+ return @[
29
+
30
+ ];
31
+ }
32
+
33
+ @end
@@ -0,0 +1,16 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #import <Foundation/Foundation.h>
9
+
10
+ @protocol RCTComponentViewProtocol;
11
+
12
+ @interface RCTThirdPartyComponentsProvider: NSObject
13
+
14
+ + (NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents;
15
+
16
+ @end
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+
9
+ #import <Foundation/Foundation.h>
10
+
11
+ #import "RCTThirdPartyComponentsProvider.h"
12
+ #import <React/RCTComponentViewProtocol.h>
13
+
14
+ @implementation RCTThirdPartyComponentsProvider
15
+
16
+ + (NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents
17
+ {
18
+ return @{
19
+
20
+ };
21
+ }
22
+
23
+ @end
@@ -0,0 +1,148 @@
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 "RNFBCrashlyticsTurboModules.h"
15
+
16
+
17
+ @implementation NativeRNFBTurboCrashlyticsSpecBase
18
+
19
+
20
+ - (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper
21
+ {
22
+ _eventEmitterCallback = std::move(eventEmitterCallbackWrapper->_eventEmitterCallback);
23
+ }
24
+ @end
25
+
26
+ @implementation RCTCxxConvert (NativeRNFBTurboCrashlytics_CrashlyticsStackFrame)
27
+ + (RCTManagedPointer *)JS_NativeRNFBTurboCrashlytics_CrashlyticsStackFrame:(id)json
28
+ {
29
+ return facebook::react::managedPointer<JS::NativeRNFBTurboCrashlytics::CrashlyticsStackFrame>(json);
30
+ }
31
+ @end
32
+ @implementation RCTCxxConvert (NativeRNFBTurboCrashlytics_JavaScriptErrorObject)
33
+ + (RCTManagedPointer *)JS_NativeRNFBTurboCrashlytics_JavaScriptErrorObject:(id)json
34
+ {
35
+ return facebook::react::managedPointer<JS::NativeRNFBTurboCrashlytics::JavaScriptErrorObject>(json);
36
+ }
37
+ @end
38
+ namespace facebook::react {
39
+
40
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboCrashlyticsSpecJSI_checkForUnsentReports(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
41
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "checkForUnsentReports", @selector(checkForUnsentReports:reject:), args, count);
42
+ }
43
+
44
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboCrashlyticsSpecJSI_crash(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
45
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "crash", @selector(crash), args, count);
46
+ }
47
+
48
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboCrashlyticsSpecJSI_crashWithStackPromise(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
49
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "crashWithStackPromise", @selector(crashWithStackPromise:resolve:reject:), args, count);
50
+ }
51
+
52
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboCrashlyticsSpecJSI_deleteUnsentReports(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
53
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "deleteUnsentReports", @selector(deleteUnsentReports:reject:), args, count);
54
+ }
55
+
56
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboCrashlyticsSpecJSI_didCrashOnPreviousExecution(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
57
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "didCrashOnPreviousExecution", @selector(didCrashOnPreviousExecution:reject:), args, count);
58
+ }
59
+
60
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboCrashlyticsSpecJSI_log(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
61
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "log", @selector(log:), args, count);
62
+ }
63
+
64
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboCrashlyticsSpecJSI_logPromise(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
65
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "logPromise", @selector(logPromise:resolve:reject:), args, count);
66
+ }
67
+
68
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboCrashlyticsSpecJSI_sendUnsentReports(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
69
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "sendUnsentReports", @selector(sendUnsentReports), args, count);
70
+ }
71
+
72
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboCrashlyticsSpecJSI_setAttribute(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
73
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "setAttribute", @selector(setAttribute:value:resolve:reject:), args, count);
74
+ }
75
+
76
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboCrashlyticsSpecJSI_setAttributes(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
77
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "setAttributes", @selector(setAttributes:resolve:reject:), args, count);
78
+ }
79
+
80
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboCrashlyticsSpecJSI_setUserId(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
81
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "setUserId", @selector(setUserId:resolve:reject:), args, count);
82
+ }
83
+
84
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboCrashlyticsSpecJSI_recordError(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
85
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "recordError", @selector(recordError:), args, count);
86
+ }
87
+
88
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboCrashlyticsSpecJSI_recordErrorPromise(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
89
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "recordErrorPromise", @selector(recordErrorPromise:resolve:reject:), args, count);
90
+ }
91
+
92
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboCrashlyticsSpecJSI_setCrashlyticsCollectionEnabled(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
93
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "setCrashlyticsCollectionEnabled", @selector(setCrashlyticsCollectionEnabled:resolve:reject:), args, count);
94
+ }
95
+
96
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboCrashlyticsSpecJSI_getConstants(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
97
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, ObjectKind, "getConstants", @selector(getConstants), args, count);
98
+ }
99
+
100
+ NativeRNFBTurboCrashlyticsSpecJSI::NativeRNFBTurboCrashlyticsSpecJSI(const ObjCTurboModule::InitParams &params)
101
+ : ObjCTurboModule(params) {
102
+
103
+ methodMap_["checkForUnsentReports"] = MethodMetadata {0, __hostFunction_NativeRNFBTurboCrashlyticsSpecJSI_checkForUnsentReports};
104
+
105
+
106
+ methodMap_["crash"] = MethodMetadata {0, __hostFunction_NativeRNFBTurboCrashlyticsSpecJSI_crash};
107
+
108
+
109
+ methodMap_["crashWithStackPromise"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboCrashlyticsSpecJSI_crashWithStackPromise};
110
+ setMethodArgConversionSelector(@"crashWithStackPromise", 0, @"JS_NativeRNFBTurboCrashlytics_JavaScriptErrorObject:");
111
+
112
+ methodMap_["deleteUnsentReports"] = MethodMetadata {0, __hostFunction_NativeRNFBTurboCrashlyticsSpecJSI_deleteUnsentReports};
113
+
114
+
115
+ methodMap_["didCrashOnPreviousExecution"] = MethodMetadata {0, __hostFunction_NativeRNFBTurboCrashlyticsSpecJSI_didCrashOnPreviousExecution};
116
+
117
+
118
+ methodMap_["log"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboCrashlyticsSpecJSI_log};
119
+
120
+
121
+ methodMap_["logPromise"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboCrashlyticsSpecJSI_logPromise};
122
+
123
+
124
+ methodMap_["sendUnsentReports"] = MethodMetadata {0, __hostFunction_NativeRNFBTurboCrashlyticsSpecJSI_sendUnsentReports};
125
+
126
+
127
+ methodMap_["setAttribute"] = MethodMetadata {2, __hostFunction_NativeRNFBTurboCrashlyticsSpecJSI_setAttribute};
128
+
129
+
130
+ methodMap_["setAttributes"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboCrashlyticsSpecJSI_setAttributes};
131
+
132
+
133
+ methodMap_["setUserId"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboCrashlyticsSpecJSI_setUserId};
134
+
135
+
136
+ methodMap_["recordError"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboCrashlyticsSpecJSI_recordError};
137
+ setMethodArgConversionSelector(@"recordError", 0, @"JS_NativeRNFBTurboCrashlytics_JavaScriptErrorObject:");
138
+
139
+ methodMap_["recordErrorPromise"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboCrashlyticsSpecJSI_recordErrorPromise};
140
+ setMethodArgConversionSelector(@"recordErrorPromise", 0, @"JS_NativeRNFBTurboCrashlytics_JavaScriptErrorObject:");
141
+
142
+ methodMap_["setCrashlyticsCollectionEnabled"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboCrashlyticsSpecJSI_setCrashlyticsCollectionEnabled};
143
+
144
+
145
+ methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativeRNFBTurboCrashlyticsSpecJSI_getConstants};
146
+
147
+ }
148
+ } // namespace facebook::react
@@ -0,0 +1,214 @@
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 RNFBCrashlyticsTurboModules symbols
19
+ #ifndef RNFBCrashlyticsTurboModules_H
20
+ #define RNFBCrashlyticsTurboModules_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
+ namespace JS {
36
+ namespace NativeRNFBTurboCrashlytics {
37
+ struct CrashlyticsStackFrame {
38
+ NSString *src() const;
39
+ double line() const;
40
+ double col() const;
41
+ NSString *fn() const;
42
+ NSString *file() const;
43
+
44
+ CrashlyticsStackFrame(NSDictionary *const v) : _v(v) {}
45
+ private:
46
+ NSDictionary *_v;
47
+ };
48
+ }
49
+ }
50
+
51
+ @interface RCTCxxConvert (NativeRNFBTurboCrashlytics_CrashlyticsStackFrame)
52
+ + (RCTManagedPointer *)JS_NativeRNFBTurboCrashlytics_CrashlyticsStackFrame:(id)json;
53
+ @end
54
+ namespace JS {
55
+ namespace NativeRNFBTurboCrashlytics {
56
+ struct JavaScriptErrorObject {
57
+ NSString *message() const;
58
+ bool isUnhandledRejection() const;
59
+ facebook::react::LazyVector<JS::NativeRNFBTurboCrashlytics::CrashlyticsStackFrame> frames() const;
60
+
61
+ JavaScriptErrorObject(NSDictionary *const v) : _v(v) {}
62
+ private:
63
+ NSDictionary *_v;
64
+ };
65
+ }
66
+ }
67
+
68
+ @interface RCTCxxConvert (NativeRNFBTurboCrashlytics_JavaScriptErrorObject)
69
+ + (RCTManagedPointer *)JS_NativeRNFBTurboCrashlytics_JavaScriptErrorObject:(id)json;
70
+ @end
71
+ namespace JS {
72
+ namespace NativeRNFBTurboCrashlytics {
73
+ struct Constants {
74
+
75
+ struct Builder {
76
+ // Backwards compat for RCTTypedModuleConstants
77
+ using ResultT = Constants;
78
+
79
+ struct Input {
80
+ RCTRequired<bool> isCrashlyticsCollectionEnabled;
81
+ RCTRequired<bool> isErrorGenerationOnJSCrashEnabled;
82
+ RCTRequired<bool> isCrashlyticsJavascriptExceptionHandlerChainingEnabled;
83
+ };
84
+
85
+ /** Initialize with a set of values */
86
+ Builder(const Input i);
87
+ /** Initialize with an existing Constants */
88
+ Builder(Constants i);
89
+ /** Builds the object. Generally used only by the infrastructure. */
90
+ NSDictionary *buildUnsafeRawValue() const { return _factory(); };
91
+ private:
92
+ NSDictionary *(^_factory)(void);
93
+ };
94
+
95
+ static Constants fromUnsafeRawValue(NSDictionary *const v) { return {v}; }
96
+ NSDictionary *unsafeRawValue() const { return _v; }
97
+ private:
98
+ Constants(NSDictionary *const v) : _v(v) {}
99
+ NSDictionary *_v;
100
+ };
101
+ }
102
+ }
103
+ @protocol NativeRNFBTurboCrashlyticsSpec <RCTBridgeModule, RCTTurboModule>
104
+
105
+ - (void)checkForUnsentReports:(RCTPromiseResolveBlock)resolve
106
+ reject:(RCTPromiseRejectBlock)reject;
107
+ - (void)crash;
108
+ - (void)crashWithStackPromise:(JS::NativeRNFBTurboCrashlytics::JavaScriptErrorObject &)jsErrorDict
109
+ resolve:(RCTPromiseResolveBlock)resolve
110
+ reject:(RCTPromiseRejectBlock)reject;
111
+ - (void)deleteUnsentReports:(RCTPromiseResolveBlock)resolve
112
+ reject:(RCTPromiseRejectBlock)reject;
113
+ - (void)didCrashOnPreviousExecution:(RCTPromiseResolveBlock)resolve
114
+ reject:(RCTPromiseRejectBlock)reject;
115
+ - (void)log:(NSString *)message;
116
+ - (void)logPromise:(NSString *)message
117
+ resolve:(RCTPromiseResolveBlock)resolve
118
+ reject:(RCTPromiseRejectBlock)reject;
119
+ - (void)sendUnsentReports;
120
+ - (void)setAttribute:(NSString *)key
121
+ value:(NSString *)value
122
+ resolve:(RCTPromiseResolveBlock)resolve
123
+ reject:(RCTPromiseRejectBlock)reject;
124
+ - (void)setAttributes:(NSDictionary *)attributes
125
+ resolve:(RCTPromiseResolveBlock)resolve
126
+ reject:(RCTPromiseRejectBlock)reject;
127
+ - (void)setUserId:(NSString *)userId
128
+ resolve:(RCTPromiseResolveBlock)resolve
129
+ reject:(RCTPromiseRejectBlock)reject;
130
+ - (void)recordError:(JS::NativeRNFBTurboCrashlytics::JavaScriptErrorObject &)jsErrorDict;
131
+ - (void)recordErrorPromise:(JS::NativeRNFBTurboCrashlytics::JavaScriptErrorObject &)jsErrorDict
132
+ resolve:(RCTPromiseResolveBlock)resolve
133
+ reject:(RCTPromiseRejectBlock)reject;
134
+ - (void)setCrashlyticsCollectionEnabled:(BOOL)enabled
135
+ resolve:(RCTPromiseResolveBlock)resolve
136
+ reject:(RCTPromiseRejectBlock)reject;
137
+ - (facebook::react::ModuleConstants<JS::NativeRNFBTurboCrashlytics::Constants::Builder>)constantsToExport;
138
+ - (facebook::react::ModuleConstants<JS::NativeRNFBTurboCrashlytics::Constants::Builder>)getConstants;
139
+
140
+ @end
141
+
142
+ @interface NativeRNFBTurboCrashlyticsSpecBase : NSObject {
143
+ @protected
144
+ facebook::react::EventEmitterCallback _eventEmitterCallback;
145
+ }
146
+ - (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper;
147
+
148
+
149
+ @end
150
+
151
+ namespace facebook::react {
152
+ /**
153
+ * ObjC++ class for module 'NativeRNFBTurboCrashlytics'
154
+ */
155
+ class JSI_EXPORT NativeRNFBTurboCrashlyticsSpecJSI : public ObjCTurboModule {
156
+ public:
157
+ NativeRNFBTurboCrashlyticsSpecJSI(const ObjCTurboModule::InitParams &params);
158
+ };
159
+ } // namespace facebook::react
160
+ inline NSString *JS::NativeRNFBTurboCrashlytics::CrashlyticsStackFrame::src() const
161
+ {
162
+ id const p = _v[@"src"];
163
+ return RCTBridgingToString(p);
164
+ }
165
+ inline double JS::NativeRNFBTurboCrashlytics::CrashlyticsStackFrame::line() const
166
+ {
167
+ id const p = _v[@"line"];
168
+ return RCTBridgingToDouble(p);
169
+ }
170
+ inline double JS::NativeRNFBTurboCrashlytics::CrashlyticsStackFrame::col() const
171
+ {
172
+ id const p = _v[@"col"];
173
+ return RCTBridgingToDouble(p);
174
+ }
175
+ inline NSString *JS::NativeRNFBTurboCrashlytics::CrashlyticsStackFrame::fn() const
176
+ {
177
+ id const p = _v[@"fn"];
178
+ return RCTBridgingToString(p);
179
+ }
180
+ inline NSString *JS::NativeRNFBTurboCrashlytics::CrashlyticsStackFrame::file() const
181
+ {
182
+ id const p = _v[@"file"];
183
+ return RCTBridgingToString(p);
184
+ }
185
+ inline NSString *JS::NativeRNFBTurboCrashlytics::JavaScriptErrorObject::message() const
186
+ {
187
+ id const p = _v[@"message"];
188
+ return RCTBridgingToString(p);
189
+ }
190
+ inline bool JS::NativeRNFBTurboCrashlytics::JavaScriptErrorObject::isUnhandledRejection() const
191
+ {
192
+ id const p = _v[@"isUnhandledRejection"];
193
+ return RCTBridgingToBool(p);
194
+ }
195
+ inline facebook::react::LazyVector<JS::NativeRNFBTurboCrashlytics::CrashlyticsStackFrame> JS::NativeRNFBTurboCrashlytics::JavaScriptErrorObject::frames() const
196
+ {
197
+ id const p = _v[@"frames"];
198
+ return RCTBridgingToVec(p, ^JS::NativeRNFBTurboCrashlytics::CrashlyticsStackFrame(id itemValue_0) { return JS::NativeRNFBTurboCrashlytics::CrashlyticsStackFrame(itemValue_0); });
199
+ }
200
+ inline JS::NativeRNFBTurboCrashlytics::Constants::Builder::Builder(const Input i) : _factory(^{
201
+ NSMutableDictionary *d = [NSMutableDictionary new];
202
+ auto isCrashlyticsCollectionEnabled = i.isCrashlyticsCollectionEnabled.get();
203
+ d[@"isCrashlyticsCollectionEnabled"] = @(isCrashlyticsCollectionEnabled);
204
+ auto isErrorGenerationOnJSCrashEnabled = i.isErrorGenerationOnJSCrashEnabled.get();
205
+ d[@"isErrorGenerationOnJSCrashEnabled"] = @(isErrorGenerationOnJSCrashEnabled);
206
+ auto isCrashlyticsJavascriptExceptionHandlerChainingEnabled = i.isCrashlyticsJavascriptExceptionHandlerChainingEnabled.get();
207
+ d[@"isCrashlyticsJavascriptExceptionHandlerChainingEnabled"] = @(isCrashlyticsJavascriptExceptionHandlerChainingEnabled);
208
+ return d;
209
+ }) {}
210
+ inline JS::NativeRNFBTurboCrashlytics::Constants::Builder::Builder(Constants i) : _factory(^{
211
+ return i.unsafeRawValue();
212
+ }) {}
213
+ NS_ASSUME_NONNULL_END
214
+ #endif // RNFBCrashlyticsTurboModules_H
@@ -0,0 +1,124 @@
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 "RNFBCrashlyticsTurboModulesJSI.h"
11
+
12
+ namespace facebook::react {
13
+
14
+ static jsi::Value __hostFunction_NativeRNFBTurboCrashlyticsCxxSpecJSI_getConstants(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
15
+ return static_cast<NativeRNFBTurboCrashlyticsCxxSpecJSI *>(&turboModule)->getConstants(
16
+ rt
17
+ );
18
+ }
19
+ static jsi::Value __hostFunction_NativeRNFBTurboCrashlyticsCxxSpecJSI_checkForUnsentReports(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
20
+ return static_cast<NativeRNFBTurboCrashlyticsCxxSpecJSI *>(&turboModule)->checkForUnsentReports(
21
+ rt
22
+ );
23
+ }
24
+ static jsi::Value __hostFunction_NativeRNFBTurboCrashlyticsCxxSpecJSI_crash(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
25
+ static_cast<NativeRNFBTurboCrashlyticsCxxSpecJSI *>(&turboModule)->crash(
26
+ rt
27
+ );
28
+ return jsi::Value::undefined();
29
+ }
30
+ static jsi::Value __hostFunction_NativeRNFBTurboCrashlyticsCxxSpecJSI_crashWithStackPromise(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
31
+ return static_cast<NativeRNFBTurboCrashlyticsCxxSpecJSI *>(&turboModule)->crashWithStackPromise(
32
+ rt,
33
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt)
34
+ );
35
+ }
36
+ static jsi::Value __hostFunction_NativeRNFBTurboCrashlyticsCxxSpecJSI_deleteUnsentReports(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
37
+ return static_cast<NativeRNFBTurboCrashlyticsCxxSpecJSI *>(&turboModule)->deleteUnsentReports(
38
+ rt
39
+ );
40
+ }
41
+ static jsi::Value __hostFunction_NativeRNFBTurboCrashlyticsCxxSpecJSI_didCrashOnPreviousExecution(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
42
+ return static_cast<NativeRNFBTurboCrashlyticsCxxSpecJSI *>(&turboModule)->didCrashOnPreviousExecution(
43
+ rt
44
+ );
45
+ }
46
+ static jsi::Value __hostFunction_NativeRNFBTurboCrashlyticsCxxSpecJSI_log(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
47
+ static_cast<NativeRNFBTurboCrashlyticsCxxSpecJSI *>(&turboModule)->log(
48
+ rt,
49
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
50
+ );
51
+ return jsi::Value::undefined();
52
+ }
53
+ static jsi::Value __hostFunction_NativeRNFBTurboCrashlyticsCxxSpecJSI_logPromise(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
54
+ return static_cast<NativeRNFBTurboCrashlyticsCxxSpecJSI *>(&turboModule)->logPromise(
55
+ rt,
56
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
57
+ );
58
+ }
59
+ static jsi::Value __hostFunction_NativeRNFBTurboCrashlyticsCxxSpecJSI_sendUnsentReports(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
60
+ static_cast<NativeRNFBTurboCrashlyticsCxxSpecJSI *>(&turboModule)->sendUnsentReports(
61
+ rt
62
+ );
63
+ return jsi::Value::undefined();
64
+ }
65
+ static jsi::Value __hostFunction_NativeRNFBTurboCrashlyticsCxxSpecJSI_setAttribute(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
66
+ return static_cast<NativeRNFBTurboCrashlyticsCxxSpecJSI *>(&turboModule)->setAttribute(
67
+ rt,
68
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
69
+ count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt)
70
+ );
71
+ }
72
+ static jsi::Value __hostFunction_NativeRNFBTurboCrashlyticsCxxSpecJSI_setAttributes(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
73
+ return static_cast<NativeRNFBTurboCrashlyticsCxxSpecJSI *>(&turboModule)->setAttributes(
74
+ rt,
75
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt)
76
+ );
77
+ }
78
+ static jsi::Value __hostFunction_NativeRNFBTurboCrashlyticsCxxSpecJSI_setUserId(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
79
+ return static_cast<NativeRNFBTurboCrashlyticsCxxSpecJSI *>(&turboModule)->setUserId(
80
+ rt,
81
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
82
+ );
83
+ }
84
+ static jsi::Value __hostFunction_NativeRNFBTurboCrashlyticsCxxSpecJSI_recordError(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
85
+ static_cast<NativeRNFBTurboCrashlyticsCxxSpecJSI *>(&turboModule)->recordError(
86
+ rt,
87
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt)
88
+ );
89
+ return jsi::Value::undefined();
90
+ }
91
+ static jsi::Value __hostFunction_NativeRNFBTurboCrashlyticsCxxSpecJSI_recordErrorPromise(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
92
+ return static_cast<NativeRNFBTurboCrashlyticsCxxSpecJSI *>(&turboModule)->recordErrorPromise(
93
+ rt,
94
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt)
95
+ );
96
+ }
97
+ static jsi::Value __hostFunction_NativeRNFBTurboCrashlyticsCxxSpecJSI_setCrashlyticsCollectionEnabled(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
98
+ return static_cast<NativeRNFBTurboCrashlyticsCxxSpecJSI *>(&turboModule)->setCrashlyticsCollectionEnabled(
99
+ rt,
100
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asBool()
101
+ );
102
+ }
103
+
104
+ NativeRNFBTurboCrashlyticsCxxSpecJSI::NativeRNFBTurboCrashlyticsCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
105
+ : TurboModule("NativeRNFBTurboCrashlytics", jsInvoker) {
106
+ methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativeRNFBTurboCrashlyticsCxxSpecJSI_getConstants};
107
+ methodMap_["checkForUnsentReports"] = MethodMetadata {0, __hostFunction_NativeRNFBTurboCrashlyticsCxxSpecJSI_checkForUnsentReports};
108
+ methodMap_["crash"] = MethodMetadata {0, __hostFunction_NativeRNFBTurboCrashlyticsCxxSpecJSI_crash};
109
+ methodMap_["crashWithStackPromise"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboCrashlyticsCxxSpecJSI_crashWithStackPromise};
110
+ methodMap_["deleteUnsentReports"] = MethodMetadata {0, __hostFunction_NativeRNFBTurboCrashlyticsCxxSpecJSI_deleteUnsentReports};
111
+ methodMap_["didCrashOnPreviousExecution"] = MethodMetadata {0, __hostFunction_NativeRNFBTurboCrashlyticsCxxSpecJSI_didCrashOnPreviousExecution};
112
+ methodMap_["log"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboCrashlyticsCxxSpecJSI_log};
113
+ methodMap_["logPromise"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboCrashlyticsCxxSpecJSI_logPromise};
114
+ methodMap_["sendUnsentReports"] = MethodMetadata {0, __hostFunction_NativeRNFBTurboCrashlyticsCxxSpecJSI_sendUnsentReports};
115
+ methodMap_["setAttribute"] = MethodMetadata {2, __hostFunction_NativeRNFBTurboCrashlyticsCxxSpecJSI_setAttribute};
116
+ methodMap_["setAttributes"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboCrashlyticsCxxSpecJSI_setAttributes};
117
+ methodMap_["setUserId"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboCrashlyticsCxxSpecJSI_setUserId};
118
+ methodMap_["recordError"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboCrashlyticsCxxSpecJSI_recordError};
119
+ methodMap_["recordErrorPromise"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboCrashlyticsCxxSpecJSI_recordErrorPromise};
120
+ methodMap_["setCrashlyticsCollectionEnabled"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboCrashlyticsCxxSpecJSI_setCrashlyticsCollectionEnabled};
121
+ }
122
+
123
+
124
+ } // namespace facebook::react