@react-native-firebase/remote-config 25.1.0 → 26.1.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 +38 -0
  2. package/RNFBRemoteConfig.podspec +9 -7
  3. package/android/build.gradle +19 -0
  4. package/android/src/reactnative/java/io/invertase/firebase/config/{ReactNativeFirebaseConfigModule.java → NativeRNFBTurboConfig.java} +53 -40
  5. package/android/src/reactnative/java/io/invertase/firebase/config/ReactNativeFirebaseConfigPackage.java +1 -1
  6. package/android/src/reactnative/java/io/invertase/firebase/config/generated/java/com/facebook/fbreact/specs/NativeRNFBTurboConfigSpec.java +115 -0
  7. package/android/src/reactnative/java/io/invertase/firebase/config/generated/jni/CMakeLists.txt +36 -0
  8. package/android/src/reactnative/java/io/invertase/firebase/config/generated/jni/RNFBRemoteConfigTurboModules-generated.cpp +98 -0
  9. package/android/src/reactnative/java/io/invertase/firebase/config/generated/jni/RNFBRemoteConfigTurboModules.h +31 -0
  10. package/android/src/reactnative/java/io/invertase/firebase/config/generated/jni/react/renderer/components/RNFBRemoteConfigTurboModules/RNFBRemoteConfigTurboModulesJSI-generated.cpp +110 -0
  11. package/android/src/reactnative/java/io/invertase/firebase/config/generated/jni/react/renderer/components/RNFBRemoteConfigTurboModules/RNFBRemoteConfigTurboModulesJSI.h +471 -0
  12. package/dist/module/index.js +499 -5
  13. package/dist/module/index.js.map +1 -1
  14. package/dist/module/version.js +1 -1
  15. package/dist/typescript/lib/index.d.ts +83 -5
  16. package/dist/typescript/lib/index.d.ts.map +1 -1
  17. package/dist/typescript/lib/types/internal.d.ts +25 -24
  18. package/dist/typescript/lib/types/internal.d.ts.map +1 -1
  19. package/dist/typescript/lib/types/remote-config.d.ts +24 -3
  20. package/dist/typescript/lib/types/remote-config.d.ts.map +1 -1
  21. package/dist/typescript/lib/version.d.ts +1 -1
  22. package/ios/RNFBConfig/RNFBConfigHelper.h +89 -0
  23. package/ios/RNFBConfig/{RNFBConfigModule.m → RNFBConfigHelper.m} +176 -165
  24. package/ios/RNFBConfig/RNFBConfigModule.h +3 -2
  25. package/ios/RNFBConfig/RNFBConfigModule.mm +134 -0
  26. package/ios/RNFBConfig.xcodeproj/project.pbxproj +8 -8
  27. package/ios/generated/RCTAppDependencyProvider.h +25 -0
  28. package/ios/generated/RCTAppDependencyProvider.mm +55 -0
  29. package/ios/generated/RCTModulesConformingToProtocolsProvider.h +18 -0
  30. package/ios/generated/RCTModulesConformingToProtocolsProvider.mm +33 -0
  31. package/ios/generated/RCTThirdPartyComponentsProvider.h +16 -0
  32. package/ios/generated/RCTThirdPartyComponentsProvider.mm +23 -0
  33. package/ios/generated/RNFBRemoteConfigTurboModules/RNFBRemoteConfigTurboModules-generated.mm +121 -0
  34. package/ios/generated/RNFBRemoteConfigTurboModules/RNFBRemoteConfigTurboModules.h +172 -0
  35. package/ios/generated/RNFBRemoteConfigTurboModulesJSI-generated.cpp +110 -0
  36. package/ios/generated/RNFBRemoteConfigTurboModulesJSI.h +471 -0
  37. package/ios/generated/ReactAppDependencyProvider.podspec +34 -0
  38. package/lib/index.ts +683 -8
  39. package/lib/types/internal.ts +25 -44
  40. package/lib/types/remote-config.ts +28 -3
  41. package/lib/version.ts +1 -1
  42. package/package.json +23 -5
  43. package/react-native.config.js +10 -0
  44. package/specs/NativeRNFBTurboConfig.ts +60 -0
  45. package/typedoc.json +1 -1
  46. package/dist/module/modular.js +0 -155
  47. package/dist/module/modular.js.map +0 -1
  48. package/dist/module/namespaced.js +0 -400
  49. package/dist/module/namespaced.js.map +0 -1
  50. package/dist/module/types/namespaced.js +0 -24
  51. package/dist/module/types/namespaced.js.map +0 -1
  52. package/dist/typescript/lib/modular.d.ts +0 -76
  53. package/dist/typescript/lib/modular.d.ts.map +0 -1
  54. package/dist/typescript/lib/namespaced.d.ts +0 -11
  55. package/dist/typescript/lib/namespaced.d.ts.map +0 -1
  56. package/dist/typescript/lib/types/namespaced.d.ts +0 -124
  57. package/dist/typescript/lib/types/namespaced.d.ts.map +0 -1
  58. package/lib/modular.ts +0 -197
  59. package/lib/namespaced.ts +0 -552
  60. package/lib/types/namespaced.ts +0 -163
