Przeglądaj źródła

Add a working iOS demo

Mathieu Acthernoene 5 lat temu
rodzic
commit
0f460401a8

+ 167
- 13
example/App.js Wyświetl plik

@@ -4,17 +4,178 @@
4 4
  * @lint-ignore-every XPLATJSCOPYRIGHT1
5 5
  */
6 6
 
7
-import React, { Component } from "react";
8
-import { StyleSheet, Text, View } from "react-native";
9
-// import * as RNPermissions from "react-native-languages";
7
+import * as React from "react";
8
+import { Appbar, List, TouchableRipple, Snackbar } from "react-native-paper";
9
+import * as RNPermissions from "react-native-permissions";
10
+import type { PermissionStatus } from "react-native-permissions";
11
+import theme from "./theme";
12
+
13
+import {
14
+  AppState,
15
+  Platform,
16
+  StatusBar,
17
+  ScrollView,
18
+  StyleSheet,
19
+  Text,
20
+  View,
21
+} from "react-native";
22
+
23
+// $FlowFixMe
24
+let platformPermissions: string[] = Object.values(
25
+  Platform.OS === "ios"
26
+    ? RNPermissions.IOS_PERMISSIONS
27
+    : RNPermissions.ANDROID_PERMISSIONS,
28
+).filter(permission => permission !== "SIRI");
29
+
30
+const statusColors: { [PermissionStatus]: string } = {
31
+  granted: "#43a047",
32
+  denied: "#ff9800",
33
+  never_ask_again: "#e53935",
34
+  unavailable: "#cfd8dc",
35
+};
36
+
37
+const statusIcons: { [PermissionStatus]: string } = {
38
+  granted: "check-circle",
39
+  denied: "error",
40
+  never_ask_again: "cancel",
41
+  unavailable: "lens",
42
+};
43
+
44
+type AppStateType = "active" | "background" | "inactive";
10 45
 
11 46
 type Props = {};
12 47
 
