Skip to content

Commit

Permalink
fix(app-distribution, android): export methods so module loads
Browse files Browse the repository at this point in the history
previously there were no react methods, so react-native
actually refuses to load the module, but that's unexpected
in certain instances (like rnfbdemo)
  • Loading branch information
mikehardy committed Aug 21, 2021
1 parent b897ed2 commit bc0ae4f
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,28 @@ public class ReactNativeFirebaseAppDistributionModule extends ReactNativeFirebas
ReactNativeFirebaseAppDistributionModule(ReactApplicationContext reactContext) {
super(reactContext, TAG);
}

@ReactMethod
public void isTesterSignedIn(Promise promise) {
rejectPromiseWithCodeAndMessage(
promise, "platform-unsupported", "Android is not supported for App Distribution");
}

@ReactMethod
public void signInTester(Promise promise) {
rejectPromiseWithCodeAndMessage(
promise, "platform-unsupported", "Android is not supported for App Distribution");
}

@ReactMethod
public void checkForUpdate(Promise promise) {
rejectPromiseWithCodeAndMessage(
promise, "platform-unsupported", "Android is not supported for App Distribution");
}

@ReactMethod
public void signOutTester(Promise promise) {
rejectPromiseWithCodeAndMessage(
promise, "platform-unsupported", "Android is not supported for App Distribution");
}
}
6 changes: 6 additions & 0 deletions packages/app-distribution/e2e/app-distribution.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
*/

describe('appDistribution()', function () {
describe('native module is loaded', function () {
it('checks native module load status', function () {
firebase.appDistribution().native;
});
});

describe('isTesterSignedIn()', function () {
it('checks if a tester is signed in', async function () {
if (device.getPlatform() === 'ios') {
Expand Down

1 comment on commit bc0ae4f

@vercel
Copy link

@vercel vercel bot commented on bc0ae4f Aug 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.