@@ -7,7 +7,7 @@
7
7
  objects = {
8
8
 
9
9
  /* Begin PBXBuildFile section */
10
- 2744B98621F45429004F8E3F /* RNFBConfigModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 2744B98521F45429004F8E3F /* RNFBConfigModule.m */; };
10
+ 2744B98621F45429004F8E3F /* RNFBConfigModule.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2744B98521F45429004F8E3F /* RNFBConfigModule.mm */; };
11
11
  /* End PBXBuildFile section */
12
12
 
13
13
  /* Begin PBXCopyFilesBuildPhase section */
@@ -25,7 +25,7 @@
25
25
  /* Begin PBXFileReference section */
26
26
  2744B98221F45429004F8E3F /* libRNFBConfig.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNFBConfig.a; sourceTree = BUILT_PRODUCTS_DIR; };
27
27
  2744B98421F45429004F8E3F /* RNFBConfigModule.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RNFBConfigModule.h; path = RNFBConfig/RNFBConfigModule.h; sourceTree = SOURCE_ROOT; };
28
- 2744B98521F45429004F8E3F /* RNFBConfigModule.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = RNFBConfigModule.m; path = RNFBConfig/RNFBConfigModule.m; sourceTree = SOURCE_ROOT; };
28
+ 2744B98521F45429004F8E3F /* RNFBConfigModule.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = RNFBConfigModule.mm; path = RNFBConfig/RNFBConfigModule.mm; sourceTree = SOURCE_ROOT; };
29
29
  /* End PBXFileReference section */
30
30
 
31
31
  /* Begin PBXFrameworksBuildPhase section */
@@ -53,7 +53,7 @@
53
53
  2744B9A121F48736004F8E3F /* converters */,
54
54
  2744B98C21F45C64004F8E3F /* common */,
55
55
  2744B98421F45429004F8E3F /* RNFBConfigModule.h */,
56
- 2744B98521F45429004F8E3F /* RNFBConfigModule.m */,
56
+ 2744B98521F45429004F8E3F /* RNFBConfigModule.mm */,
57
57
  );
58
58
  path = RNFBConfig;
59
59
  sourceTree = "<group>";
@@ -124,7 +124,7 @@
124
124
  isa = PBXSourcesBuildPhase;
125
125
  buildActionMask = 2147483647;
126
126
  files = (
127
- 2744B98621F45429004F8E3F /* RNFBConfigModule.m in Sources */,
127
+ 2744B98621F45429004F8E3F /* RNFBConfigModule.mm in Sources */,
128
128
  );
129
129
  runOnlyForDeploymentPostprocessing = 0;
130
130
  };
@@ -159,7 +159,7 @@
159
159
  );
