@react-native-firebase/app-distribution 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 (59) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/RNFBAppDistribution.podspec +7 -6
  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} +12 -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
@@ -0,0 +1,166 @@
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: GenerateModuleH.js
8
+ */
9
+
10
+ #pragma once
11
+
12
+ #include <ReactCommon/TurboModule.h>
13
+ #include <react/bridging/Bridging.h>
14
+
15
+ namespace facebook::react {
16
+
17
+
18
+
19
+ #pragma mark - NativeRNFBTurboAppDistributionAppDistributionRelease
20
+
21
+ template <typename P0, typename P1, typename P2, typename P3, typename P4>
22
+ struct NativeRNFBTurboAppDistributionAppDistributionRelease {
23
+ P0 displayVersion;
24
+ P1 buildVersion;
25
+ P2 releaseNotes;
26
+ P3 isExpired;
27
+ P4 downloadURL;
28
+ bool operator==(const NativeRNFBTurboAppDistributionAppDistributionRelease &other) const {
29
+ return displayVersion == other.displayVersion && buildVersion == other.buildVersion && releaseNotes == other.releaseNotes && isExpired == other.isExpired && downloadURL == other.downloadURL;
30
+ }
31
+ };
32
+
33
+ template <typename T>
34
+ struct NativeRNFBTurboAppDistributionAppDistributionReleaseBridging {
35
+ static T types;
36
+
37
+ static T fromJs(
38
+ jsi::Runtime &rt,
39
+ const jsi::Object &value,
40
+ const std::shared_ptr<CallInvoker> &jsInvoker) {
41
+ T result{
42
+ bridging::fromJs<decltype(types.displayVersion)>(rt, value.getProperty(rt, "displayVersion"), jsInvoker),
43
+ bridging::fromJs<decltype(types.buildVersion)>(rt, value.getProperty(rt, "buildVersion"), jsInvoker),
44
+ bridging::fromJs<decltype(types.releaseNotes)>(rt, value.getProperty(rt, "releaseNotes"), jsInvoker),
45
+ bridging::fromJs<decltype(types.isExpired)>(rt, value.getProperty(rt, "isExpired"), jsInvoker),
46
+ bridging::fromJs<decltype(types.downloadURL)>(rt, value.getProperty(rt, "downloadURL"), jsInvoker)};
47
+ return result;
48
+ }
49
+
50
+ #ifdef DEBUG
51
+ static jsi::String displayVersionToJs(jsi::Runtime &rt, decltype(types.displayVersion) value) {
52
+ return bridging::toJs(rt, value);
53
+ }
54
+
55
+ static jsi::String buildVersionToJs(jsi::Runtime &rt, decltype(types.buildVersion) value) {
56
+ return bridging::toJs(rt, value);
57
+ }
58
+
59
+ static std::optional<jsi::String> releaseNotesToJs(jsi::Runtime &rt, decltype(types.releaseNotes) value) {
60
+ return bridging::toJs(rt, value);
61
+ }
62
+
63
+ static bool isExpiredToJs(jsi::Runtime &rt, decltype(types.isExpired) value) {
64
+ return bridging::toJs(rt, value);
65
+ }
66
+
67
+ static jsi::String downloadURLToJs(jsi::Runtime &rt, decltype(types.downloadURL) value) {
68
+ return bridging::toJs(rt, value);
69
+ }
70
+ #endif
71
+
72
+ static jsi::Object toJs(
73
+ jsi::Runtime &rt,
74
+ const T &value,
75
+ const std::shared_ptr<CallInvoker> &jsInvoker) {
76
+ auto result = facebook::jsi::Object(rt);
77
+ result.setProperty(rt, "displayVersion", bridging::toJs(rt, value.displayVersion, jsInvoker));
78
+ result.setProperty(rt, "buildVersion", bridging::toJs(rt, value.buildVersion, jsInvoker));
79
+ result.setProperty(rt, "releaseNotes", bridging::toJs(rt, value.releaseNotes, jsInvoker));
80
+ result.setProperty(rt, "isExpired", bridging::toJs(rt, value.isExpired, jsInvoker));
81
+ result.setProperty(rt, "downloadURL", bridging::toJs(rt, value.downloadURL, jsInvoker));
82
+ return result;
83
+ }
84
+ };
85
+
86
+ class JSI_EXPORT NativeRNFBTurboAppDistributionCxxSpecJSI : public TurboModule {
87
+ protected:
88
+ NativeRNFBTurboAppDistributionCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
89
+
90
+ public:
91
+ virtual jsi::Value isTesterSignedIn(jsi::Runtime &rt) = 0;
92
+ virtual jsi::Value signInTester(jsi::Runtime &rt) = 0;
93
+ virtual jsi::Value signOutTester(jsi::Runtime &rt) = 0;
94
+ virtual jsi::Value checkForUpdate(jsi::Runtime &rt) = 0;
95
+
96
+ };
97
+
98
+ template <typename T>
99
+ class JSI_EXPORT NativeRNFBTurboAppDistributionCxxSpec : public TurboModule {
100
+ public:
101
+ jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
102
+ return delegate_.create(rt, propName);
103
+ }
104
+
105
+ std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime& runtime) override {
106
+ return delegate_.getPropertyNames(runtime);
107
+ }
108
+
109
+ static constexpr std::string_view kModuleName = "NativeRNFBTurboAppDistribution";
110
+
111
+ protected:
112
+ NativeRNFBTurboAppDistributionCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
113
+ : TurboModule(std::string{NativeRNFBTurboAppDistributionCxxSpec::kModuleName}, jsInvoker),
114
+ delegate_(reinterpret_cast<T*>(this), jsInvoker) {}
115
+
116
+
117
+ private:
118
+ class Delegate : public NativeRNFBTurboAppDistributionCxxSpecJSI {
119
+ public:
120
+ Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
121
+ NativeRNFBTurboAppDistributionCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {
122
+
123
+ }
124
+
125
+ jsi::Value isTesterSignedIn(jsi::Runtime &rt) override {
126
+ static_assert(
127
+ bridging::getParameterCount(&T::isTesterSignedIn) == 1,
128
+ "Expected isTesterSignedIn(...) to have 1 parameters");
129
+
130
+ return bridging::callFromJs<jsi::Value>(
131
+ rt, &T::isTesterSignedIn, jsInvoker_, instance_);
132
+ }
133
+ jsi::Value signInTester(jsi::Runtime &rt) override {
134
+ static_assert(
135
+ bridging::getParameterCount(&T::signInTester) == 1,
136
+ "Expected signInTester(...) to have 1 parameters");
137
+
138
+ return bridging::callFromJs<jsi::Value>(
139
+ rt, &T::signInTester, jsInvoker_, instance_);
140
+ }
141
+ jsi::Value signOutTester(jsi::Runtime &rt) override {
142
+ static_assert(
143
+ bridging::getParameterCount(&T::signOutTester) == 1,
144
+ "Expected signOutTester(...) to have 1 parameters");
145
+
146
+ return bridging::callFromJs<jsi::Value>(
147
+ rt, &T::signOutTester, jsInvoker_, instance_);
148
+ }
149
+ jsi::Value checkForUpdate(jsi::Runtime &rt) override {
150
+ static_assert(
151
+ bridging::getParameterCount(&T::checkForUpdate) == 1,
152
+ "Expected checkForUpdate(...) to have 1 parameters");
153
+
154
+ return bridging::callFromJs<jsi::Value>(
155
+ rt, &T::checkForUpdate, jsInvoker_, instance_);
156
+ }
157
+
158
+ private:
159
+ friend class NativeRNFBTurboAppDistributionCxxSpec;
160
+ T *instance_;
161
+ };
162
+
163
+ Delegate delegate_;
164
+ };
165
+
166
+ } // namespace facebook::react
@@ -0,0 +1,34 @@
1
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2
+ #
3
+ # This source code is licensed under the MIT license found in the
4
+ # LICENSE file in the root directory of this source tree.
5
+
6
+ version = "0.78.3"
7
+ source = { :git => 'https://github.com/facebook/react-native.git' }
8
+ if version == '1000.0.0'
9
+ # This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
10
+ source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1")
11
+ else
12
+ source[:tag] = "v#{version}"
13
+ end
14
+
15
+ Pod::Spec.new do |s|
16
+ s.name = "ReactAppDependencyProvider"
17
+ s.version = version
18
+ s.summary = "The third party dependency provider for the app"
19
+ s.homepage = "https://reactnative.dev/"
20
+ s.documentation_url = "https://reactnative.dev/"
21
+ s.license = "MIT"
22
+ s.author = "Meta Platforms, Inc. and its affiliates"
23
+ s.platforms = min_supported_versions
24
+ s.source = source
25
+ s.source_files = "**/RCTAppDependencyProvider.{h,mm}"
26
+
27
+ # This guard prevent to install the dependencies when we run `pod install` in the old architecture.
28
+ s.pod_target_xcconfig = {
29
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
30
+ "DEFINES_MODULE" => "YES"
31
+ }
32
+
33
+ s.dependency "ReactCodegen"
34
+ end
package/lib/index.ts CHANGED
@@ -15,9 +15,97 @@
15
15
  *
