@react-native-firebase/app-distribution 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 (59) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/RNFBAppDistribution.podspec +9 -7
  3. package/android/build.gradle +19 -0
  4. package/android/src/main/java/io/invertase/firebase/appdistribution/{ReactNativeFirebaseAppDistributionModule.java → NativeRNFBTurboAppDistribution.java} +14 -17
  5. package/android/src/main/java/io/invertase/firebase/appdistribution/ReactNativeFirebaseAppDistributionPackage.java +1 -1
  6. package/android/src/main/java/io/invertase/firebase/appdistribution/generated/java/com/facebook/fbreact/specs/NativeRNFBTurboAppDistributionSpec.java +50 -0
  7. package/android/src/main/java/io/invertase/firebase/appdistribution/generated/jni/CMakeLists.txt +36 -0
  8. package/android/src/main/java/io/invertase/firebase/appdistribution/generated/jni/RNFBAppDistributionTurboModules-generated.cpp +50 -0
  9. package/android/src/main/java/io/invertase/firebase/appdistribution/generated/jni/RNFBAppDistributionTurboModules.h +31 -0
  10. package/android/src/main/java/io/invertase/firebase/appdistribution/generated/jni/react/renderer/components/RNFBAppDistributionTurboModules/RNFBAppDistributionTurboModulesJSI-generated.cpp +44 -0
  11. package/android/src/main/java/io/invertase/firebase/appdistribution/generated/jni/react/renderer/components/RNFBAppDistributionTurboModules/RNFBAppDistributionTurboModulesJSI.h +166 -0
  12. package/app.plugin.js +1 -1
  13. package/dist/module/index.js +63 -3
  14. package/dist/module/index.js.map +1 -1
  15. package/dist/module/version.js +1 -1
  16. package/dist/typescript/lib/index.d.ts +12 -4
  17. package/dist/typescript/lib/index.d.ts.map +1 -1
  18. package/dist/typescript/lib/types/internal.d.ts +5 -8
  19. package/dist/typescript/lib/types/internal.d.ts.map +1 -1
  20. package/dist/typescript/lib/version.d.ts +1 -1
  21. package/ios/RNFBAppDistribution/RNFBAppDistributionModule.h +2 -3
  22. package/ios/RNFBAppDistribution/{RNFBAppDistributionModule.m → RNFBAppDistributionModule.mm} +54 -20
  23. package/ios/RNFBAppDistribution.xcodeproj/project.pbxproj +8 -8
  24. package/ios/generated/RCTAppDependencyProvider.h +25 -0
  25. package/ios/generated/RCTAppDependencyProvider.mm +55 -0
  26. package/ios/generated/RCTModulesConformingToProtocolsProvider.h +18 -0
  27. package/ios/generated/RCTModulesConformingToProtocolsProvider.mm +33 -0
  28. package/ios/generated/RCTThirdPartyComponentsProvider.h +16 -0
  29. package/ios/generated/RCTThirdPartyComponentsProvider.mm +23 -0
  30. package/ios/generated/RNFBAppDistributionTurboModules/RNFBAppDistributionTurboModules-generated.mm +60 -0
  31. package/ios/generated/RNFBAppDistributionTurboModules/RNFBAppDistributionTurboModules.h +69 -0
  32. package/ios/generated/RNFBAppDistributionTurboModulesJSI-generated.cpp +44 -0
  33. package/ios/generated/RNFBAppDistributionTurboModulesJSI.h +166 -0
  34. package/ios/generated/ReactAppDependencyProvider.podspec +34 -0
  35. package/lib/index.ts +93 -5
  36. package/lib/types/internal.ts +5 -10
  37. package/lib/version.ts +1 -1
  38. package/package.json +30 -5
  39. package/plugin/build/app.plugin.d.ts +2 -0
  40. package/plugin/build/app.plugin.js +6 -0
  41. package/plugin/src/app.plugin.ts +3 -0
  42. package/plugin/tsconfig.tsbuildinfo +1 -1
  43. package/react-native.config.js +10 -0
  44. package/specs/NativeRNFBTurboAppDistribution.ts +19 -0
  45. package/dist/module/modular.js +0 -43
  46. package/dist/module/modular.js.map +0 -1
  47. package/dist/module/namespaced.js +0 -73
  48. package/dist/module/namespaced.js.map +0 -1
  49. package/dist/module/types/namespaced.js +0 -10
  50. package/dist/module/types/namespaced.js.map +0 -1
  51. package/dist/typescript/lib/modular.d.ts +0 -9
  52. package/dist/typescript/lib/modular.d.ts.map +0 -1
  53. package/dist/typescript/lib/namespaced.d.ts +0 -7
  54. package/dist/typescript/lib/namespaced.d.ts.map +0 -1
  55. package/dist/typescript/lib/types/namespaced.d.ts +0 -55
  56. package/dist/typescript/lib/types/namespaced.d.ts.map +0 -1
  57. package/lib/modular.ts +0 -54
  58. package/lib/namespaced.ts +0 -103
  59. package/lib/types/namespaced.ts +0 -64