13
-export default class App extends Component<Props> {
48
+// RNPermissions.checkMultiple([
49
+//   RNPermissions.ANDROID_PERMISSIONS.ACCESS_FINE_LOCATION,
50
+//   RNPermissions.ANDROID_PERMISSIONS.PROCESS_OUTGOING_CALLS,
51
+// ]).then(result => {
52
+//   console.log(result);
53
+// });
54
+
55
+type State = {|
56
+  snackBarVisible: boolean,
57
+  watchAppState: boolean,
58
+  statuses: { [string]: PermissionStatus },
59
+|};
60
+
61
+export default class App extends React.Component<Props, State> {
62
+  constructor(props: Props) {
63
+    super(props);
64
+
65
+    this.state = {
66
+      snackBarVisible: false,
67
+      watchAppState: false,
68
+      statuses: {},
69
+    };
70
+
71
+    setTimeout(() => {
72
+      this.checkAllPermissions();
73
+    }, 2000);
74
+  }
75
+
76
+  componentDidMount() {
77
+    AppState.addEventListener("change", this.onAppStateChange);
78
+  }
79
+
80
+  componentWillUnmount() {
81
+    AppState.removeEventListener("change", this.onAppStateChange);
82
+  }
83
+
84
+  checkAllPermissions = () => {
85
+    RNPermissions.checkMultiple(platformPermissions)
86
+      .then(statuses => {
87
+        console.log(statuses);
88
+        this.setState({ statuses });
89
+      })
90
+      .catch(error => {
91
+        console.error(error);
92
+      });
93
+  };
94
+
95
+  onAppStateChange = (nextAppState: AppStateType) => {
96
+    if (this.state.watchAppState && nextAppState === "active") {
97
+      this.setState({
98
+        snackBarVisible: true,
99
+        watchAppState: false,
100
+      });
101
+
102
+      setTimeout(() => {
103
+        // @TODO don't fire setState on unmounted component
104
+        this.setState({ snackBarVisible: false });
105
+      }, 3000);
106
+    }
107
+  };
108
+
14 109
   render() {
15 110
     return (
16 111
       <View style={styles.container}>
17
-        <Text style={styles.welcome}>Example</Text>
112
+        <StatusBar
113
+          backgroundColor={theme.colors.primary}
114
+          barStyle="light-content"
115
+        />
116
+
117
+        <Appbar.Header>
118
+          <Appbar.Content
119
+            title="react-native-permissions"
120
+            subtitle="Example application"
121
+          />
122
+
123
+          <Appbar.Action
124
+            icon="settings-applications"
125
+            onPress={() => {
126
+              this.setState({ watchAppState: true }, () => {
127
+                RNPermissions.openSettings();
128
+              });
129
+            }}
130
+          />
131
+        </Appbar.Header>
132
+
133
+        <ScrollView>
134
+          <List.Section>
135
+            {platformPermissions.map(permission => {
136
+              const status = this.state.statuses[permission];
137
+
138
+              return (
139
+                <TouchableRipple
140
+                  key={permission}
141
+                  disabled={
142
+                    status === RNPermissions.RESULTS.UNAVAILABLE ||
143
+                    status === RNPermissions.RESULTS.NEVER_ASK_AGAIN
144
+                  }
145
+                  onPress={() => {
146
+                    RNPermissions.request(permission).then(status => {
147
+                      this.setState(prevState => ({
148
+                        ...prevState,
149
+                        statuses: {
150
+                          ...prevState.statuses,
151
+                          [permission]: status,
152
+                        },
153
+                      }));
154
+                    });
155
+                  }}
156
+                >
157
+                  <List.Item
158
+                    title={permission}
159
+                    description={status}
160
+                    right={() => (
161
+                      <List.Icon
162
+                        color={statusColors[status]}
163
+                        icon={statusIcons[status]}
164
+                      />
165
+                    )}
166
+                  />
167
+                </TouchableRipple>
168
+              );
169
+            })}
170
+          </List.Section>
171
+        </ScrollView>
172
+
173
+        <Snackbar
174
+          onDismiss={() => this.setState({ snackBarVisible: false })}
175
+          visible={this.state.snackBarVisible}
176
+        >
177
+          Welcome back ! Refreshing permissions…
178
+        </Snackbar>
18 179
       </View>
19 180
     );
20 181
   }
@@ -23,13 +184,6 @@ export default class App extends Component<Props> {
23 184
 const styles = StyleSheet.create({
24 185
   container: {
25 186
     flex: 1,
26
-    justifyContent: "center",
27
-    alignItems: "center",
28
-    backgroundColor: "#F5FCFF",
29
-  },
30
-  welcome: {
31
-    fontSize: 20,
32
-    textAlign: "center",
33
-    margin: 10,
187
+    backgroundColor: theme.colors.background,
34 188
   },
35 189
 });

+ 1
- 0
example/android/app/build.gradle Wyświetl plik

@@ -135,6 +135,7 @@ android {
135 135
 
136 136
 dependencies {
137 137
     implementation project(':react-native-permissions')
138
+    implementation project(':react-native-vector-icons')
138 139
     implementation fileTree(dir: "libs", include: ["*.jar"])
139 140
     implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
140 141
     implementation "com.facebook.react:react-native:+"  // From node_modules

BIN
example/android/app/src/main/assets/fonts/MaterialIcons.ttf Wyświetl plik


+ 5
- 2
example/android/app/src/main/java/com/rnpermissionsexample/MainApplication.java Wyświetl plik

@@ -3,12 +3,14 @@ package com.rnpermissionsexample;
3 3
 import android.app.Application;
4 4
 
5 5
 import com.facebook.react.ReactApplication;
6
-import com.yonahforst.rnpermissions.RNPermissionsPackage;
7 6
 import com.facebook.react.ReactNativeHost;
8 7
 import com.facebook.react.ReactPackage;
9 8
 import com.facebook.react.shell.MainReactPackage;
10 9
 import com.facebook.soloader.SoLoader;
11 10
 
11
+import com.yonahforst.rnpermissions.RNPermissionsPackage;
12
+import com.oblador.vectoricons.VectorIconsPackage;
13
+
12 14
 import java.util.Arrays;
13 15
 import java.util.List;
14 16
 
@@ -24,7 +26,8 @@ public class MainApplication extends Application implements ReactApplication {
24 26
     protected List<ReactPackage> getPackages() {
25 27
       return Arrays.<ReactPackage>asList(
26 28
           new MainReactPackage(),
27
-          new RNPermissionsPackage()
29
+          new RNPermissionsPackage(),
30
+          new VectorIconsPackage()
28 31
       );
29 32
     }
30 33
 

+ 3
- 0
example/android/settings.gradle Wyświetl plik

@@ -3,4 +3,7 @@ rootProject.name = 'RNPermissionsExample'
3 3
 include ':react-native-permissions'
4 4
 project(':react-native-permissions').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-permissions/android')
5 5
 
6
+include ':react-native-vector-icons'
7
+project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
8
+
6 9
 include ':app'

+ 14
- 2
example/index.js Wyświetl plik

@@ -1,10 +1,22 @@
1 1
 /**
2 2
  * @format
3
+ * @flow
3 4
  * @lint-ignore-every XPLATJSCOPYRIGHT1
4 5
  */
5 6
 
7
+import * as React from "react";
8
+import { Provider as PaperProvider } from "react-native-paper";
6 9
 import { AppRegistry } from "react-native";
7
-import App from "./App";
8 10
 import { name as appName } from "./app.json";
11
+import App from "./App";
12
+import theme from "./theme";
13
+
14
+function Main() {
15
+  return (
16
+    <PaperProvider theme={theme}>
17
+      <App />
18
+    </PaperProvider>
19
+  );
20
+}
9 21
 
10
-AppRegistry.registerComponent(appName, () => App);
22
+AppRegistry.registerComponent(appName, () => Main);

+ 29
- 17
example/ios/Podfile Wyświetl plik

@@ -8,10 +8,19 @@ target 'RNPermissionsExample' do
8 8
     'Core',
9 9
     'CxxBridge', # Include this for RN >= 0.47
10 10
     'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
11
-    'RCTText',
11
+    'RCTActionSheet',
12
+    'RCTAnimation', # Needed for FlatList and animations running on native UI thread
13
+    'RCTBlob',
14
+    # 'RCTCameraRoll',
15
+    'RCTGeolocation',
16
+    'RCTImage',
12 17
     'RCTNetwork',
18
+    'RCTPushNotification',
19
+    'RCTSettings',
20
+    'RCTText',
21
+    'RCTVibration',
13 22
     'RCTWebSocket', # Needed for debugging
14
-    'RCTAnimation', # Needed for FlatList and animations running on native UI thread
23
+    'RCTLinkingIOS',
15 24
   ]
16 25
 
17 26
   # Explicitly include Yoga if you are using RN >= 0.42.0
@@ -22,27 +31,30 @@ target 'RNPermissionsExample' do
22 31
   pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
23 32
   pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
24 33
 
25
-  # Import RNPermissions from the parent folder
26
-  pod 'RNPermissions', :path => '../../ios', :subspecs => [
34
+  # RN dependencies
35
+  pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
36
+
37
+  pod 'RNPermissions', :path => '../node_modules/react-native-permissions/ios', :subspecs => [
27 38
     'Core',
28
-    # Uncomment wanted permissions
29
-    # 'BluetoothPeripheral',
39
+    # Comment unwanted permissions
40
+    'BluetoothPeripheral',
30 41
     'Calendars',
31 42
     'Camera',
32 43
     'Contacts',
33
-    # 'FaceID',
34
-    # 'LocationAlways',
35
-    # 'LocationWhenInUse',
36
-    # 'MediaLibrary',
37
-    # 'Microphone',
38
-    # 'Motion',
39
-    # 'Notifications',
40
-    # 'PhotoLibrary',
41
-    # 'Reminders',
44
+    'FaceID',
45
+    'LocationAlways',
46
+    'LocationWhenInUse',
47
+    'MediaLibrary',
48
+    'Microphone',
49
+    'Motion',
50
+    'Notifications',
51
+    'PhotoLibrary',
52
+    'Reminders',
42 53
     # 'Siri',
43
-    # 'SpeechRecognition',
44
-    # 'StoreKit',
54
+    'SpeechRecognition',
55
+    'StoreKit',
45 56
   ]
57
+
46 58
 end
47 59
 
48 60
 target 'RNPermissionsExample-tvOS' do

+ 85
- 6
example/ios/Podfile.lock Wyświetl plik

@@ -6,6 +6,8 @@ PODS:
6 6
     - DoubleConversion
7 7
     - glog
8 8
   - glog (0.3.5)
9
+  - React (0.58.3):
10
+    - React/Core (= 0.58.3)
9 11
   - React/Core (0.58.3):
10 12
     - yoga (= 0.58.3.React)
11 13
   - React/CxxBridge (0.58.3):
@@ -28,18 +30,36 @@ PODS:
28 30
     - React/cxxreact
29 31
     - React/jsi
30 32
   - React/jsinspector (0.58.3)
33
+  - React/RCTActionSheet (0.58.3):
34
+    - React/Core
31 35
   - React/RCTAnimation (0.58.3):
32 36
     - React/Core
33 37
   - React/RCTBlob (0.58.3):
34 38
     - React/Core
39
+  - React/RCTGeolocation (0.58.3):
40
+    - React/Core
41
+  - React/RCTImage (0.58.3):
42
+    - React/Core
43
+    - React/RCTNetwork
44
+  - React/RCTLinkingIOS (0.58.3):
45
+    - React/Core
35 46
   - React/RCTNetwork (0.58.3):
36 47
     - React/Core
48
+  - React/RCTPushNotification (0.58.3):
49
+    - React/Core
50
+  - React/RCTSettings (0.58.3):
51
+    - React/Core
37 52
   - React/RCTText (0.58.3):
38 53
     - React/Core
54
+  - React/RCTVibration (0.58.3):
55
+    - React/Core
39 56
   - React/RCTWebSocket (0.58.3):
40 57
     - React/Core
41 58
     - React/fishhook
42 59
     - React/RCTBlob
60
+  - RNPermissions/BluetoothPeripheral (2.0.0-alpha.1):
61
+    - React/Core
62
+    - RNPermissions/Core
43 63
   - RNPermissions/Calendars (2.0.0-alpha.1):
44 64
     - React/Core
45 65
     - RNPermissions/Core
@@ -51,6 +71,41 @@ PODS:
51 71
     - RNPermissions/Core
52 72
   - RNPermissions/Core (2.0.0-alpha.1):
53 73
     - React/Core
74
+  - RNPermissions/FaceID (2.0.0-alpha.1):
75
+    - React/Core
76
+    - RNPermissions/Core
77
+  - RNPermissions/LocationAlways (2.0.0-alpha.1):
78
+    - React/Core
79
+    - RNPermissions/Core
80
+  - RNPermissions/LocationWhenInUse (2.0.0-alpha.1):
81
+    - React/Core
82
+    - RNPermissions/Core
83
+  - RNPermissions/MediaLibrary (2.0.0-alpha.1):
84
+    - React/Core
85
+    - RNPermissions/Core
86
+  - RNPermissions/Microphone (2.0.0-alpha.1):
87
+    - React/Core
88
+    - RNPermissions/Core
89
+  - RNPermissions/Motion (2.0.0-alpha.1):
90
+    - React/Core
91
+    - RNPermissions/Core
92
+  - RNPermissions/Notifications (2.0.0-alpha.1):
93
+    - React/Core
94
+    - RNPermissions/Core
95
+  - RNPermissions/PhotoLibrary (2.0.0-alpha.1):
96
+    - React/Core
97
+    - RNPermissions/Core
98
+  - RNPermissions/Reminders (2.0.0-alpha.1):
99
+    - React/Core
100
+    - RNPermissions/Core
101
+  - RNPermissions/SpeechRecognition (2.0.0-alpha.1):
102
+    - React/Core
103
+    - RNPermissions/Core
104
+  - RNPermissions/StoreKit (2.0.0-alpha.1):
105
+    - React/Core
106
+    - RNPermissions/Core
107
+  - RNVectorIcons (6.2.0):
108
+    - React
54 109
   - yoga (0.58.3.React)
55 110
 
56 111
 DEPENDENCIES:
@@ -60,14 +115,35 @@ DEPENDENCIES:
60 115
   - React/Core (from `../node_modules/react-native`)
61 116
   - React/CxxBridge (from `../node_modules/react-native`)
62 117
   - React/DevSupport (from `../node_modules/react-native`)
118
+  - React/RCTActionSheet (from `../node_modules/react-native`)
63 119
   - React/RCTAnimation (from `../node_modules/react-native`)
120
+  - React/RCTBlob (from `../node_modules/react-native`)
121
+  - React/RCTGeolocation (from `../node_modules/react-native`)
122
+  - React/RCTImage (from `../node_modules/react-native`)
123
+  - React/RCTLinkingIOS (from `../node_modules/react-native`)
64 124
   - React/RCTNetwork (from `../node_modules/react-native`)
125
+  - React/RCTPushNotification (from `../node_modules/react-native`)
126
+  - React/RCTSettings (from `../node_modules/react-native`)
65 127
   - React/RCTText (from `../node_modules/react-native`)
128
+  - React/RCTVibration (from `../node_modules/react-native`)
66 129
   - React/RCTWebSocket (from `../node_modules/react-native`)
67
-  - RNPermissions/Calendars (from `../../ios`)
68
-  - RNPermissions/Camera (from `../../ios`)
69
-  - RNPermissions/Contacts (from `../../ios`)
70
-  - RNPermissions/Core (from `../../ios`)
130
+  - RNPermissions/BluetoothPeripheral (from `../node_modules/react-native-permissions/ios`)
131
+  - RNPermissions/Calendars (from `../node_modules/react-native-permissions/ios`)
132
+  - RNPermissions/Camera (from `../node_modules/react-native-permissions/ios`)
133
+  - RNPermissions/Contacts (from `../node_modules/react-native-permissions/ios`)
134
+  - RNPermissions/Core (from `../node_modules/react-native-permissions/ios`)
135
+  - RNPermissions/FaceID (from `../node_modules/react-native-permissions/ios`)
136
+  - RNPermissions/LocationAlways (from `../node_modules/react-native-permissions/ios`)
137
+  - RNPermissions/LocationWhenInUse (from `../node_modules/react-native-permissions/ios`)
138
+  - RNPermissions/MediaLibrary (from `../node_modules/react-native-permissions/ios`)
139
+  - RNPermissions/Microphone (from `../node_modules/react-native-permissions/ios`)
140
+  - RNPermissions/Motion (from `../node_modules/react-native-permissions/ios`)
141
+  - RNPermissions/Notifications (from `../node_modules/react-native-permissions/ios`)
142
+  - RNPermissions/PhotoLibrary (from `../node_modules/react-native-permissions/ios`)
143
+  - RNPermissions/Reminders (from `../node_modules/react-native-permissions/ios`)
144
+  - RNPermissions/SpeechRecognition (from `../node_modules/react-native-permissions/ios`)
145
+  - RNPermissions/StoreKit (from `../node_modules/react-native-permissions/ios`)
146
+  - RNVectorIcons (from `../node_modules/react-native-vector-icons`)
71 147
   - yoga (from `../node_modules/react-native/ReactCommon/yoga`)
72 148
 
73 149
 SPEC REPOS:
@@ -84,7 +160,9 @@ EXTERNAL SOURCES:
84 160
   React:
85 161
     :path: "../node_modules/react-native"
86 162
   RNPermissions:
87
-    :path: "../../ios"
163
+    :path: "../node_modules/react-native-permissions/ios"
164
+  RNVectorIcons:
165
+    :path: "../node_modules/react-native-vector-icons"
88 166
   yoga:
89 167
     :path: "../node_modules/react-native/ReactCommon/yoga"
90 168
 
@@ -95,8 +173,9 @@ SPEC CHECKSUMS:
95 173
   glog: aefd1eb5dda2ab95ba0938556f34b98e2da3a60d
96 174
   React: 9b873b38b92ed8012d7cdf3b965477095ed364c4
97 175
   RNPermissions: 321a373f579ab57a6d04bbd2bdb43665217b34ba
176
+  RNVectorIcons: 8c52e1e8da1153613fdef44748e865c25556cb9c
98 177
   yoga: 0885622311729a02c2bc02dca97167787a51488b
99 178
 
100
-PODFILE CHECKSUM: 869da5c10a441881f63c79119e902c84e4c58131
179
+PODFILE CHECKSUM: fb8a88496928dd4e0badc53e7c84da316fa8a61e
101 180
 
102 181
 COCOAPODS: 1.5.3

+ 82
- 4
example/ios/RNPermissionsExample.xcodeproj/project.pbxproj Wyświetl plik

@@ -16,7 +16,8 @@
16 16
 		2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
17 17
 		2D16E6881FA4F8E400B85C8A /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D16E6891FA4F8E400B85C8A /* libReact.a */; };
18 18
 		344B09050D8F9DD98200F820 /* libPods-RNPermissionsExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5EE508594924E415A0050663 /* libPods-RNPermissionsExample.a */; };
19
-		AEF309CE7A77174466B93B05 /* libPods-RNPermissionsExample-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 675F5D41159578CF07B761C5 /* libPods-RNPermissionsExample-tvOS.a */; };
19
+		C365FCDF23384B71BADA5827 /* MaterialIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = B0FEF2381CCE4DAC89A441F0 /* MaterialIcons.ttf */; };
20
+		DD176EC822033C2C00D4A914 /* libPods-RNPermissionsExample-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DD176EC722033C2C00D4A914 /* libPods-RNPermissionsExample-tvOS.a */; };
20 21
 		ED297163215061F000B7C4FE /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ED297162215061F000B7C4FE /* JavaScriptCore.framework */; };