16
16
  */
17
17
 
18
- export type { AppDistribution, AppDistributionRelease } from './types/app-distribution';
19
- export type { FirebaseAppDistributionTypes } from './types/namespaced';
18
+ import type { FirebaseApp } from '@react-native-firebase/app';
19
+ import { isIOS } from '@react-native-firebase/app/dist/module/common';
20
+ import {
21
+ FirebaseModule,
22
+ getOrCreateModularInstance,
23
+ } from '@react-native-firebase/app/dist/module/internal';
24
+ import type { ModuleConfig } from '@react-native-firebase/app/dist/module/internal';
25
+ import { Platform } from 'react-native';
26
+ import './types/internal';
27
+ import type { AppDistribution, AppDistributionRelease } from './types/app-distribution';
28
+ import type { AppDistributionInternal } from './types/internal';
29
+ import { version } from './version';
30
+
31
+ const nativeModuleName = 'NativeRNFBTurboAppDistribution';
32
+
33
+ function rejectUnsupportedPlatform<T>(): Promise<T> {
34
+ return Promise.reject(
35
+ new Error(`App Distribution is not supported on the ${Platform.OS} platform.`),
36
+ );
37
+ }
38
+
39
+ class FirebaseAppDistributionModule extends FirebaseModule<typeof nativeModuleName> {
40
+ isTesterSignedIn(): Promise<boolean> {
41
+ if (isIOS) {
42
+ return this.native.isTesterSignedIn();
43
+ }
44
+
45
+ return rejectUnsupportedPlatform();
46
+ }
47
+
48
+ signInTester(): Promise<void> {
49
+ if (isIOS) {
50
+ return this.native.signInTester();
51
+ }
52
+
53
+ return rejectUnsupportedPlatform();
54
+ }
55
+
56
+ checkForUpdate(): Promise<AppDistributionRelease> {
57
+ if (isIOS) {
58
+ return this.native.checkForUpdate();
59
+ }
60
+
61
+ return rejectUnsupportedPlatform();
62
+ }
63
+
64
+ signOutTester(): Promise<void> {
65
+ if (isIOS) {
66
+ return this.native.signOutTester();
67
+ }
20
68
 
21
- export * from './modular';
22
- export * from './namespaced';
23
- export { default } from './namespaced';
69
+ return rejectUnsupportedPlatform();
70
+ }
71
+ }
72
+
73
+ const config: ModuleConfig = {
74
+ namespace: 'appDistribution',
75
+ nativeModuleName,
76
+ nativeEvents: false,
77
+ hasMultiAppSupport: false,
78
+ hasCustomUrlOrRegionSupport: false,
79
+ turboModule: true,
80
+ };
81
+
82
+ export const SDK_VERSION = version;
83
+
84
+ /**
85
+ * Returns the {@link AppDistribution} instance for the default or given {@link FirebaseApp}.
86
+ */
87
+ export function getAppDistribution(app?: FirebaseApp): AppDistribution {
88
+ return getOrCreateModularInstance(
89
+ FirebaseAppDistributionModule,
90
+ config,
91
+ app,
92
+ ) as unknown as AppDistribution;
93
+ }
94
+
95
+ export function isTesterSignedIn(appDistribution: AppDistribution): Promise<boolean> {
96
+ return (appDistribution as AppDistributionInternal).isTesterSignedIn();
97
+ }
98
+
99
+ export function signInTester(appDistribution: AppDistribution): Promise<void> {
100
+ return (appDistribution as AppDistributionInternal).signInTester();
101
+ }
102
+
103
+ export function checkForUpdate(appDistribution: AppDistribution): Promise<AppDistributionRelease> {
104
+ return (appDistribution as AppDistributionInternal).checkForUpdate();
105
+ }
106
+
107
+ export function signOutTester(appDistribution: AppDistribution): Promise<void> {
108
+ return (appDistribution as AppDistributionInternal).signOutTester();
109
+ }
110
+
111
+ export type { AppDistribution, AppDistributionRelease } from './types/app-distribution';
@@ -1,7 +1,5 @@
1
1
  import type { AppDistribution, AppDistributionRelease } from './app-distribution';