@@ -1,5 +1,4 @@
1
1
  import type { AppDistribution, AppDistributionRelease } from './app-distribution';
2
- export type AppDistributionModularDeprecationArg = string;
3
2
  export interface RNFBAppDistributionModule {
4
3
  isTesterSignedIn(): Promise<boolean>;
5
4
  signInTester(): Promise<void>;
@@ -8,16 +7,14 @@ export interface RNFBAppDistributionModule {
8
7
  }
9
8
  declare module '@react-native-firebase/app/dist/module/internal/NativeModules' {
10
9
  interface ReactNativeFirebaseNativeModules {
11
- RNFBAppDistributionModule: RNFBAppDistributionModule;
10
+ NativeRNFBTurboAppDistribution: RNFBAppDistributionModule;
12
11
  }
13
12
  }
14
13
  export interface AppDistributionInternal extends AppDistribution {
14
+ isTesterSignedIn(): Promise<boolean>;
15
+ signInTester(): Promise<void>;
16
+ checkForUpdate(): Promise<AppDistributionRelease>;
17
+ signOutTester(): Promise<void>;
15
18
  readonly native: RNFBAppDistributionModule;
16
19
  }
17
- export type AppDistributionWithDeprecationArg = AppDistributionInternal & {
18
- isTesterSignedIn(_depArg: AppDistributionModularDeprecationArg): Promise<boolean>;
19
- signInTester(_depArg: AppDistributionModularDeprecationArg): Promise<void>;
20
- checkForUpdate(_depArg: AppDistributionModularDeprecationArg): Promise<AppDistributionRelease>;
21
- signOutTester(_depArg: AppDistributionModularDeprecationArg): Promise<void>;
22
- };
23
20
  //# sourceMappingURL=internal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../../lib/types/internal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAElF,MAAM,MAAM,oCAAoC,GAAG,MAAM,CAAC;AAE1D,MAAM,WAAW,yBAAyB;IACxC,gBAAgB,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IACrC,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,cAAc,IAAI,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAClD,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAChC;AAED,OAAO,QAAQ,+DAA+D,CAAC;IAC7E,UAAU,gCAAgC;QACxC,yBAAyB,EAAE,yBAAyB,CAAC;KACtD;CACF;AAED,MAAM,WAAW,uBAAwB,SAAQ,eAAe;IAC9D,QAAQ,CAAC,MAAM,EAAE,yBAAyB,CAAC;CAC5C;AAED,MAAM,MAAM,iCAAiC,GAAG,uBAAuB,GAAG;IACxE,gBAAgB,CAAC,OAAO,EAAE,oCAAoC,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAClF,YAAY,CAAC,OAAO,EAAE,oCAAoC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3E,cAAc,CAAC,OAAO,EAAE,oCAAoC,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAC/F,aAAa,CAAC,OAAO,EAAE,oCAAoC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7E,CAAC"}
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../../lib/types/internal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAElF,MAAM,WAAW,yBAAyB;IACxC,gBAAgB,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IACrC,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,cAAc,IAAI,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAClD,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAChC;AAED,OAAO,QAAQ,+DAA+D,CAAC;IAC7E,UAAU,gCAAgC;QACxC,8BAA8B,EAAE,yBAAyB,CAAC;KAC3D;CACF;AAED,MAAM,WAAW,uBAAwB,SAAQ,eAAe;IAC9D,gBAAgB,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IACrC,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,cAAc,IAAI,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAClD,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,QAAQ,CAAC,MAAM,EAAE,yBAAyB,CAAC;CAC5C"}
@@ -1,2 +1,2 @@
1
- export declare const version = "25.1.0";
1
+ export declare const version = "26.1.0";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -16,9 +16,8 @@
16
16
  */
17
17
 
18
18
  #import <Foundation/Foundation.h>
19
+ #import "RNFBAppDistributionTurboModules.h"
19
20
 
20
- #import <React/RCTBridgeModule.h>
21
-
22
- @interface RNFBAppDistributionModule : NSObject <RCTBridgeModule>
21
+ @interface RNFBAppDistributionModule : NSObject <NativeRNFBTurboAppDistributionSpec>
23
22
 
24
23
  @end
@@ -15,38 +15,63 @@
15
15
  *
16
16
  */
17
17
 
18
+ #if __has_include(<Firebase/Firebase.h>)
18
19
  #import <Firebase/Firebase.h>
20
+ #define RNFB_APP_DISTRIBUTION_SDK_AVAILABLE 1
21
+ #elif __has_include(<FirebaseAppDistribution/FirebaseAppDistribution.h>)
22
+ #import <FirebaseAppDistribution/FirebaseAppDistribution.h>
23
+ #import <FirebaseCore/FirebaseCore.h>
24
+ #define RNFB_APP_DISTRIBUTION_SDK_AVAILABLE 1
25
+ #else
26
+ // Product headers absent (typical Mac Catalyst + SPM). Never fall through to
27
+ // @import in this .mm — that requires -fcxx-modules and breaks RN C++/JSI.
28
+ #define RNFB_APP_DISTRIBUTION_SDK_AVAILABLE 0
29
+ #endif
19
30
  #import <React/RCTUtils.h>
20
31
 
21
32
  #import "RNFBApp/RNFBSharedUtils.h"
22
33
  #import "RNFBAppDistributionModule.h"
23
34
 
24
35
  @implementation RNFBAppDistributionModule
25
- #pragma mark -
26
- #pragma mark Module Setup
27
36
 
28
- RCT_EXPORT_MODULE();
37
+ RCT_EXPORT_MODULE(NativeRNFBTurboAppDistribution)
29
38
 
30
- - (dispatch_queue_t)methodQueue {
31
- return dispatch_get_main_queue();
39
+ + (BOOL)requiresMainQueueSetup {
40
+ return NO;
32
41
  }
33
42
 
34
- #pragma mark -
35
- #pragma mark Firebase AppDistribution Methods
43
+ - (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
44
+ (const facebook::react::ObjCTurboModule::InitParams &)params {
45
+ return std::make_shared<facebook::react::NativeRNFBTurboAppDistributionSpecJSI>(params);
46
+ }
47
+
48
+ #if !RNFB_APP_DISTRIBUTION_SDK_AVAILABLE
49
+ - (void)rejectUnavailable:(RCTPromiseRejectBlock)reject {
50
+ [RNFBSharedUtils rejectPromiseWithUserInfo:reject
51
+ userInfo:(NSMutableDictionary *)@{
52
+ @"code" : @"unsupported",
53
+ @"message" : @"Firebase App Distribution is not available on "
54
+ @"this platform or dependency configuration.",
55
+ }];
56
+ }
57
+ #endif
36
58
 
37
- RCT_EXPORT_METHOD(isTesterSignedIn
38
- : (RCTPromiseResolveBlock)resolve rejecter
39
- : (RCTPromiseRejectBlock)reject) {
59
+ - (void)isTesterSignedIn:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
60
+ #if RNFB_APP_DISTRIBUTION_SDK_AVAILABLE
40
61
  FIRAppDistribution *appDistribution = [FIRAppDistribution appDistribution];
41
62
  BOOL isTesterSignedIn = appDistribution.isTesterSignedIn;
42
63
  resolve([NSNumber numberWithBool:isTesterSignedIn]);
64
+ #else
65
+ (void)resolve;
66
+ [self rejectUnavailable:reject];
67
+ #endif
43
68
  }
44
69
 
45
- RCT_EXPORT_METHOD(signInTester : (RCTPromiseResolveBlock)resolve : (RCTPromiseRejectBlock)reject) {
70
+ - (void)signInTester:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
71
+ #if RNFB_APP_DISTRIBUTION_SDK_AVAILABLE
46
72
  FIRAppDistribution *appDistribution = [FIRAppDistribution appDistribution];
47
73
  [appDistribution signInTesterWithCompletion:^(NSError *_Nullable error) {
48
74
  if (error != nil) {
49
- // Handle any errors if the signIn failed
50
75
  DLog(@"Unable to signInTester: %@", error);
51
76
  [RNFBSharedUtils rejectPromiseWithUserInfo:reject
52
77
  userInfo:(NSMutableDictionary *)@{
@@ -58,23 +83,28 @@ RCT_EXPORT_METHOD(signInTester : (RCTPromiseResolveBlock)resolve : (RCTPromiseRe
58
83
 
59
84
  resolve([NSNull null]);
60
85
  }];
86
+ #else
87
+ (void)resolve;
88
+ [self rejectUnavailable:reject];
89
+ #endif
61
90
  }
62
91
 
63
- RCT_EXPORT_METHOD(signOutTester
64
- : (RCTPromiseResolveBlock)resolve rejecter
65
- : (RCTPromiseRejectBlock)reject) {
92
+ - (void)signOutTester:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
93
+ #if RNFB_APP_DISTRIBUTION_SDK_AVAILABLE
66
94
  [[FIRAppDistribution appDistribution] signOutTester];
67
95
  resolve([NSNull null]);
96
+ #else
97
+ (void)resolve;
98
+ [self rejectUnavailable:reject];
99
+ #endif
68
100
  }
69
101
 
70
- RCT_EXPORT_METHOD(checkForUpdate
71
- : (RCTPromiseResolveBlock)resolve
72
- : (RCTPromiseRejectBlock)reject) {
102
+ - (void)checkForUpdate:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
103
+ #if RNFB_APP_DISTRIBUTION_SDK_AVAILABLE
73
104
  FIRAppDistribution *appDistribution = [FIRAppDistribution appDistribution];
74
105
  [appDistribution checkForUpdateWithCompletion:^(FIRAppDistributionRelease *_Nullable release,
75
106
  NSError *_Nullable error) {
76
107
  if (error != nil) {
77
- // Handle any errors if the release was not retrieved.
78
108
  DLog(@"Unable to check App Distribution release: %@", error);
79
109
  [RNFBSharedUtils rejectPromiseWithUserInfo:reject
80
110
  userInfo:(NSMutableDictionary *)@{
@@ -84,7 +114,7 @@ RCT_EXPORT_METHOD(checkForUpdate
84
114
  return;
85
115
  }
86
116
  if (release == nil) {
87
- DLog(@"Unable to check App Distribution release: %@", error);
117
+ DLog(@"Unable to check App Distribution release.");
88
118
  [RNFBSharedUtils rejectPromiseWithUserInfo:reject
89
119
  userInfo:(NSMutableDictionary *)@{
90
120
  @"code" : @"checkupdate-null",
@@ -101,6 +131,10 @@ RCT_EXPORT_METHOD(checkForUpdate
101
131
  @"downloadURL" : release.downloadURL.absoluteString
102
132
  });
103
133
  }];
134
+ #else
135
+ (void)resolve;
136
+ [self rejectUnavailable:reject];
137
+ #endif
104
138
  }
105
139
 
106
140
  @end
@@ -7,7 +7,7 @@
7
7
  objects = {
8
8
 
9
9
  /* Begin PBXBuildFile section */
10
- 2744B98621F45429004F8E3F /* RNFBAppDistributionModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 2744B98521F45429004F8E3F /* RNFBAppDistributionModule.m */; };
10
+ 2744B98621F45429004F8E3F /* RNFBAppDistributionModule.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2744B98521F45429004F8E3F /* RNFBAppDistributionModule.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 /* libRNFBAppDistribution.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNFBAppDistribution.a; sourceTree = BUILT_PRODUCTS_DIR; };
27
27
  2744B98421F45429004F8E3F /* RNFBAppDistributionModule.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RNFBAppDistributionModule.h; path = RNFBAppDistribution/RNFBAppDistributionModule.h; sourceTree = SOURCE_ROOT; };
28
- 2744B98521F45429004F8E3F /* RNFBAppDistributionModule.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = RNFBAppDistributionModule.m; path = RNFBAppDistribution/RNFBAppDistributionModule.m; sourceTree = SOURCE_ROOT; };
28
+ 2744B98521F45429004F8E3F /* RNFBAppDistributionModule.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = RNFBAppDistributionModule.mm; path = RNFBAppDistribution/RNFBAppDistributionModule.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 /* RNFBAppDistributionModule.h */,
56
- 2744B98521F45429004F8E3F /* RNFBAppDistributionModule.m */,
56
+ 2744B98521F45429004F8E3F /* RNFBAppDistributionModule.mm */,
57
57
  );
58
58
  path = RNFBAppDistribution;
59
59
  sourceTree = "<group>";
@@ -124,7 +124,7 @@
124
124
  isa = PBXSourcesBuildPhase;
125
125
  buildActionMask = 2147483647;
126
126
  files = (
127
- 2744B98621F45429004F8E3F /* RNFBAppDistributionModule.m in Sources */,
127
+ 2744B98621F45429004F8E3F /* RNFBAppDistributionModule.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,60 @@
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 "RNFBAppDistributionTurboModules.h"
15
+
16
+
17
+ @implementation NativeRNFBTurboAppDistributionSpecBase
18
+
19
+
20
+ - (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper
21
+ {
22
+ _eventEmitterCallback = std::move(eventEmitterCallbackWrapper->_eventEmitterCallback);
23
+ }
24
+ @end
25
+
26
+
27
+ namespace facebook::react {
28
+
29
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboAppDistributionSpecJSI_isTesterSignedIn(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
30
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "isTesterSignedIn", @selector(isTesterSignedIn:reject:), args, count);
31
+ }
32
+
33
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboAppDistributionSpecJSI_signInTester(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
34
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "signInTester", @selector(signInTester:reject:), args, count);
35
+ }
36
+
37
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboAppDistributionSpecJSI_signOutTester(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
38
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "signOutTester", @selector(signOutTester:reject:), args, count);
39
+ }
40
+
41
+ static facebook::jsi::Value __hostFunction_NativeRNFBTurboAppDistributionSpecJSI_checkForUpdate(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
42
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "checkForUpdate", @selector(checkForUpdate:reject:), args, count);
43
+ }
44
+
45
+ NativeRNFBTurboAppDistributionSpecJSI::NativeRNFBTurboAppDistributionSpecJSI(const ObjCTurboModule::InitParams &params)
46
+ : ObjCTurboModule(params) {
47
+
48
+ methodMap_["isTesterSignedIn"] = MethodMetadata {0, __hostFunction_NativeRNFBTurboAppDistributionSpecJSI_isTesterSignedIn};
49
+
50
+
51
+ methodMap_["signInTester"] = MethodMetadata {0, __hostFunction_NativeRNFBTurboAppDistributionSpecJSI_signInTester};
52
+
53
+
54
+ methodMap_["signOutTester"] = MethodMetadata {0, __hostFunction_NativeRNFBTurboAppDistributionSpecJSI_signOutTester};
55
+
56
+
57
+ methodMap_["checkForUpdate"] = MethodMetadata {0, __hostFunction_NativeRNFBTurboAppDistributionSpecJSI_checkForUpdate};
58
+
59
+ }
60
+ } // namespace facebook::react
@@ -0,0 +1,69 @@
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 RNFBAppDistributionTurboModules symbols
19
+ #ifndef RNFBAppDistributionTurboModules_H
20
+ #define RNFBAppDistributionTurboModules_H
21
+
22
+ #import <Foundation/Foundation.h>
23
+ #import <RCTRequired/RCTRequired.h>
24
+ #import <RCTTypeSafety/RCTConvertHelpers.h>
25
+ #import <RCTTypeSafety/RCTTypedModuleConstants.h>
26
+ #import <React/RCTBridgeModule.h>
27
+ #import <React/RCTCxxConvert.h>
28
+ #import <React/RCTManagedPointer.h>
29
+ #import <ReactCommon/RCTTurboModule.h>
30
+ #import <optional>
31
+ #import <vector>
32
+
33
+
34
+ NS_ASSUME_NONNULL_BEGIN
35
+
36
+ @protocol NativeRNFBTurboAppDistributionSpec <RCTBridgeModule, RCTTurboModule>
37
+
38
+ - (void)isTesterSignedIn:(RCTPromiseResolveBlock)resolve
39
+ reject:(RCTPromiseRejectBlock)reject;
40
+ - (void)signInTester:(RCTPromiseResolveBlock)resolve
41
+ reject:(RCTPromiseRejectBlock)reject;
42
+ - (void)signOutTester:(RCTPromiseResolveBlock)resolve
43
+ reject:(RCTPromiseRejectBlock)reject;
44
+ - (void)checkForUpdate:(RCTPromiseResolveBlock)resolve
45
+ reject:(RCTPromiseRejectBlock)reject;
46
+
47
+ @end
48
+
49
+ @interface NativeRNFBTurboAppDistributionSpecBase : NSObject {
50
+ @protected
51
+ facebook::react::EventEmitterCallback _eventEmitterCallback;
52
+ }
53
+ - (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper;
54
+
55
+
56
+ @end
57
+
58
+ namespace facebook::react {
59
+ /**
60
+ * ObjC++ class for module 'NativeRNFBTurboAppDistribution'
61
+ */
62
+ class JSI_EXPORT NativeRNFBTurboAppDistributionSpecJSI : public ObjCTurboModule {
63
+ public:
64
+ NativeRNFBTurboAppDistributionSpecJSI(const ObjCTurboModule::InitParams &params);
65
+ };
66
+ } // namespace facebook::react
67
+
68
+ NS_ASSUME_NONNULL_END
69
+ #endif // RNFBAppDistributionTurboModules_H
@@ -0,0 +1,44 @@
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 "RNFBAppDistributionTurboModulesJSI.h"
11
+
12
+ namespace facebook::react {
13
+
14
+ static jsi::Value __hostFunction_NativeRNFBTurboAppDistributionCxxSpecJSI_isTesterSignedIn(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
15
+ return static_cast<NativeRNFBTurboAppDistributionCxxSpecJSI *>(&turboModule)->isTesterSignedIn(
16
+ rt
17
+ );
18
+ }
19
+ static jsi::Value __hostFunction_NativeRNFBTurboAppDistributionCxxSpecJSI_signInTester(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
20
+ return static_cast<NativeRNFBTurboAppDistributionCxxSpecJSI *>(&turboModule)->signInTester(
21
+ rt
22
+ );
23
+ }
24
+ static jsi::Value __hostFunction_NativeRNFBTurboAppDistributionCxxSpecJSI_signOutTester(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
25
+ return static_cast<NativeRNFBTurboAppDistributionCxxSpecJSI *>(&turboModule)->signOutTester(
26
+ rt
27
+ );
28
+ }
29
+ static jsi::Value __hostFunction_NativeRNFBTurboAppDistributionCxxSpecJSI_checkForUpdate(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
30
+ return static_cast<NativeRNFBTurboAppDistributionCxxSpecJSI *>(&turboModule)->checkForUpdate(
31
+ rt
32
+ );
33
+ }
34
+
35
+ NativeRNFBTurboAppDistributionCxxSpecJSI::NativeRNFBTurboAppDistributionCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
36
+ : TurboModule("NativeRNFBTurboAppDistribution", jsInvoker) {
37
+ methodMap_["isTesterSignedIn"] = MethodMetadata {0, __hostFunction_NativeRNFBTurboAppDistributionCxxSpecJSI_isTesterSignedIn};
38
+ methodMap_["signInTester"] = MethodMetadata {0, __hostFunction_NativeRNFBTurboAppDistributionCxxSpecJSI_signInTester};
39
+ methodMap_["signOutTester"] = MethodMetadata {0, __hostFunction_NativeRNFBTurboAppDistributionCxxSpecJSI_signOutTester};
40
+ methodMap_["checkForUpdate"] = MethodMetadata {0, __hostFunction_NativeRNFBTurboAppDistributionCxxSpecJSI_checkForUpdate};
41
+ }
42
+
43
+
44
+ } // namespace facebook::react