feat: disable direct channels API on iOS, fixes #3674 (#3733)

* set shouldEstablishDirectChannel to NO

* tests: make `onMessage` test Android only

This test will no longer function on simulators as a direct message channel is no longer established.

Co-authored-by: Mike Diarmid <mike.diarmid@gmail.com>
This commit is contained in:
Tobias Lohse
2020-07-14 03:33:13 -05:00
committed by GitHub
parent 001cee0eac
commit 8c9f4f5e31
2 changed files with 2 additions and 2 deletions

View File

@@ -171,7 +171,7 @@ describe('messaging()', () => {
}
});
it('receives messages when the app is in the foreground', async () => {
android.it('receives messages when the app is in the foreground', async () => {
const spy = sinon.spy();
const unsubscribe = firebase.messaging().onMessage(spy);
if (device.getPlatform() === 'ios') {

View File

@@ -40,7 +40,7 @@
dispatch_once(&once, ^{
RNFBMessagingFIRMessagingDelegate *strongSelf = weakSelf;
[FIRMessaging messaging].delegate = strongSelf;
[FIRMessaging messaging].shouldEstablishDirectChannel = YES;
[FIRMessaging messaging].shouldEstablishDirectChannel = NO;
});
}