Selaa lähdekoodia

[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.
master
Saúl Ibarra Corretgé 6 vuotta sitten
vanhempi
commit
a327a5d804

+ 0
- 2
ios/Podfile Näytä tiedosto

35
   pod 'react-native-locale-detector',
35
   pod 'react-native-locale-detector',
36
     :path => '../node_modules/react-native-locale-detector'
36
     :path => '../node_modules/react-native-locale-detector'
37
   pod 'react-native-webrtc', :path => '../node_modules/react-native-webrtc'
37
   pod 'react-native-webrtc', :path => '../node_modules/react-native-webrtc'
38
-  pod 'ReactNativePermissions',
39
-    :path => '../node_modules/react-native-permissions'
40
   pod 'RNSound', :path => '../node_modules/react-native-sound'
38
   pod 'RNSound', :path => '../node_modules/react-native-sound'
41
   pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
39
   pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
42
   pod 'react-native-calendar-events',
40
   pod 'react-native-calendar-events',

+ 1
- 7
ios/Podfile.lock Näytä tiedosto

63
     - React/Core
63
     - React/Core
64
     - React/fishhook
64
     - React/fishhook
65
     - React/RCTBlob
65
     - React/RCTBlob
66
-  - ReactNativePermissions (1.1.1):
67
-    - React
68
   - RNSound (0.10.9):
66
   - RNSound (0.10.9):
69
     - React/Core
67
     - React/Core
70
     - RNSound/Core (= 0.10.9)
68
     - RNSound/Core (= 0.10.9)
98
   - React/RCTNetwork (from `../node_modules/react-native`)
96
   - React/RCTNetwork (from `../node_modules/react-native`)
99
   - React/RCTText (from `../node_modules/react-native`)
97
   - React/RCTText (from `../node_modules/react-native`)
100
   - React/RCTWebSocket (from `../node_modules/react-native`)
98
   - React/RCTWebSocket (from `../node_modules/react-native`)
101
-  - ReactNativePermissions (from `../node_modules/react-native-permissions`)
102
   - RNSound (from `../node_modules/react-native-sound`)
99
   - RNSound (from `../node_modules/react-native-sound`)
103
   - RNVectorIcons (from `../node_modules/react-native-vector-icons`)
100
   - RNVectorIcons (from `../node_modules/react-native-vector-icons`)
104
   - yoga (from `../node_modules/react-native/ReactCommon/yoga`)
101
   - yoga (from `../node_modules/react-native/ReactCommon/yoga`)
130
     :path: "../node_modules/react-native-locale-detector"
127
     :path: "../node_modules/react-native-locale-detector"
131
   react-native-webrtc:
128
   react-native-webrtc:
132
     :path: "../node_modules/react-native-webrtc"
129
     :path: "../node_modules/react-native-webrtc"
133
-  ReactNativePermissions:
134
-    :path: "../node_modules/react-native-permissions"
135
   RNSound:
130
   RNSound:
136
     :path: "../node_modules/react-native-sound"
131
     :path: "../node_modules/react-native-sound"
137
   RNVectorIcons:
132
   RNVectorIcons:
152
   react-native-keep-awake: 0de4bd66de0c23178107dce0c2fcc3354b2a8e94
147
   react-native-keep-awake: 0de4bd66de0c23178107dce0c2fcc3354b2a8e94
153
   react-native-locale-detector: d1b2c6fe5abb56e3a1efb6c2d6f308c05c4251f1
148
   react-native-locale-detector: d1b2c6fe5abb56e3a1efb6c2d6f308c05c4251f1
154
   react-native-webrtc: 31b6d3f1e3e2ce373aa43fd682b04367250f807d
149
   react-native-webrtc: 31b6d3f1e3e2ce373aa43fd682b04367250f807d
155
-  ReactNativePermissions: 9ef3f0c74a373fdbfae21c067098a8348d9aa15f
156
   RNSound: b360b3862d3118ed1c74bb9825696b5957686ac4
150
   RNSound: b360b3862d3118ed1c74bb9825696b5957686ac4
157
   RNVectorIcons: c0dbfbf6068fefa240c37b0f71bd03b45dddac44
151
   RNVectorIcons: c0dbfbf6068fefa240c37b0f71bd03b45dddac44
158
   SDWebImage: 624d6e296c69b244bcede364c72ae0430ac14681
152
   SDWebImage: 624d6e296c69b244bcede364c72ae0430ac14681
159
   yoga: a23273df0088bf7f2bb7e5d7b00044ea57a2a54a
153
   yoga: a23273df0088bf7f2bb7e5d7b00044ea57a2a54a
160
 
154
 
161
-PODFILE CHECKSUM: 1d5c8382f73d9540fac68d93b32e1d3b58d069ee
155
+PODFILE CHECKSUM: 69d3df0b8baa54d636bd653b412ed45db771a3b6
162
 
156
 
163
 COCOAPODS: 1.5.3
157
 COCOAPODS: 1.5.3

+ 0
- 4
package-lock.json Näytä tiedosto

12785
       "version": "github:jitsi/react-native-locale-detector#845281e9fd4af756f6d0f64afe5cce08c63e5ee9",
12785
       "version": "github:jitsi/react-native-locale-detector#845281e9fd4af756f6d0f64afe5cce08c63e5ee9",
12786
       "from": "github:jitsi/react-native-locale-detector#845281e9fd4af756f6d0f64afe5cce08c63e5ee9"
12786
       "from": "github:jitsi/react-native-locale-detector#845281e9fd4af756f6d0f64afe5cce08c63e5ee9"
12787
     },