2
2
 
3
- export type AppDistributionModularDeprecationArg = string;
4
-
5
3
  export interface RNFBAppDistributionModule {
6
4
  isTesterSignedIn(): Promise<boolean>;
7
5
  signInTester(): Promise<void>;
@@ -11,17 +9,14 @@ export interface RNFBAppDistributionModule {
11
9
 
12
10
  declare module '@react-native-firebase/app/dist/module/internal/NativeModules' {
13
11
  interface ReactNativeFirebaseNativeModules {
14
- RNFBAppDistributionModule: RNFBAppDistributionModule;
12
+ NativeRNFBTurboAppDistribution: RNFBAppDistributionModule;
15
13
  }
16
14
  }
17
15
 
18
16
  export interface AppDistributionInternal extends AppDistribution {
17
+ isTesterSignedIn(): Promise<boolean>;
18
+ signInTester(): Promise<void>;
19
+ checkForUpdate(): Promise<AppDistributionRelease>;
20
+ signOutTester(): Promise<void>;
19
21
  readonly native: RNFBAppDistributionModule;
20
22
  }
21
-
22
- export type AppDistributionWithDeprecationArg = AppDistributionInternal & {
23
- isTesterSignedIn(_depArg: AppDistributionModularDeprecationArg): Promise<boolean>;
24
- signInTester(_depArg: AppDistributionModularDeprecationArg): Promise<void>;
25
- checkForUpdate(_depArg: AppDistributionModularDeprecationArg): Promise<AppDistributionRelease>;
26
- signOutTester(_depArg: AppDistributionModularDeprecationArg): Promise<void>;
27
- };
package/lib/version.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- export const version = '25.1.0';
2
+ export const version = '26.0.0';
package/package.json CHANGED
@@ -1,17 +1,34 @@
1
1
  {
2
2
  "name": "@react-native-firebase/app-distribution",
3
- "version": "25.1.0",
3
+ "version": "26.0.0",
4
4
  "author": "Invertase <oss@invertase.io> (http://invertase.io)",
5
5
  "description": "React Native Firebase - App Distribution",
6
6
  "main": "./dist/module/index.js",
7
7
  "types": "./dist/typescript/lib/index.d.ts",
8
+ "codegenConfig": {
9
+ "name": "RNFBAppDistributionTurboModules",
10
+ "type": "modules",
11
+ "jsSrcsDir": "specs",
12
+ "includesGeneratedCode": true,
13
+ "android": {
14
+ "javaPackageName": "io.invertase.firebase.appdistribution"
15
+ },
16
+ "ios": {
17
+ "modulesProvider": {
18
+ "NativeRNFBTurboAppDistribution": "RNFBAppDistributionModule"
19
+ }
20
+ }
21
+ },
8
22
  "scripts": {
9
23
  "build": "genversion --esm --semi lib/version.ts",
10
24
  "build:clean": "rimraf android/build && rimraf ios/build",
11
25
  "build:plugin": "rimraf plugin/build && tsc --build plugin",
12
26
  "compile": "bob build",
13
27
  "lint:plugin": "eslint plugin/src/*",
14
- "prepare": "yarn run build && yarn compile && yarn run build:plugin"
28
+ "prepare": "yarn run build && yarn compile && yarn run build:plugin",
29
+ "codegen": "yarn android:codegen && yarn ios:codegen",
30
+ "android:codegen": "npx @react-native-community/cli codegen --platform android --outputPath=./android/src/main/java/io/invertase/firebase/appdistribution/generated",
31
+ "ios:codegen": "npx @react-native-community/cli codegen --platform ios --outputPath=./ios/generated"
15
32
  },
16
33
  "repository": {
17
34
  "type": "git",
@@ -25,10 +42,11 @@
25
42
  "app-distribution"
26
43
  ],
27
44
  "peerDependencies": {
28
- "@react-native-firebase/app": "25.1.0",
45
+ "@react-native-firebase/app": "26.0.0",
29
46
  "expo": ">=47.0.0"
30
47
  },
31
48
  "devDependencies": {
49
+ "@react-native-firebase/app": "26.0.0",
32
50
  "expo": "^55.0.18",
33
51
  "react-native-builder-bob": "^0.41.0"
34
52
  },
@@ -47,7 +65,14 @@
47
65
  "types": "./dist/typescript/lib/index.d.ts",
48
66
  "default": "./dist/module/index.js"
49
67
  },
50
- "./app.plugin.js": "./app.plugin.js",
68
+ "./app.plugin": {
69
+ "types": "./plugin/build/app.plugin.d.ts",
70
+ "default": "./app.plugin.js"
71
+ },
72
+ "./app.plugin.js": {
73
+ "types": "./plugin/build/app.plugin.d.ts",
74
+ "default": "./app.plugin.js"
75
+ },
51
76
  "./package.json": "./package.json"
52
77
  },
53
78
  "react-native-builder-bob": {
@@ -72,5 +97,5 @@
72
97
  "node_modules/",
73
98
  "dist/"
74
99
  ],
75
- "gitHead": "e0a565d8a73a9b103d140ffacfb8876b30d8bdc5"
100
+ "gitHead": "2a360acb2aebdd39dd40e31be386b30697270626"
76
101
  }