21 22
 		ED2971652150620600B7C4FE /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ED2971642150620600B7C4FE /* JavaScriptCore.framework */; };
22 23
 /* End PBXBuildFile section */
@@ -36,7 +37,9 @@
36 37
 		5EE508594924E415A0050663 /* libPods-RNPermissionsExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RNPermissionsExample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
37 38
 		675F5D41159578CF07B761C5 /* libPods-RNPermissionsExample-tvOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RNPermissionsExample-tvOS.a"; sourceTree = BUILT_PRODUCTS_DIR; };
38 39
 		A3695C8635FFAF0C2C558D58 /* Pods-RNPermissionsExample-tvOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNPermissionsExample-tvOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RNPermissionsExample-tvOS/Pods-RNPermissionsExample-tvOS.debug.xcconfig"; sourceTree = "<group>"; };
40
+		B0FEF2381CCE4DAC89A441F0 /* MaterialIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = MaterialIcons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/MaterialIcons.ttf"; sourceTree = "<group>"; };
39 41
 		B4C1975DC33A53090D5B8018 /* Pods-RNPermissionsExample-tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNPermissionsExample-tvOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-RNPermissionsExample-tvOS/Pods-RNPermissionsExample-tvOS.release.xcconfig"; sourceTree = "<group>"; };
42
+		DD176EC722033C2C00D4A914 /* libPods-RNPermissionsExample-tvOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = "libPods-RNPermissionsExample-tvOS.a"; sourceTree = BUILT_PRODUCTS_DIR; };
40 43
 		ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
41 44
 		ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; };
42 45
 		EFC2B4024563B97F765C7CAF /* Pods-RNPermissionsExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNPermissionsExample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RNPermissionsExample/Pods-RNPermissionsExample.debug.xcconfig"; sourceTree = "<group>"; };
@@ -58,7 +61,7 @@
58 61
 			files = (
59 62
 				ED2971652150620600B7C4FE /* JavaScriptCore.framework in Frameworks */,