12787
     },
12788
-    "react-native-permissions": {
12789
-      "version": "github:lyubomir/react-native-permissions#3462430addce3f2c8297c15da14182568194a216",
12790
-      "from": "github:lyubomir/react-native-permissions#3462430addce3f2c8297c15da14182568194a216"
12791
-    },
12792
     "react-native-prompt": {
12788
     "react-native-prompt": {
12793
       "version": "1.0.0",
12789
       "version": "1.0.0",
12794
       "resolved": "https://registry.npmjs.org/react-native-prompt/-/react-native-prompt-1.0.0.tgz",
12790
       "resolved": "https://registry.npmjs.org/react-native-prompt/-/react-native-prompt-1.0.0.tgz",

+ 0
- 1
package.json Näytä tiedosto

69
     "react-native-keep-awake": "2.0.6",
69
     "react-native-keep-awake": "2.0.6",
70
     "react-native-linear-gradient": "2.4.0",
70
     "react-native-linear-gradient": "2.4.0",
71
     "react-native-locale-detector": "github:jitsi/react-native-locale-detector#845281e9fd4af756f6d0f64afe5cce08c63e5ee9",
71
     "react-native-locale-detector": "github:jitsi/react-native-locale-detector#845281e9fd4af756f6d0f64afe5cce08c63e5ee9",
72
-    "react-native-permissions": "github:lyubomir/react-native-permissions#3462430addce3f2c8297c15da14182568194a216",
73
     "react-native-prompt": "1.0.0",
72
     "react-native-prompt": "1.0.0",
74
     "react-native-sound": "0.10.9",
73
     "react-native-sound": "0.10.9",
75
     "react-native-vector-icons": "4.4.2",
74
     "react-native-vector-icons": "4.4.2",

+ 5
- 1
react/features/base/lib-jitsi-meet/native/polyfills-webrtc.js Näytä tiedosto

3
     MediaStreamTrack,
3
     MediaStreamTrack,
4
     RTCSessionDescription,
4
     RTCSessionDescription,
5
     RTCIceCandidate,
5
     RTCIceCandidate,
6
-    mediaDevices
6
+    mediaDevices,
7
+    permissions
7
 } from 'react-native-webrtc';
8
 } from 'react-native-webrtc';
8
 
9
 
9
 import RTCPeerConnection from './RTCPeerConnection';
10
 import RTCPeerConnection from './RTCPeerConnection';
34
         if (typeof navigator.mediaDevices === 'undefined') {
35
         if (typeof navigator.mediaDevices === 'undefined') {
35
             navigator.mediaDevices = mediaDevices;
36
             navigator.mediaDevices = mediaDevices;
36
         }
37
         }
38
+        if (typeof navigator.permissions === 'undefined') {
39
+            navigator.permissions = permissions;
40
+        }
37
     }
41
     }
38
 
42
 
39
 })(global || window || this); // eslint-disable-line no-invalid-this
43
 })(global || window || this); // eslint-disable-line no-invalid-this

+ 2
- 3
react/features/welcome/components/WelcomePage.native.js Näytä tiedosto

8
     TouchableOpacity,
8
     TouchableOpacity,
9
     View
9
     View
10
 } from 'react-native';
10
 } from 'react-native';
11
-import Permissions from 'react-native-permissions';
12
 import { connect } from 'react-redux';
11
 import { connect } from 'react-redux';
13
 
12
 
14
 import { translate } from '../../base/i18n';
13
 import { translate } from '../../base/i18n';
76
             // Make sure we don't request the permission for the camera from
75
             // Make sure we don't request the permission for the camera from
77
             // the start. We will, however, create a video track iff the user
76
             // the start. We will, however, create a video track iff the user
78
             // already granted the permission.
77
             // already granted the permission.
79
-            Permissions.check('camera').then(response => {
80
-                response === 'authorized'
78
+            navigator.permissions.query({ name: 'camera' }).then(response => {
79
+                response === 'granted'
81
                     && dispatch(createDesiredLocalTracks(MEDIA_TYPE.VIDEO));
80
                     && dispatch(createDesiredLocalTracks(MEDIA_TYPE.VIDEO));
82
             });
81
             });
83
         }
82
         }

Loading…
Peruuta
Tallenna