160
160
  GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
161
161
  GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
162
- IPHONEOS_DEPLOYMENT_TARGET = 10.0;
162
+ IPHONEOS_DEPLOYMENT_TARGET = 15.0;
163
163
  MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
164
164
  MTL_FAST_MATH = YES;
165
165
  OTHER_LDFLAGS = "-ObjC";
@@ -193,7 +193,7 @@
193
193
  GCC_C_LANGUAGE_STANDARD = gnu11;
194
194
  GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
195
195
  GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
196
- IPHONEOS_DEPLOYMENT_TARGET = 10.0;
196
+ IPHONEOS_DEPLOYMENT_TARGET = 15.0;
197
197
  MTL_ENABLE_DEBUG_INFO = NO;
198
198
  MTL_FAST_MATH = YES;
199
199
  OTHER_LDFLAGS = "-ObjC";
@@ -254,7 +254,7 @@
254
254
  "$(SRCROOT)/../../../node_modules/react-native-firebase/ios/**",
255
255
  "$(SRCROOT)/../../../packages/app/ios/**",
256
256
  );
257
- IPHONEOS_DEPLOYMENT_TARGET = 10.0;
257
+ IPHONEOS_DEPLOYMENT_TARGET = 15.0;
258
258
  LIBRARY_SEARCH_PATHS = "$(inherited)";
259
259
  MACH_O_TYPE = staticlib;
260
260
  OTHER_LDFLAGS = "$(inherited)";
@@ -312,7 +312,7 @@
312
312
  "$(SRCROOT)/../../../node_modules/react-native-firebase/ios/**",
313
313
  "$(SRCROOT)/../../../packages/app/ios/**",
314
314
  );
315
- IPHONEOS_DEPLOYMENT_TARGET = 10.0;
315
+ IPHONEOS_DEPLOYMENT_TARGET = 15.0;
316
316
  LIBRARY_SEARCH_PATHS = "$(inherited)";
317
317
  MACH_O_TYPE = staticlib;
318
318
  ONLY_ACTIVE_ARCH = YES;