60 63
 				2D16E6881FA4F8E400B85C8A /* libReact.a in Frameworks */,
61
-				AEF309CE7A77174466B93B05 /* libPods-RNPermissionsExample-tvOS.a in Frameworks */,
64
+				DD176EC822033C2C00D4A914 /* libPods-RNPermissionsExample-tvOS.a in Frameworks */,
62 65
 			);
63 66
 			runOnlyForDeploymentPostprocessing = 0;
64 67
 		};
@@ -93,6 +96,7 @@
93 96
 		2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
94 97
 			isa = PBXGroup;
95 98
 			children = (
99
+				DD176EC722033C2C00D4A914 /* libPods-RNPermissionsExample-tvOS.a */,
96 100
 				ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
97 101
 				ED2971642150620600B7C4FE /* JavaScriptCore.framework */,
98 102
 				2D16E6891FA4F8E400B85C8A /* libReact.a */,
@@ -109,6 +113,7 @@
109 113
 				83CBBA001A601CBA00E9B192 /* Products */,
110 114
 				2D16E6871FA4F8E400B85C8A /* Frameworks */,
111 115
 				01938D2000C2EABCD5318130 /* Pods */,
116
+				F00001AB828C4AB78E644833 /* Resources */,
112 117
 			);
113 118
 			indentWidth = 2;
114 119
 			sourceTree = "<group>";
@@ -124,6 +129,14 @@
124 129
 			name = Products;
125 130
 			sourceTree = "<group>";
126 131
 		};
132
+		F00001AB828C4AB78E644833 /* Resources */ = {
133
+			isa = PBXGroup;
134
+			children = (
135
+				B0FEF2381CCE4DAC89A441F0 /* MaterialIcons.ttf */,
136
+			);
137
+			name = Resources;
138
+			sourceTree = "<group>";
139
+		};
127 140
 /* End PBXGroup section */
128 141
 
129 142
 /* Begin PBXNativeTarget section */
@@ -136,6 +149,7 @@
136 149
 				13B07F8C1A680F5B00A75B9A /* Frameworks */,
137 150
 				13B07F8E1A680F5B00A75B9A /* Resources */,
138 151
 				00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
152
+				4D2FBE14CA4911D84AA38FD7 /* [CP] Copy Pods Resources */,
139 153
 			);
140 154
 			buildRules = (
141 155
 			);
@@ -176,6 +190,17 @@
176 190
 				TargetAttributes = {
177 191
 					13B07F861A680F5B00A75B9A = {
178 192
 						DevelopmentTeam = 745449BDR9;
193
+						SystemCapabilities = {
194
+							com.apple.BackgroundModes = {
195
+								enabled = 1;
196
+							};
197
+							com.apple.HealthKit = {
198
+								enabled = 0;
199
+							};
200
+							com.apple.HomeKit = {
201
+								enabled = 0;
202
+							};
203
+						};
179 204
 					};
180 205
 					2D02E47A1E0B4A5D006451C7 = {
181 206
 						CreatedOnToolsVersion = 8.2.1;
@@ -209,6 +234,7 @@
209 234
 			files = (
210 235
 				13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
211 236
 				13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
237
+				C365FCDF23384B71BADA5827 /* MaterialIcons.ttf in Resources */,
212 238
 			);
213 239
 			runOnlyForDeploymentPostprocessing = 0;
214 240
 		};
@@ -273,6 +299,56 @@
273 299
 			shellPath = /bin/sh;
274 300
 			shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
275 301
 		};
302
+		4D2FBE14CA4911D84AA38FD7 /* [CP] Copy Pods Resources */ = {
303
+			isa = PBXShellScriptBuildPhase;
304
+			buildActionMask = 2147483647;
305
+			files = (
306
+			);
307
+			inputFileListPaths = (
308
+			);
309
+			inputPaths = (
310
+				"${SRCROOT}/Pods/Target Support Files/Pods-RNPermissionsExample/Pods-RNPermissionsExample-resources.sh",
311
+				"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/AntDesign.ttf",
312
+				"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Entypo.ttf",
313
+				"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf",
314
+				"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Feather.ttf",
315
+				"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome.ttf",
316
+				"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Brands.ttf",
317
+				"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Regular.ttf",
318
+				"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Solid.ttf",
319
+				"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Foundation.ttf",
320
+				"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Ionicons.ttf",
321
+				"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf",
322
+				"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/MaterialIcons.ttf",
323
+				"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Octicons.ttf",
324
+				"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf",
325
+				"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Zocial.ttf",
326
+			);
327
+			name = "[CP] Copy Pods Resources";
328
+			outputFileListPaths = (
329
+			);
330
+			outputPaths = (
331
+				"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AntDesign.ttf",
332
+				"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Entypo.ttf",
333
+				"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EvilIcons.ttf",
334
+				"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Feather.ttf",
335
+				"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome.ttf",
336
+				"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Brands.ttf",
337
+				"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Regular.ttf",
338
+				"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Solid.ttf",
339
+				"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Foundation.ttf",
340
+				"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Ionicons.ttf",
341
+				"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MaterialCommunityIcons.ttf",
342
+				"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MaterialIcons.ttf",
343
+				"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Octicons.ttf",
344
+				"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/SimpleLineIcons.ttf",
345
+				"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Zocial.ttf",
346
+			);
347
+			runOnlyForDeploymentPostprocessing = 0;
348
+			shellPath = /bin/sh;
349
+			shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RNPermissionsExample/Pods-RNPermissionsExample-resources.sh\"\n";
350
+			showEnvVarsInLog = 0;
351
+		};
276 352
 		B42AA7D4FE9C586F3907791A /* [CP] Check Pods Manifest.lock */ = {
277 353
 			isa = PBXShellScriptBuildPhase;
278 354
 			buildActionMask = 2147483647;
@@ -336,6 +412,7 @@
336 412
 			baseConfigurationReference = EFC2B4024563B97F765C7CAF /* Pods-RNPermissionsExample.debug.xcconfig */;
337 413
 			buildSettings = {
338 414
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
415
+				CODE_SIGN_ENTITLEMENTS = "";
339 416
 				CURRENT_PROJECT_VERSION = 1;
340 417
 				DEAD_CODE_STRIPPING = NO;
341 418
 				DEVELOPMENT_TEAM = 745449BDR9;
@@ -352,7 +429,7 @@
352 429
 					"-ObjC",
353 430
 					"-lc++",
354 431
 				);
355
-				PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
432
+				PRODUCT_BUNDLE_IDENTIFIER = com.zoontek.rnpermissions;
356 433
 				PRODUCT_NAME = RNPermissionsExample;
357 434
 				VERSIONING_SYSTEM = "apple-generic";
358 435
 			};
@@ -363,6 +440,7 @@
363 440
 			baseConfigurationReference = 112A13EA7418A1DA3FFFE89E /* Pods-RNPermissionsExample.release.xcconfig */;
364 441
 			buildSettings = {
365 442
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
443
+				CODE_SIGN_ENTITLEMENTS = "";
366 444
 				CURRENT_PROJECT_VERSION = 1;
367 445
 				DEVELOPMENT_TEAM = 745449BDR9;
368 446
 				HEADER_SEARCH_PATHS = "$(inherited)";
@@ -378,7 +456,7 @@
378 456
 					"-ObjC",
379 457
 					"-lc++",
380 458
 				);
381
-				PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
459
+				PRODUCT_BUNDLE_IDENTIFIER = com.zoontek.rnpermissions;
382 460
 				PRODUCT_NAME = RNPermissionsExample;
383 461
 				VERSIONING_SYSTEM = "apple-generic";
384 462
 			};

+ 15
- 0
example/ios/RNPermissionsExample/Images.xcassets/AppIcon.appiconset/Contents.json Wyświetl plik

@@ -1,5 +1,15 @@
1 1
 {
2 2
   "images": [
3
+    {
4
+      "idiom": "iphone",
5
+      "size": "20x20",
6
+      "scale": "2x"
7
+    },
8
+    {
9
+      "idiom": "iphone",
10
+      "size": "20x20",
11
+      "scale": "3x"
12
+    },
3 13
     {
4 14
       "idiom": "iphone",
5 15
       "size": "29x29",
@@ -29,6 +39,11 @@
29 39
       "idiom": "iphone",
30 40
       "size": "60x60",
31 41
       "scale": "3x"
42
+    },
43
+    {
44
+      "idiom": "ios-marketing",
45
+      "size": "1024x1024",
46
+      "scale": "1x"
32 47
     }
33 48
   ],
34 49
   "info": {

+ 49
- 18
example/ios/RNPermissionsExample/Info.plist Wyświetl plik

@@ -24,20 +24,6 @@
24 24
 	<string>1</string>
25 25
 	<key>LSRequiresIPhoneOS</key>
26 26
 	<true/>
27
-	<key>UILaunchStoryboardName</key>
28
-	<string>LaunchScreen</string>
29
-	<key>UIRequiredDeviceCapabilities</key>
30
-	<array>
31
-		<string>armv7</string>
32
-	</array>
33
-	<key>UISupportedInterfaceOrientations</key>
34
-	<array>
35
-		<string>UIInterfaceOrientationPortrait</string>
36
-		<string>UIInterfaceOrientationLandscapeLeft</string>
37
-		<string>UIInterfaceOrientationLandscapeRight</string>
38
-	</array>
39
-	<key>UIViewControllerBasedStatusBarAppearance</key>
40
-	<false/>
41 27
 	<key>NSAppTransportSecurity</key>
42 28
 	<dict>
43 29
 		<key>NSAllowsArbitraryLoads</key>
@@ -51,11 +37,56 @@
51 37
 			</dict>
52 38
 		</dict>
53 39
 	</dict>
40
+	<key>NSAppleMusicUsageDescription</key>
41
+	<string>Please let me use your media library</string>
42
+	<key>NSBluetoothPeripheralUsageDescription</key>
43
+	<string>Please let me use your bluetooth peripheral</string>
44
+	<key>NSCalendarsUsageDescription</key>
45
+	<string>Please let me use your calendar</string>
54 46
 	<key>NSCameraUsageDescription</key>
55
-	<string>I want to use your camera</string>
47
+	<string>Please let me use your camera</string>
56 48
 	<key>NSContactsUsageDescription</key>
57
-	<string>I want to use your contacts</string>
58
-	<key>NSCalendarsUsageDescription</key>
59
-	<string>I want to use your calendar</string>
49
+	<string>Please let me use your contacts</string>
50
+	<key>NSFaceIDUsageDescription</key>
51
+	<string>Please let me use FaceID</string>
52
+	<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
53
+	<string>Please let me use your location, even in background</string>
54
+	<key>NSLocationAlwaysUsageDescription</key>
55
+	<string>Please let me use your location, even in background</string>
56
+	<key>NSLocationWhenInUseUsageDescription</key>
57
+	<string>Please let me use your location when the app is opened</string>
58
+	<key>NSMicrophoneUsageDescription</key>
59
+	<string>Please let me use your microphone</string>
60
+	<key>NSMotionUsageDescription</key>
61
+	<string>Please let me use your motion data</string>
62
+	<key>NSPhotoLibraryUsageDescription</key>
63
+	<string>Please let me use your photo library</string>
64
+	<key>NSRemindersUsageDescription</key>
65
+	<string>Please let me use your reminders</string>
66
+	<key>NSSpeechRecognitionUsageDescription</key>
67
+	<string>Please let me use speech recognition</string>
68
+	<key>UIAppFonts</key>
69
+	<array>
70
+		<string>MaterialIcons.ttf</string>
71
+	</array>
72
+	<key>UIBackgroundModes</key>
73
+	<array>
74
+		<string>bluetooth-peripheral</string>
75
+		<string>location</string>
76
+	</array>
77
+	<key>UILaunchStoryboardName</key>
78
+	<string>LaunchScreen</string>
79
+	<key>UIRequiredDeviceCapabilities</key>
80
+	<array>
81
+		<string>armv7</string>
82
+	</array>
83
+	<key>UISupportedInterfaceOrientations</key>
84
+	<array>
85
+		<string>UIInterfaceOrientationPortrait</string>
86
+		<string>UIInterfaceOrientationLandscapeLeft</string>
87
+		<string>UIInterfaceOrientationLandscapeRight</string>
88
+	</array>
89
+	<key>UIViewControllerBasedStatusBarAppearance</key>
90
+	<false/>
60 91
 </dict>
61 92
 </plist>

+ 7
- 5
example/package.json Wyświetl plik

@@ -3,17 +3,19 @@
3 3
   "version": "0.0.1",
4 4
   "private": true,
5 5
   "scripts": {
6
-    "clean-haste": "rm -rf node_modules/react-native-permissions/node_modules",
7
-    "start": "npm run clean-haste && node node_modules/react-native/local-cli/cli.js start"
6
+    "clean:modules": "rm -rf node_modules/react-native-permissions/node_modules",
7
+    "clean:example": "rm -rf node_modules/react-native-permissions/example",
8
+    "start": "yarn clean:modules && yarn clean:example && node node_modules/react-native/local-cli/cli.js start"
8 9
   },
9 10
   "dependencies": {
10 11
     "react": "16.6.3",
11 12
     "react-native": "0.58.3",
12
-    "react-native-paper": "^2.6.3",
13
-    "react-native-permissions": "../"
13
+    "react-native-paper": "2.6.3",
14
+    "react-native-permissions": "../",
15
+    "react-native-vector-icons": "6.2.0"
14 16
   },
15 17
   "devDependencies": {
16
-    "babel-core": "^7.0.0-bridge.0",
18
+    "babel-core": "7.0.0-bridge.0",
17 19
     "metro-react-native-babel-preset": "0.51.1"
18 20
   }
19 21
 }

+ 12
- 0
example/theme.js Wyświetl plik

@@ -0,0 +1,12 @@
1
+// @flow
2
+
3
+import { DefaultTheme } from "react-native-paper";
4
+
5
+export default {
6
+  ...DefaultTheme,
7
+  colors: {
8
+    ...DefaultTheme.colors,
9
+    primary: "#607d8b",
10
+    accent: "#7b1fa2",
11
+  },
12
+};

+ 35
- 7
example/yarn.lock Wyświetl plik

@@ -972,6 +972,11 @@ babel-code-frame@^6.26.0:
972 972
     esutils "^2.0.2"
973 973
     js-tokens "^3.0.2"
974 974
 
975
+babel-core@7.0.0-bridge.0:
976
+  version "7.0.0-bridge.0"
977
+  resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-7.0.0-bridge.0.tgz#95a492ddd90f9b4e9a4a1da14eb335b87b634ece"
978
+  integrity sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg==
979
+
975 980
 babel-core@^6.0.0, babel-core@^6.26.0:
976 981
   version "6.26.3"
977 982
   resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207"
@@ -997,11 +1002,6 @@ babel-core@^6.0.0, babel-core@^6.26.0:
997 1002
     slash "^1.0.0"
998 1003
     source-map "^0.5.7"
999 1004
 
1000
-babel-core@^7.0.0-bridge.0:
1001
-  version "7.0.0-bridge.0"
1002
-  resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-7.0.0-bridge.0.tgz#95a492ddd90f9b4e9a4a1da14eb335b87b634ece"
1003
-  integrity sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg==
1004
-
1005 1005
 babel-generator@^6.18.0, babel-generator@^6.26.0:
1006 1006
   version "6.26.1"
1007 1007
   resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90"
@@ -4005,7 +4005,7 @@ lodash.throttle@^4.1.1:
4005 4005
   resolved "https://registry.yarnpkg.com/lodash.throttle/-/lodash.throttle-4.1.1.tgz#c23e91b710242ac70c37f1e1cda9274cc39bf2f4"
4006 4006
   integrity sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ=
4007 4007
 
4008
-lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.3.0, lodash@^4.6.1:
4008
+lodash@^4.0.0, lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.3.0, lodash@^4.6.1:
4009 4009
   version "4.17.11"
4010 4010
   resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d"
4011 4011
   integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==
@@ -5210,7 +5210,7 @@ react-lifecycles-compat@^3.0.4:
5210 5210
   resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362"
5211 5211
   integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==
5212 5212
 
5213
-react-native-paper@^2.6.3:
5213
+react-native-paper@2.6.3:
5214 5214
   version "2.6.3"
5215 5215
   resolved "https://registry.yarnpkg.com/react-native-paper/-/react-native-paper-2.6.3.tgz#9ed37d127a4a5d30b940a9123ea9224c4d64034a"
5216 5216
   integrity sha512-TsGrvvRtG0tfEk+82EpWXkxe/jJ3e2pivePqRqLJH37rBCDauNnGGi3hl7CL8XFqOBru55n86Eb92F4e4qjlDg==
@@ -5224,6 +5224,15 @@ react-native-paper@^2.6.3:
5224 5224
 react-native-permissions@../:
5225 5225
   version "2.0.0-alpha.1"
5226 5226
 
5227
+react-native-vector-icons@6.2.0:
5228
+  version "6.2.0"
5229
+  resolved "https://registry.yarnpkg.com/react-native-vector-icons/-/react-native-vector-icons-6.2.0.tgz#2682b718099eb9470c0defd38da47deb844a0f9c"
5230
+  integrity sha512-NEQeQF7RzO5OILV4Q/F8P3pSuwN45/PPbOwU8/Eocc2Kl1bH1D42WFj+WSbCLVKeEq6oo7uj3tGqmrXGLs974A==
5231
+  dependencies:
5232
+    lodash "^4.0.0"
5233
+    prop-types "^15.6.2"
5234
+    yargs "^8.0.2"
5235
+
5227 5236
 react-native@0.58.3:
5228 5237
   version "0.58.3"
5229 5238
   resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.58.3.tgz#90e2dbfef19f3793ba008ab5274daac926424916"
@@ -6672,6 +6681,25 @@ yargs@^12.0.2:
6672 6681
     y18n "^3.2.1 || ^4.0.0"
6673 6682
     yargs-parser "^11.1.1"
6674 6683
 
6684
+yargs@^8.0.2:
6685
+  version "8.0.2"
6686
+  resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360"
6687
+  integrity sha1-YpmpBVsc78lp/355wdkY3Osiw2A=
6688
+  dependencies:
6689
+    camelcase "^4.1.0"
6690
+    cliui "^3.2.0"
6691
+    decamelize "^1.1.1"
6692
+    get-caller-file "^1.0.1"
6693
+    os-locale "^2.0.0"
6694
+    read-pkg-up "^2.0.0"
6695
+    require-directory "^2.1.1"
6696
+    require-main-filename "^1.0.1"
6697
+    set-blocking "^2.0.0"
6698
+    string-width "^2.0.0"
6699
+    which-module "^2.0.0"
6700
+    y18n "^3.2.1"
6701
+    yargs-parser "^7.0.0"
6702
+
6675 6703
 yargs@^9.0.0:
6676 6704
   version "9.0.1"
6677 6705
   resolved "https://registry.yarnpkg.com/yargs/-/yargs-9.0.1.tgz#52acc23feecac34042078ee78c0c007f5085db4c"