@@ -0,0 +1,2 @@
1
+ import plugin from './index';
2
+ export = plugin;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ const index_1 = __importDefault(require("./index"));
6
+ module.exports = index_1.default;
@@ -0,0 +1,3 @@
1
+ import plugin from './index';
2
+
3
+ export = plugin;
@@ -1 +1 @@
1
- {"root":["./src/index.ts","./src/android/applyPlugin.ts","./src/android/buildscriptDependency.ts","./src/android/constants.ts","./src/android/index.ts"],"version":"6.0.3"}
1
+ {"root":["./src/app.plugin.ts","./src/index.ts","./src/android/applyPlugin.ts","./src/android/buildscriptDependency.ts","./src/android/constants.ts","./src/android/index.ts"],"version":"6.0.3"}
@@ -0,0 +1,10 @@
1
+ module.exports = {
2
+ dependency: {
3
+ platforms: {
4
+ android: {
5
+ cmakeListsPath:
6
+ './src/main/java/io/invertase/firebase/appdistribution/generated/jni/CMakeLists.txt',
7
+ },
8
+ },
9
+ },
10
+ };
@@ -0,0 +1,19 @@
1
+ import type { TurboModule } from 'react-native';
2
+ import { TurboModuleRegistry } from 'react-native';
3
+
4
+ export interface AppDistributionRelease {
5
+ displayVersion: string;
6
+ buildVersion: string;
7
+ releaseNotes: string | null;
8
+ isExpired: boolean;
9
+ downloadURL: string;
10
+ }
11
+
12
+ export interface Spec extends TurboModule {
13
+ isTesterSignedIn(): Promise<boolean>;
14
+ signInTester(): Promise<void>;
15
+ signOutTester(): Promise<void>;
16
+ checkForUpdate(): Promise<AppDistributionRelease>;
17
+ }
18
+
19
+ export default TurboModuleRegistry.getEnforcing<Spec>('NativeRNFBTurboAppDistribution');
@@ -1,43 +0,0 @@
1
- "use strict";
2
-
3
- /*
4
- * Copyright (c) 2016-present Invertase Limited & Contributors
5
- *
6
- * Licensed under the Apache License, Version 2.0 (the "License");
7
- * you may not use this library except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing, software
13
- * distributed under the License is distributed on an "AS IS" BASIS,
14
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- * See the License for the specific language governing permissions and
16
- * limitations under the License.
17
- *
18
- */
19
-
20
- import { getApp } from '@react-native-firebase/app';
21
- import { MODULAR_DEPRECATION_ARG } from '@react-native-firebase/app/dist/module/common';
22
- function ap(appDistribution) {
23
- return appDistribution;
24
- }
25
- export function getAppDistribution(app) {
26
- if (app) {
27
- return getApp(app.name).appDistribution();
28
- }
29
- return getApp().appDistribution();
30
- }
31
- export function isTesterSignedIn(appDistribution) {
32
- return ap(appDistribution).isTesterSignedIn.call(appDistribution, MODULAR_DEPRECATION_ARG);
33
- }
34
- export function signInTester(appDistribution) {
35
- return ap(appDistribution).signInTester.call(appDistribution, MODULAR_DEPRECATION_ARG);
36
- }
37
- export function checkForUpdate(appDistribution) {
38
- return ap(appDistribution).checkForUpdate.call(appDistribution, MODULAR_DEPRECATION_ARG);
39
- }
40
- export function signOutTester(appDistribution) {
41
- return ap(appDistribution).signOutTester.call(appDistribution, MODULAR_DEPRECATION_ARG);
42
- }
43
- //# sourceMappingURL=modular.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["getApp","MODULAR_DEPRECATION_ARG","ap","appDistribution","getAppDistribution","app","name","isTesterSignedIn","call","signInTester","checkForUpdate","signOutTester"],"sourceRoot":"../../lib","sources":["modular.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,MAAM,QAAQ,4BAA4B;AAEnD,SAASC,uBAAuB,QAAQ,+CAA+C;AAMvF,SAASC,EAAEA,CAACC,eAAwC,EAAqC;EACvF,OAAOA,eAAe;AACxB;AAEA,OAAO,SAASC,kBAAkBA,CAACC,GAAqC,EAA2B;EACjG,IAAIA,GAAG,EAAE;IACP,OAAOL,MAAM,CAACK,GAAG,CAACC,IAAI,CAAC,CAACH,eAAe,CAAC,CAAC;EAC3C;EAEA,OAAOH,MAAM,CAAC,CAAC,CAACG,eAAe,CAAC,CAAC;AACnC;AAEA,OAAO,SAASI,gBAAgBA,CAACJ,eAAwC,EAAoB;EAC3F,OAAOD,EAAE,CAACC,eAAe,CAAC,CAACI,gBAAgB,CAACC,IAAI,CAACL,eAAe,EAAEF,uBAAuB,CAAC;AAC5F;AAEA,OAAO,SAASQ,YAAYA,CAACN,eAAwC,EAAiB;EACpF,OAAOD,EAAE,CAACC,eAAe,CAAC,CAACM,YAAY,CAACD,IAAI,CAACL,eAAe,EAAEF,uBAAuB,CAAC;AACxF;AAEA,OAAO,SAASS,cAAcA,CAC5BP,eAAwC,EACP;EACjC,OAAOD,EAAE,CAACC,eAAe,CAAC,CAACO,cAAc,CAACF,IAAI,CAACL,eAAe,EAAEF,uBAAuB,CAAC;AAC1F;AAEA,OAAO,SAASU,aAAaA,CAACR,eAAwC,EAAiB;EACrF,OAAOD,EAAE,CAACC,eAAe,CAAC,CAACQ,aAAa,CAACH,IAAI,CAACL,eAAe,EAAEF,uBAAuB,CAAC;AACzF","ignoreList":[]}
@@ -1,73 +0,0 @@
1
- "use strict";
2
-
3
- /*
4
- * Copyright (c) 2016-present Invertase Limited & Contributors
5
- *
6
- * Licensed under the Apache License, Version 2.0 (the "License");
7
- * you may not use this library except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing, software
13
- * distributed under the License is distributed on an "AS IS" BASIS,
14
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- * See the License for the specific language governing permissions and
16
- * limitations under the License.
17
- *
18
- */
19
-
20
- import { isIOS } from '@react-native-firebase/app/dist/module/common';
21
- import { createModuleNamespace, FirebaseModule, getFirebaseRoot } from '@react-native-firebase/app/dist/module/internal';
22
- import { Platform } from 'react-native';
23
- import { version } from "./version.js";
24
- const statics = {};
25
- const namespace = 'appDistribution';
26
- const nativeModuleName = 'RNFBAppDistributionModule';
27
- function rejectUnsupportedPlatform() {
28
- return Promise.reject(new Error(`App Distribution is not supported on the ${Platform.OS} platform.`));
29
- }
30
- class FirebaseAppDistributionModule extends FirebaseModule {
31
- isTesterSignedIn() {
32
- if (isIOS) {
33
- return this.native.isTesterSignedIn();
34
- }
35
- return rejectUnsupportedPlatform();
36
- }
37
- signInTester() {
38
- if (isIOS) {
39
- return this.native.signInTester();
40
- }
41
- return rejectUnsupportedPlatform();
42
- }
43
- checkForUpdate() {
44
- if (isIOS) {
45
- return this.native.checkForUpdate();
46
- }
47
- return rejectUnsupportedPlatform();
48
- }
49
- signOutTester() {
50
- if (isIOS) {
51
- return this.native.signOutTester();
52
- }
53
- return rejectUnsupportedPlatform();
54
- }
55
- }
56
- export const SDK_VERSION = version;
57
- const appDistributionNamespace = createModuleNamespace({
58
- statics,
59
- version,
60
- namespace,
61
- nativeModuleName,
62
- nativeEvents: false,
63
- hasMultiAppSupport: false,
64
- hasCustomUrlOrRegionSupport: false,
65
- ModuleClass: FirebaseAppDistributionModule
66
- });
67
- export default appDistributionNamespace;
68
-
69
- // import appDistribution, { firebase } from '@react-native-firebase/app-distribution';
70
- // appDistribution().X(...);
71
- // firebase.appDistribution().X(...);
72
- export const firebase = getFirebaseRoot();
73
- //# sourceMappingURL=namespaced.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["isIOS","createModuleNamespace","FirebaseModule","getFirebaseRoot","Platform","version","statics","namespace","nativeModuleName","rejectUnsupportedPlatform","Promise","reject","Error","OS","FirebaseAppDistributionModule","isTesterSignedIn","native","signInTester","checkForUpdate","signOutTester","SDK_VERSION","appDistributionNamespace","nativeEvents","hasMultiAppSupport","hasCustomUrlOrRegionSupport","ModuleClass","firebase"],"sourceRoot":"../../lib","sources":["namespaced.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,KAAK,QAAQ,+CAA+C;AACrE,SACEC,qBAAqB,EACrBC,cAAc,EACdC,eAAe,QACV,iDAAiD;AACxD,SAASC,QAAQ,QAAQ,cAAc;AAGvC,SAASC,OAAO,QAAQ,cAAW;AAEnC,MAAMC,OAAO,GAAG,CAAC,CAAC;AAElB,MAAMC,SAAS,GAAG,iBAAiB;AAEnC,MAAMC,gBAAgB,GAAG,2BAA2B;AAEpD,SAASC,yBAAyBA,CAAA,EAAkB;EAClD,OAAOC,OAAO,CAACC,MAAM,CACnB,IAAIC,KAAK,CAAC,4CAA4CR,QAAQ,CAACS,EAAE,YAAY,CAC/E,CAAC;AACH;AAEA,MAAMC,6BAA6B,SAASZ,cAAc,CAA0B;EAClFa,gBAAgBA,CAAA,EAAqB;IACnC,IAAIf,KAAK,EAAE;MACT,OAAO,IAAI,CAACgB,MAAM,CAACD,gBAAgB,CAAC,CAAC;IACvC;IAEA,OAAON,yBAAyB,CAAC,CAAC;EACpC;EAEAQ,YAAYA,CAAA,EAAkB;IAC5B,IAAIjB,KAAK,EAAE;MACT,OAAO,IAAI,CAACgB,MAAM,CAACC,YAAY,CAAC,CAAC;IACnC;IAEA,OAAOR,yBAAyB,CAAC,CAAC;EACpC;EAEAS,cAAcA,CAAA,EAAoC;IAChD,IAAIlB,KAAK,EAAE;MACT,OAAO,IAAI,CAACgB,MAAM,CAACE,cAAc,CAAC,CAAC;IACrC;IAEA,OAAOT,yBAAyB,CAAC,CAAC;EACpC;EAEAU,aAAaA,CAAA,EAAkB;IAC7B,IAAInB,KAAK,EAAE;MACT,OAAO,IAAI,CAACgB,MAAM,CAACG,aAAa,CAAC,CAAC;IACpC;IAEA,OAAOV,yBAAyB,CAAC,CAAC;EACpC;AACF;AAEA,OAAO,MAAMW,WAAW,GAAGf,OAAO;AAElC,MAAMgB,wBAAwB,GAAGpB,qBAAqB,CAAC;EACrDK,OAAO;EACPD,OAAO;EACPE,SAAS;EACTC,gBAAgB;EAChBc,YAAY,EAAE,KAAK;EACnBC,kBAAkB,EAAE,KAAK;EACzBC,2BAA2B,EAAE,KAAK;EAClCC,WAAW,EAAEX;AACf,CAAC,CAGA;AAED,eAAeO,wBAAwB;;AAEvC;AACA;AACA;AACA,OAAO,MAAMK,QAAQ,GACnBvB,eAAe,CAAC,CAKf","ignoreList":[]}
@@ -1,10 +0,0 @@
1
- "use strict";
2
-
3
- /**
4
- * @deprecated Use the exported types directly instead.
5
- * FirebaseAppDistributionTypes namespace is kept for backwards compatibility.
6
- */
7
- /* eslint-disable @typescript-eslint/no-namespace */
8
- export let FirebaseAppDistributionTypes;
9
- /* eslint-enable @typescript-eslint/no-namespace */
10
- //# sourceMappingURL=namespaced.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["FirebaseAppDistributionTypes"],"sourceRoot":"../../../lib","sources":["types/namespaced.ts"],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AAAA,WACiBA,4BAA4B;AAwD7C","ignoreList":[]}
@@ -1,9 +0,0 @@
1
- import type { ReactNativeFirebase } from '@react-native-firebase/app';
2
- import type { AppDistribution, AppDistributionRelease } from './types/app-distribution';
3
- export type FirebaseAppDistribution = AppDistribution;
4
- export declare function getAppDistribution(app?: ReactNativeFirebase.FirebaseApp): FirebaseAppDistribution;
5
- export declare function isTesterSignedIn(appDistribution: FirebaseAppDistribution): Promise<boolean>;
6
- export declare function signInTester(appDistribution: FirebaseAppDistribution): Promise<void>;
7
- export declare function checkForUpdate(appDistribution: FirebaseAppDistribution): Promise<AppDistributionRelease>;
8
- export declare function signOutTester(appDistribution: FirebaseAppDistribution): Promise<void>;
9
- //# sourceMappingURL=modular.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"modular.d.ts","sourceRoot":"","sources":["../../../lib/modular.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,OAAO,KAAK,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAGxF,MAAM,MAAM,uBAAuB,GAAG,eAAe,CAAC;AAMtD,wBAAgB,kBAAkB,CAAC,GAAG,CAAC,EAAE,mBAAmB,CAAC,WAAW,GAAG,uBAAuB,CAMjG;AAED,wBAAgB,gBAAgB,CAAC,eAAe,EAAE,uBAAuB,GAAG,OAAO,CAAC,OAAO,CAAC,CAE3F;AAED,wBAAgB,YAAY,CAAC,eAAe,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,CAEpF;AAED,wBAAgB,cAAc,CAC5B,eAAe,EAAE,uBAAuB,GACvC,OAAO,CAAC,sBAAsB,CAAC,CAEjC;AAED,wBAAgB,aAAa,CAAC,eAAe,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,CAErF"}
@@ -1,7 +0,0 @@
1
- import type { ReactNativeFirebase } from '@react-native-firebase/app';
2
- import type { FirebaseAppDistributionTypes } from './types/namespaced';
3
- export declare const SDK_VERSION = "25.1.0";
4
- declare const appDistributionNamespace: ReactNativeFirebase.FirebaseModuleWithStaticsAndApp<FirebaseAppDistributionTypes.Module, FirebaseAppDistributionTypes.Statics>;
5
- export default appDistributionNamespace;
6
- export declare const firebase: ReactNativeFirebase.FirebaseNamespacedExport<"appDistribution", FirebaseAppDistributionTypes.Module, FirebaseAppDistributionTypes.Statics, false>;
7
- //# sourceMappingURL=namespaced.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"namespaced.d.ts","sourceRoot":"","sources":["../../../lib/namespaced.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAStE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAC;AAiDvE,eAAO,MAAM,WAAW,WAAU,CAAC;AAEnC,QAAA,MAAM,wBAAwB,EASb,mBAAmB,CAAC,+BAA+B,CAClE,4BAA4B,CAAC,MAAM,EACnC,4BAA4B,CAAC,OAAO,CACrC,CAAC;AAEF,eAAe,wBAAwB,CAAC;AAKxC,eAAO,MAAM,QAAQ,EACa,mBAAmB,CAAC,wBAAwB,CAC1E,iBAAiB,EACjB,4BAA4B,CAAC,MAAM,EACnC,4BAA4B,CAAC,OAAO,EACpC,KAAK,CACN,CAAC"}