@@ -0,0 +1,25 @@
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
+ #if __has_include(<React-RCTAppDelegate/RCTDependencyProvider.h>)
12
+ #import <React-RCTAppDelegate/RCTDependencyProvider.h>
13
+ #elif __has_include(<React_RCTAppDelegate/RCTDependencyProvider.h>)
14
+ #import <React_RCTAppDelegate/RCTDependencyProvider.h>
15
+ #else
16
+ #import "RCTDependencyProvider.h"
17
+ #endif
18
+
19
+ NS_ASSUME_NONNULL_BEGIN
20
+
21
+ @interface RCTAppDependencyProvider : NSObject <RCTDependencyProvider>
22
+
23
+ @end
24
+
25
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,55 @@
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 "RCTAppDependencyProvider.h"
9
+ #import <ReactCodegen/RCTModulesConformingToProtocolsProvider.h>
10
+ #import <ReactCodegen/RCTThirdPartyComponentsProvider.h>
11
+
12
+ @implementation RCTAppDependencyProvider {
13
+ NSArray<NSString *> * _URLRequestHandlerClassNames;
14
+ NSArray<NSString *> * _imageDataDecoderClassNames;
15
+ NSArray<NSString *> * _imageURLLoaderClassNames;
16
+ NSDictionary<NSString *,Class<RCTComponentViewProtocol>> * _thirdPartyFabricComponents;
17
+ }
18
+
19
+ - (nonnull NSArray<NSString *> *)URLRequestHandlerClassNames {
20
+ static dispatch_once_t requestUrlToken;
21
+ dispatch_once(&requestUrlToken, ^{
22
+ self->_URLRequestHandlerClassNames = RCTModulesConformingToProtocolsProvider.URLRequestHandlerClassNames;
23
+ });
24
+
25
+ return _URLRequestHandlerClassNames;
26
+ }
27
+
28
+ - (nonnull NSArray<NSString *> *)imageDataDecoderClassNames {
29
+ static dispatch_once_t dataDecoderToken;
30
+ dispatch_once(&dataDecoderToken, ^{
31
+ _imageDataDecoderClassNames = RCTModulesConformingToProtocolsProvider.imageDataDecoderClassNames;
32
+ });
33
+
34
+ return _imageDataDecoderClassNames;
35
+ }
36
+
37
+ - (nonnull NSArray<NSString *> *)imageURLLoaderClassNames {
38
+ static dispatch_once_t urlLoaderToken;
39
+ dispatch_once(&urlLoaderToken, ^{
40
+ _imageURLLoaderClassNames = RCTModulesConformingToProtocolsProvider.imageURLLoaderClassNames;
41
+ });
42
+
43
+ return _imageURLLoaderClassNames;
44
+ }
45
+
46
+ - (nonnull NSDictionary<NSString *,Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents {
47
+ static dispatch_once_t nativeComponentsToken;
48
+ dispatch_once(&nativeComponentsToken, ^{
49
+ _thirdPartyFabricComponents = RCTThirdPartyComponentsProvider.thirdPartyFabricComponents;
50
+ });
51
+
52
+ return _thirdPartyFabricComponents;
53
+ }
54
+
55
+ @end
@@ -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,121 @@
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 "RNFBRemoteConfigTurboModules.h"
15
+
16
+
17
+ @implementation NativeRNFBTurboConfigSpecBase
18
+
19
+
20
+ - (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper
21
+ {
22
+ _eventEmitterCallback = std::move(eventEmitterCallbackWrapper->_eventEmitterCallback);
23
+ }
24
+ @end
25
+
26
+ @implementation RCTCxxConvert (NativeRNFBTurboConfig_ConfigSettings)
27
+ + (RCTManagedPointer *)JS_NativeRNFBTurboConfig_ConfigSettings:(id)json
28
+ {
29
+ return facebook::react::managedPointer<JS::NativeRNFBTurboConfig::ConfigSettings>(json);
30
+ }
31
+ @end
32
+ namespace facebook::react {
33
+
34
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboConfigSpecJSI_activate(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
35
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "activate", @selector(activate:resolve:reject:), args, count);
36
+ }
37
+
38
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboConfigSpecJSI_setConfigSettings(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
39
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "setConfigSettings", @selector(setConfigSettings:settings:resolve:reject:), args, count);
40
+ }
41
+
42
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboConfigSpecJSI_fetch(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
43
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "fetch", @selector(fetch:expirationDurationSeconds:resolve:reject:), args, count);
44
+ }
45
+
46
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboConfigSpecJSI_fetchAndActivate(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
47
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "fetchAndActivate", @selector(fetchAndActivate:resolve:reject:), args, count);
48
+ }
49
+
50
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboConfigSpecJSI_ensureInitialized(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
51
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "ensureInitialized", @selector(ensureInitialized:resolve:reject:), args, count);
52
+ }
53
+
54
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboConfigSpecJSI_setDefaults(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
55
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "setDefaults", @selector(setDefaults:defaults:resolve:reject:), args, count);
56
+ }
57
+
58
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboConfigSpecJSI_setDefaultsFromResource(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
59
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "setDefaultsFromResource", @selector(setDefaultsFromResource:resourceName:resolve:reject:), args, count);
60
+ }
61
+
62
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboConfigSpecJSI_reset(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
63
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "reset", @selector(reset:resolve:reject:), args, count);
64
+ }
65
+
66
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboConfigSpecJSI_onConfigUpdated(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
67
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "onConfigUpdated", @selector(onConfigUpdated:), args, count);
68
+ }
69
+
70
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboConfigSpecJSI_removeConfigUpdateRegistration(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
71
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "removeConfigUpdateRegistration", @selector(removeConfigUpdateRegistration:), args, count);
72
+ }
73
+
74
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboConfigSpecJSI_setCustomSignals(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
75
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "setCustomSignals", @selector(setCustomSignals:customSignals:resolve:reject:), args, count);
76
+ }
77
+
78
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboConfigSpecJSI_getConstants(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
79
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, ObjectKind, "getConstants", @selector(getConstants), args, count);
80
+ }
81
+
82
+ NativeRNFBTurboConfigSpecJSI::NativeRNFBTurboConfigSpecJSI(const ObjCTurboModule::InitParams &params)
83
+ : ObjCTurboModule(params) {
84
+
85
+ methodMap_["activate"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboConfigSpecJSI_activate};
86
+
87
+
88
+ methodMap_["setConfigSettings"] = MethodMetadata {2, __hostFunction_NativeRNFBTurboConfigSpecJSI_setConfigSettings};
89
+ setMethodArgConversionSelector(@"setConfigSettings", 1, @"JS_NativeRNFBTurboConfig_ConfigSettings:");
90
+
91
+ methodMap_["fetch"] = MethodMetadata {2, __hostFunction_NativeRNFBTurboConfigSpecJSI_fetch};
92
+
93
+
94
+ methodMap_["fetchAndActivate"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboConfigSpecJSI_fetchAndActivate};
95
+
96
+
97
+ methodMap_["ensureInitialized"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboConfigSpecJSI_ensureInitialized};
98
+
99
+
100
+ methodMap_["setDefaults"] = MethodMetadata {2, __hostFunction_NativeRNFBTurboConfigSpecJSI_setDefaults};
101
+
102
+
103
+ methodMap_["setDefaultsFromResource"] = MethodMetadata {2, __hostFunction_NativeRNFBTurboConfigSpecJSI_setDefaultsFromResource};
104
+
105
+
106
+ methodMap_["reset"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboConfigSpecJSI_reset};
107
+
108
+
109
+ methodMap_["onConfigUpdated"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboConfigSpecJSI_onConfigUpdated};
110
+
111
+
112
+ methodMap_["removeConfigUpdateRegistration"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboConfigSpecJSI_removeConfigUpdateRegistration};
113
+
114
+
115
+ methodMap_["setCustomSignals"] = MethodMetadata {2, __hostFunction_NativeRNFBTurboConfigSpecJSI_setCustomSignals};
116
+
117
+
118
+ methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativeRNFBTurboConfigSpecJSI_getConstants};
119
+
120
+ }
121
+ } // namespace facebook::react
@@ -0,0 +1,172 @@
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 RNFBRemoteConfigTurboModules symbols
19
+ #ifndef RNFBRemoteConfigTurboModules_H
20
+ #define RNFBRemoteConfigTurboModules_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 NativeRNFBTurboConfig {
37
+ struct ConfigSettings {
38
+ double fetchTimeout() const;
39
+ double minimumFetchInterval() const;
40
+
41
+ ConfigSettings(NSDictionary *const v) : _v(v) {}
42
+ private:
43
+ NSDictionary *_v;
44
+ };
45
+ }
46
+ }
47
+
48
+ @interface RCTCxxConvert (NativeRNFBTurboConfig_ConfigSettings)
49
+ + (RCTManagedPointer *)JS_NativeRNFBTurboConfig_ConfigSettings:(id)json;
50
+ @end
51
+ namespace JS {
52
+ namespace NativeRNFBTurboConfig {
53
+ struct Constants {
54
+
55
+ struct Builder {
56
+ // Backwards compat for RCTTypedModuleConstants
57
+ using ResultT = Constants;
58
+
59
+ struct Input {
60
+ RCTRequired<double> fetchTimeout;
61
+ RCTRequired<double> minimumFetchInterval;
62
+ RCTRequired<double> lastFetchTime;
63
+ RCTRequired<NSString *> lastFetchStatus;
64
+ RCTRequired<id<NSObject>> values;
65
+ };
66
+
67
+ /** Initialize with a set of values */
68
+ Builder(const Input i);
69
+ /** Initialize with an existing Constants */
70
+ Builder(Constants i);
71
+ /** Builds the object. Generally used only by the infrastructure. */
72
+ NSDictionary *buildUnsafeRawValue() const { return _factory(); };
73
+ private:
74
+ NSDictionary *(^_factory)(void);
75
+ };
76
+
77
+ static Constants fromUnsafeRawValue(NSDictionary *const v) { return {v}; }
78
+ NSDictionary *unsafeRawValue() const { return _v; }
79
+ private:
80
+ Constants(NSDictionary *const v) : _v(v) {}
81
+ NSDictionary *_v;
82
+ };
83
+ }
84
+ }
85
+ @protocol NativeRNFBTurboConfigSpec <RCTBridgeModule, RCTTurboModule>
86
+
87
+ - (void)activate:(NSString *)appName
88
+ resolve:(RCTPromiseResolveBlock)resolve
89
+ reject:(RCTPromiseRejectBlock)reject;
90
+ - (void)setConfigSettings:(NSString *)appName
91
+ settings:(JS::NativeRNFBTurboConfig::ConfigSettings &)settings
92
+ resolve:(RCTPromiseResolveBlock)resolve
93
+ reject:(RCTPromiseRejectBlock)reject;
94
+ - (void)fetch:(NSString *)appName
95
+ expirationDurationSeconds:(double)expirationDurationSeconds
96
+ resolve:(RCTPromiseResolveBlock)resolve
97
+ reject:(RCTPromiseRejectBlock)reject;
98
+ - (void)fetchAndActivate:(NSString *)appName
99
+ resolve:(RCTPromiseResolveBlock)resolve
100
+ reject:(RCTPromiseRejectBlock)reject;
101
+ - (void)ensureInitialized:(NSString *)appName
102
+ resolve:(RCTPromiseResolveBlock)resolve
103
+ reject:(RCTPromiseRejectBlock)reject;
104
+ - (void)setDefaults:(NSString *)appName
105
+ defaults:(NSDictionary *)defaults
106
+ resolve:(RCTPromiseResolveBlock)resolve
107
+ reject:(RCTPromiseRejectBlock)reject;
108
+ - (void)setDefaultsFromResource:(NSString *)appName
109
+ resourceName:(NSString *)resourceName
110
+ resolve:(RCTPromiseResolveBlock)resolve
111
+ reject:(RCTPromiseRejectBlock)reject;
112
+ - (void)reset:(NSString *)appName
113
+ resolve:(RCTPromiseResolveBlock)resolve
114
+ reject:(RCTPromiseRejectBlock)reject;
115
+ - (void)onConfigUpdated:(NSString *)appName;
116
+ - (void)removeConfigUpdateRegistration:(NSString *)appName;
117
+ - (void)setCustomSignals:(NSString *)appName
118
+ customSignals:(NSDictionary *)customSignals
119
+ resolve:(RCTPromiseResolveBlock)resolve
120
+ reject:(RCTPromiseRejectBlock)reject;
121
+ - (facebook::react::ModuleConstants<JS::NativeRNFBTurboConfig::Constants::Builder>)constantsToExport;
122
+ - (facebook::react::ModuleConstants<JS::NativeRNFBTurboConfig::Constants::Builder>)getConstants;
123
+
124
+ @end
125
+
126
+ @interface NativeRNFBTurboConfigSpecBase : NSObject {
127
+ @protected
128
+ facebook::react::EventEmitterCallback _eventEmitterCallback;
129
+ }
130
+ - (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper;
131
+
132
+
133
+ @end
134
+
135
+ namespace facebook::react {
136
+ /**
137
+ * ObjC++ class for module 'NativeRNFBTurboConfig'
138
+ */
139
+ class JSI_EXPORT NativeRNFBTurboConfigSpecJSI : public ObjCTurboModule {
140
+ public:
141
+ NativeRNFBTurboConfigSpecJSI(const ObjCTurboModule::InitParams &params);
142
+ };
143
+ } // namespace facebook::react
144
+ inline double JS::NativeRNFBTurboConfig::ConfigSettings::fetchTimeout() const
145
+ {
146
+ id const p = _v[@"fetchTimeout"];
147
+ return RCTBridgingToDouble(p);
148
+ }
149
+ inline double JS::NativeRNFBTurboConfig::ConfigSettings::minimumFetchInterval() const
150
+ {
151
+ id const p = _v[@"minimumFetchInterval"];
152
+ return RCTBridgingToDouble(p);
153
+ }
154
+ inline JS::NativeRNFBTurboConfig::Constants::Builder::Builder(const Input i) : _factory(^{
155
+ NSMutableDictionary *d = [NSMutableDictionary new];
156
+ auto fetchTimeout = i.fetchTimeout.get();
157
+ d[@"fetchTimeout"] = @(fetchTimeout);
158
+ auto minimumFetchInterval = i.minimumFetchInterval.get();
159
+ d[@"minimumFetchInterval"] = @(minimumFetchInterval);
160
+ auto lastFetchTime = i.lastFetchTime.get();
161
+ d[@"lastFetchTime"] = @(lastFetchTime);
162
+ auto lastFetchStatus = i.lastFetchStatus.get();
163
+ d[@"lastFetchStatus"] = lastFetchStatus;
164
+ auto values = i.values.get();
165
+ d[@"values"] = values;
166
+ return d;
167
+ }) {}
168
+ inline JS::NativeRNFBTurboConfig::Constants::Builder::Builder(Constants i) : _factory(^{
169
+ return i.unsafeRawValue();
170
+ }) {}
171
+ NS_ASSUME_NONNULL_END
172
+ #endif // RNFBRemoteConfigTurboModules_H
@@ -0,0 +1,110 @@
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 "RNFBRemoteConfigTurboModulesJSI.h"
11
+
12
+ namespace facebook::react {
13
+
14
+ static jsi::Value __hostFunction_NativeRNFBTurboConfigCxxSpecJSI_getConstants(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
15
+ return static_cast<NativeRNFBTurboConfigCxxSpecJSI *>(&turboModule)->getConstants(
16
+ rt
17
+ );
18
+ }
19
+ static jsi::Value __hostFunction_NativeRNFBTurboConfigCxxSpecJSI_activate(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
20
+ return static_cast<NativeRNFBTurboConfigCxxSpecJSI *>(&turboModule)->activate(
21
+ rt,
22
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
23
+ );
24
+ }
25
+ static jsi::Value __hostFunction_NativeRNFBTurboConfigCxxSpecJSI_setConfigSettings(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
26
+ return static_cast<NativeRNFBTurboConfigCxxSpecJSI *>(&turboModule)->setConfigSettings(
27
+ rt,
28
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
29
+ count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt)
30
+ );
31
+ }
32
+ static jsi::Value __hostFunction_NativeRNFBTurboConfigCxxSpecJSI_fetch(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
33
+ return static_cast<NativeRNFBTurboConfigCxxSpecJSI *>(&turboModule)->fetch(
34
+ rt,
35
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
36
+ count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber()
37
+ );
38
+ }
39
+ static jsi::Value __hostFunction_NativeRNFBTurboConfigCxxSpecJSI_fetchAndActivate(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
40
+ return static_cast<NativeRNFBTurboConfigCxxSpecJSI *>(&turboModule)->fetchAndActivate(
41
+ rt,
42
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
43
+ );
44
+ }
45
+ static jsi::Value __hostFunction_NativeRNFBTurboConfigCxxSpecJSI_ensureInitialized(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
46
+ return static_cast<NativeRNFBTurboConfigCxxSpecJSI *>(&turboModule)->ensureInitialized(
47
+ rt,
48
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
49
+ );
50
+ }
51
+ static jsi::Value __hostFunction_NativeRNFBTurboConfigCxxSpecJSI_setDefaults(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
52
+ return static_cast<NativeRNFBTurboConfigCxxSpecJSI *>(&turboModule)->setDefaults(
53
+ rt,
54
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
55
+ count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt)
56
+ );
57
+ }
58
+ static jsi::Value __hostFunction_NativeRNFBTurboConfigCxxSpecJSI_setDefaultsFromResource(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
59
+ return static_cast<NativeRNFBTurboConfigCxxSpecJSI *>(&turboModule)->setDefaultsFromResource(
60
+ rt,
61
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
62
+ count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt)
63
+ );
64
+ }
65
+ static jsi::Value __hostFunction_NativeRNFBTurboConfigCxxSpecJSI_reset(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
66
+ return static_cast<NativeRNFBTurboConfigCxxSpecJSI *>(&turboModule)->reset(
67
+ rt,
68
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
69
+ );
70
+ }
71
+ static jsi::Value __hostFunction_NativeRNFBTurboConfigCxxSpecJSI_onConfigUpdated(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
72
+ static_cast<NativeRNFBTurboConfigCxxSpecJSI *>(&turboModule)->onConfigUpdated(
73
+ rt,
74
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
75
+ );
76
+ return jsi::Value::undefined();
77
+ }
78
+ static jsi::Value __hostFunction_NativeRNFBTurboConfigCxxSpecJSI_removeConfigUpdateRegistration(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
79
+ static_cast<NativeRNFBTurboConfigCxxSpecJSI *>(&turboModule)->removeConfigUpdateRegistration(
80
+ rt,
81
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
82
+ );
83
+ return jsi::Value::undefined();
84
+ }
85
+ static jsi::Value __hostFunction_NativeRNFBTurboConfigCxxSpecJSI_setCustomSignals(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
86
+ return static_cast<NativeRNFBTurboConfigCxxSpecJSI *>(&turboModule)->setCustomSignals(
87
+ rt,
88
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
89
+ count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt)
90
+ );
91
+ }
92
+
93
+ NativeRNFBTurboConfigCxxSpecJSI::NativeRNFBTurboConfigCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
94
+ : TurboModule("NativeRNFBTurboConfig", jsInvoker) {
95
+ methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativeRNFBTurboConfigCxxSpecJSI_getConstants};
96
+ methodMap_["activate"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboConfigCxxSpecJSI_activate};
97
+ methodMap_["setConfigSettings"] = MethodMetadata {2, __hostFunction_NativeRNFBTurboConfigCxxSpecJSI_setConfigSettings};
98
+ methodMap_["fetch"] = MethodMetadata {2, __hostFunction_NativeRNFBTurboConfigCxxSpecJSI_fetch};
99
+ methodMap_["fetchAndActivate"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboConfigCxxSpecJSI_fetchAndActivate};
100
+ methodMap_["ensureInitialized"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboConfigCxxSpecJSI_ensureInitialized};
101
+ methodMap_["setDefaults"] = MethodMetadata {2, __hostFunction_NativeRNFBTurboConfigCxxSpecJSI_setDefaults};
102
+ methodMap_["setDefaultsFromResource"] = MethodMetadata {2, __hostFunction_NativeRNFBTurboConfigCxxSpecJSI_setDefaultsFromResource};
103
+ methodMap_["reset"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboConfigCxxSpecJSI_reset};
104
+ methodMap_["onConfigUpdated"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboConfigCxxSpecJSI_onConfigUpdated};
105
+ methodMap_["removeConfigUpdateRegistration"] = MethodMetadata {1, __hostFunction_NativeRNFBTurboConfigCxxSpecJSI_removeConfigUpdateRegistration};
106
+ methodMap_["setCustomSignals"] = MethodMetadata {2, __hostFunction_NativeRNFBTurboConfigCxxSpecJSI_setCustomSignals};
107
+ }
108
+
109
+
110
+ } // namespace facebook::react