[RN] Drop the react-native-permissions dependency
It causes false positives when submitting the app to the Store. Use the new permissions API in react-native-webrtc instead.
This commit is contained in:
parent
288bb59f71
commit
a327a5d804
|
@ -35,8 +35,6 @@ target 'JitsiMeet' do
|
||||||
pod 'react-native-locale-detector',
|
pod 'react-native-locale-detector',
|
||||||
:path => '../node_modules/react-native-locale-detector'
|
:path => '../node_modules/react-native-locale-detector'
|
||||||
pod 'react-native-webrtc', :path => '../node_modules/react-native-webrtc'
|
pod 'react-native-webrtc', :path => '../node_modules/react-native-webrtc'
|
||||||
pod 'ReactNativePermissions',
|
|
||||||
:path => '../node_modules/react-native-permissions'
|
|
||||||
pod 'RNSound', :path => '../node_modules/react-native-sound'
|
pod 'RNSound', :path => '../node_modules/react-native-sound'
|
||||||
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
|
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
|
||||||
pod 'react-native-calendar-events',
|
pod 'react-native-calendar-events',
|
||||||
|
|
|
@ -63,8 +63,6 @@ PODS:
|
||||||
- React/Core
|
- React/Core
|
||||||
- React/fishhook
|
- React/fishhook
|
||||||
- React/RCTBlob
|
- React/RCTBlob
|
||||||
- ReactNativePermissions (1.1.1):
|
|
||||||
- React
|
|
||||||
- RNSound (0.10.9):
|
- RNSound (0.10.9):
|
||||||
- React/Core
|
- React/Core
|
||||||
- RNSound/Core (= 0.10.9)
|
- RNSound/Core (= 0.10.9)
|
||||||
|
@ -98,7 +96,6 @@ DEPENDENCIES:
|
||||||
- React/RCTNetwork (from `../node_modules/react-native`)
|
- React/RCTNetwork (from `../node_modules/react-native`)
|
||||||
- React/RCTText (from `../node_modules/react-native`)
|
- React/RCTText (from `../node_modules/react-native`)
|
||||||
- React/RCTWebSocket (from `../node_modules/react-native`)
|
- React/RCTWebSocket (from `../node_modules/react-native`)
|
||||||
- ReactNativePermissions (from `../node_modules/react-native-permissions`)
|
|
||||||
- RNSound (from `../node_modules/react-native-sound`)
|
- RNSound (from `../node_modules/react-native-sound`)
|
||||||
- RNVectorIcons (from `../node_modules/react-native-vector-icons`)
|
- RNVectorIcons (from `../node_modules/react-native-vector-icons`)
|
||||||
- yoga (from `../node_modules/react-native/ReactCommon/yoga`)
|
- yoga (from `../node_modules/react-native/ReactCommon/yoga`)
|
||||||
|
@ -130,8 +127,6 @@ EXTERNAL SOURCES:
|
||||||
:path: "../node_modules/react-native-locale-detector"
|
:path: "../node_modules/react-native-locale-detector"
|
||||||
react-native-webrtc:
|
react-native-webrtc:
|
||||||
:path: "../node_modules/react-native-webrtc"
|
:path: "../node_modules/react-native-webrtc"
|
||||||
ReactNativePermissions:
|
|
||||||
:path: "../node_modules/react-native-permissions"
|
|
||||||
RNSound:
|
RNSound:
|
||||||
:path: "../node_modules/react-native-sound"
|
:path: "../node_modules/react-native-sound"
|
||||||
RNVectorIcons:
|
RNVectorIcons:
|
||||||
|
@ -152,12 +147,11 @@ SPEC CHECKSUMS:
|
||||||
react-native-keep-awake: 0de4bd66de0c23178107dce0c2fcc3354b2a8e94
|
react-native-keep-awake: 0de4bd66de0c23178107dce0c2fcc3354b2a8e94
|
||||||
react-native-locale-detector: d1b2c6fe5abb56e3a1efb6c2d6f308c05c4251f1
|
react-native-locale-detector: d1b2c6fe5abb56e3a1efb6c2d6f308c05c4251f1
|
||||||
react-native-webrtc: 31b6d3f1e3e2ce373aa43fd682b04367250f807d
|
react-native-webrtc: 31b6d3f1e3e2ce373aa43fd682b04367250f807d
|
||||||
ReactNativePermissions: 9ef3f0c74a373fdbfae21c067098a8348d9aa15f
|
|
||||||
RNSound: b360b3862d3118ed1c74bb9825696b5957686ac4
|
RNSound: b360b3862d3118ed1c74bb9825696b5957686ac4
|
||||||
RNVectorIcons: c0dbfbf6068fefa240c37b0f71bd03b45dddac44
|
RNVectorIcons: c0dbfbf6068fefa240c37b0f71bd03b45dddac44
|
||||||
SDWebImage: 624d6e296c69b244bcede364c72ae0430ac14681
|
SDWebImage: 624d6e296c69b244bcede364c72ae0430ac14681
|
||||||
yoga: a23273df0088bf7f2bb7e5d7b00044ea57a2a54a
|
yoga: a23273df0088bf7f2bb7e5d7b00044ea57a2a54a
|
||||||
|
|
||||||
PODFILE CHECKSUM: 1d5c8382f73d9540fac68d93b32e1d3b58d069ee
|
PODFILE CHECKSUM: 69d3df0b8baa54d636bd653b412ed45db771a3b6
|
||||||
|
|
||||||
COCOAPODS: 1.5.3
|
COCOAPODS: 1.5.3
|
||||||
|
|
|
@ -12785,10 +12785,6 @@
|
||||||
"version": "github:jitsi/react-native-locale-detector#845281e9fd4af756f6d0f64afe5cce08c63e5ee9",
|
"version": "github:jitsi/react-native-locale-detector#845281e9fd4af756f6d0f64afe5cce08c63e5ee9",
|
||||||
"from": "github:jitsi/react-native-locale-detector#845281e9fd4af756f6d0f64afe5cce08c63e5ee9"
|
"from": "github:jitsi/react-native-locale-detector#845281e9fd4af756f6d0f64afe5cce08c63e5ee9"
|
||||||
},
|
},
|
||||||
"react-native-permissions": {
|
|
||||||
"version": "github:lyubomir/react-native-permissions#3462430addce3f2c8297c15da14182568194a216",
|
|
||||||
"from": "github:lyubomir/react-native-permissions#3462430addce3f2c8297c15da14182568194a216"
|
|
||||||
},
|
|
||||||
"react-native-prompt": {
|
"react-native-prompt": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/react-native-prompt/-/react-native-prompt-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/react-native-prompt/-/react-native-prompt-1.0.0.tgz",
|
||||||
|
|
|
@ -69,7 +69,6 @@
|
||||||
"react-native-keep-awake": "2.0.6",
|
"react-native-keep-awake": "2.0.6",
|
||||||
"react-native-linear-gradient": "2.4.0",
|
"react-native-linear-gradient": "2.4.0",
|
||||||
"react-native-locale-detector": "github:jitsi/react-native-locale-detector#845281e9fd4af756f6d0f64afe5cce08c63e5ee9",
|
"react-native-locale-detector": "github:jitsi/react-native-locale-detector#845281e9fd4af756f6d0f64afe5cce08c63e5ee9",
|
||||||
"react-native-permissions": "github:lyubomir/react-native-permissions#3462430addce3f2c8297c15da14182568194a216",
|
|
||||||
"react-native-prompt": "1.0.0",
|
"react-native-prompt": "1.0.0",
|
||||||
"react-native-sound": "0.10.9",
|
"react-native-sound": "0.10.9",
|
||||||
"react-native-vector-icons": "4.4.2",
|
"react-native-vector-icons": "4.4.2",
|
||||||
|
|
|
@ -3,7 +3,8 @@ import {
|
||||||
MediaStreamTrack,
|
MediaStreamTrack,
|
||||||
RTCSessionDescription,
|
RTCSessionDescription,
|
||||||
RTCIceCandidate,
|
RTCIceCandidate,
|
||||||
mediaDevices
|
mediaDevices,
|
||||||
|
permissions
|
||||||
} from 'react-native-webrtc';
|
} from 'react-native-webrtc';
|
||||||
|
|
||||||
import RTCPeerConnection from './RTCPeerConnection';
|
import RTCPeerConnection from './RTCPeerConnection';
|
||||||
|
@ -34,6 +35,9 @@ import RTCPeerConnection from './RTCPeerConnection';
|
||||||
if (typeof navigator.mediaDevices === 'undefined') {
|
if (typeof navigator.mediaDevices === 'undefined') {
|
||||||
navigator.mediaDevices = mediaDevices;
|
navigator.mediaDevices = mediaDevices;
|
||||||
}
|
}
|
||||||
|
if (typeof navigator.permissions === 'undefined') {
|
||||||
|
navigator.permissions = permissions;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
})(global || window || this); // eslint-disable-line no-invalid-this
|
})(global || window || this); // eslint-disable-line no-invalid-this
|
||||||
|
|
|
@ -8,7 +8,6 @@ import {
|
||||||
TouchableOpacity,
|
TouchableOpacity,
|
||||||
View
|
View
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import Permissions from 'react-native-permissions';
|
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
import { translate } from '../../base/i18n';
|
import { translate } from '../../base/i18n';
|
||||||
|
@ -76,8 +75,8 @@ class WelcomePage extends AbstractWelcomePage {
|
||||||
// Make sure we don't request the permission for the camera from
|
// Make sure we don't request the permission for the camera from
|
||||||
// the start. We will, however, create a video track iff the user
|
// the start. We will, however, create a video track iff the user
|
||||||
// already granted the permission.
|
// already granted the permission.
|
||||||
Permissions.check('camera').then(response => {
|
navigator.permissions.query({ name: 'camera' }).then(response => {
|
||||||
response === 'authorized'
|
response === 'granted'
|
||||||
&& dispatch(createDesiredLocalTracks(MEDIA_TYPE.VIDEO));
|
&& dispatch(createDesiredLocalTracks(MEDIA_TYPE.VIDEO));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue