Selaa lähdekoodia

Merge branch 'master' into master

Yonah Forst 7 vuotta sitten
vanhempi
commit
f17836d0d5

+ 8
- 0
.gitignore Näytä tiedosto

@@ -1,2 +1,10 @@
1 1
 android/react-native-permissions.iml
2 2
 android/build
3
+android/.idea
4
+npm-debug.log
5
+gradlew
6
+gradle-wrapper.properties
7
+gradle-wrapper.jar
8
+local.properties
9
+gradlew.bat
10
+android.iml

+ 1
- 0
.npmignore Näytä tiedosto

@@ -0,0 +1 @@
1
+Example

+ 3
- 0
Example/.babelrc Näytä tiedosto

@@ -0,0 +1,3 @@
1
+{
2
+"presets": ["react-native"]
3
+}

+ 16
- 13
Example/.flowconfig Näytä tiedosto

@@ -1,13 +1,18 @@
1 1
 [ignore]
2
+; We fork some components by platform
3
+.*/*[.]android.js
2 4
 
3
-# We fork some components by platform.
4
-.*/*.android.js
5
+; Ignore "BUCK" generated dirs
6
+<PROJECT_ROOT>/\.buckd/
5 7
 
6
-# Ignore templates with `@flow` in header
7
-.*/local-cli/generator.*
8
+; Ignore unexpected extra "@providesModule"
9
+.*/node_modules/.*/node_modules/fbjs/.*
8 10
 
9
-# Ignore malformed json
10
-.*/node_modules/y18n/test/.*\.json
11
+; Ignore duplicate module providers
12
+; For RN Apps installed via npm, "Libraries" folder is inside
13
+; "node_modules/react-native" but in the source repo it is in the root
14
+.*/Libraries/react-native/React.js
15
+.*/Libraries/react-native/ReactNative.js
11 16
 
12 17
 [include]
13 18
 
@@ -19,23 +24,21 @@ flow/
19 24
 [options]
20 25
 module.system=haste
21 26
 
22
-esproposal.class_static_fields=enable
23
-esproposal.class_instance_fields=enable
24
-
25 27
 experimental.strict_type_args=true
26 28
 
27 29
 munge_underscores=true
28 30
 
29
-module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub'
30 31
 module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
31 32
 
32 33
 suppress_type=$FlowIssue
33 34
 suppress_type=$FlowFixMe
34 35
 suppress_type=$FixMe
35 36
 
36
-suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(2[0-7]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
37
-suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(2[0-7]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
37
+suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-7]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
38
+suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-7]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
38 39
 suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
39 40
 
41
+unsafe.enable_getters_and_setters=true
42
+
40 43
 [version]
41
-^0.27.0
44
+^0.37.0

+ 1
- 0
Example/.gitattributes Näytä tiedosto

@@ -0,0 +1 @@
1
+*.pbxproj -text

+ 16
- 3
Example/.gitignore Näytä tiedosto

@@ -22,20 +22,33 @@ DerivedData
22 22
 *.xcuserstate
23 23
 project.xcworkspace
24 24
 
25
-# Android/IJ
25
+# Android/IntelliJ
26 26
 #
27
-*.iml
27
+build/
28 28
 .idea
29 29
 .gradle
30 30
 local.properties
31
+*.iml
31 32
 
32 33
 # node.js
33 34
 #
34 35
 node_modules/
35 36
 npm-debug.log
37
+yarn-error.log
36 38
 
37 39
 # BUCK
38 40
 buck-out/
39 41
 \.buckd/
40 42
 android/app/libs
41
-android/keystores/debug.keystore
43
+*.keystore
44
+
45
+# fastlane
46
+#
47
+# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
48
+# screenshots whenever they are needed.
49
+# For more information about the recommended setup visit:
50
+# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
51
+
52
+fastlane/report.xml
53
+fastlane/Preview.html
54
+fastlane/screenshots

+ 45
- 10
Example/Example.js Näytä tiedosto

@@ -12,6 +12,7 @@ import {
12 12
   View,
13 13
   Alert,
14 14
   AppState,
15
+  Platform,
15 16
 } from 'react-native';
16 17
 
17 18
 import Permissions from 'react-native-permissions'
@@ -42,11 +43,24 @@ export default class Example extends Component {
42 43
 
43 44
   _updatePermissions(types) {
44 45
     Permissions.checkMultiplePermissions(types)
46
+      .then(status => {
47
+        if (this.state.isAlways) {
48
+          return Permissions.getPermissionStatus('location', 'always')
49
+            .then(location => ({...status, location}))
50
+        }
51
+        return status
52
+      })
45 53
       .then(status => this.setState({ status }))
46 54
   }
47 55
 
48 56
   _requestPermission(permission) {
49
-    Permissions.requestPermission(permission)
57
+    var options
58
+
59
+    if (permission == 'location') {
60
+      options = this.state.isAlways ? 'always' : 'whenInUse'
61
+    }
62
+
63
+    Permissions.requestPermission(permission, options)
50 64
       .then(res => {
51 65
         this.setState({
52 66
           status: {...this.state.status, [permission]: res}
@@ -64,9 +78,15 @@ export default class Example extends Component {
64 78
       }).catch(e => console.warn(e))
65 79
   }
66 80
 
81
+  _onLocationSwitchChange() {
82
+    this.setState({ isAlways: !this.state.isAlways })
83
+    this._updatePermissions(this.state.types)
84
+  }
85
+
67 86
   render() {
68 87
     return (
69 88
       <View style={styles.container}>
89
+
70 90
         {this.state.types.map(p => (
71 91
           <TouchableHighlight 
72 92
             style={[styles.button, styles[this.state.status[p]]]}
@@ -74,7 +94,7 @@ export default class Example extends Component {
74 94
             onPress={this._requestPermission.bind(this, p)}>
75 95
             <View>
76 96
               <Text style={styles.text}>
77
-                {p}
97
+                {Platform.OS == 'ios' && p == 'location' ? `location ${this.state.isAlways ? 'always' : 'whenInUse'}` : p}
78 98
               </Text>
79 99
               <Text style={styles.subtext}>
80 100
                 {this.state.status[p]}
@@ -83,13 +103,23 @@ export default class Example extends Component {
83 103
           </TouchableHighlight>
84 104
           )
85 105
         )}
86
-        <TouchableHighlight 
87
-          style={styles.openSettings}
88
-          onPress={Permissions.openSettings}>
89
-          <Text style={styles.text}>Open settings</Text>
90
-        </TouchableHighlight>
106
+        <View style={styles.footer}>
107
+          <TouchableHighlight 
108
+            style={styles['footer_'+Platform.OS]}
109
+            onPress={this._onLocationSwitchChange.bind(this)}>
110
+            <Text style={styles.text}>Toggle location type</Text>
111
+          </TouchableHighlight>
91 112
 
92
-        <Text>Note: microphone permissions may not work on iOS simulator. Also, toggling permissions from the settings menu may cause the app to crash. This is normal on iOS. Google "ios crash permission change"</Text>
113
+          <TouchableHighlight 
114
+            onPress={Permissions.openSettings}>
115
+            <Text style={styles.text}>Open settings</Text>
116
+          </TouchableHighlight>
117
+        </View>
118
+
119
+
120
+        <Text style={styles['footer_'+Platform.OS]}>
121
+          Note: microphone permissions may not work on iOS simulator. Also, toggling permissions from the settings menu may cause the app to crash. This is normal on iOS. Google "ios crash permission change"
122
+        </Text>
93 123
       </View>
94 124
     );
95 125
   }
@@ -130,8 +160,13 @@ const styles = StyleSheet.create({
130 160
   restricted: {
131 161
     backgroundColor: '#FFAB91'
132 162
   },
133
-  openSettings: {
163
+  footer: {
134 164
     padding: 10,
135
-    alignSelf: 'flex-end',
165
+    flexDirection: 'row',
166
+    justifyContent: 'space-between',
167
+  },
168
+  footer_android: {
169
+    height: 0,
170
+    width: 0,
136 171
   }
137 172
 })

+ 12
- 0
Example/__tests__/index.android.js Näytä tiedosto

@@ -0,0 +1,12 @@
1
+import 'react-native';
2
+import React from 'react';
3
+import Index from '../index.android.js';
4
+
5
+// Note: test renderer must be required after react-native.
6
+import renderer from 'react-test-renderer';
7
+
8
+it('renders correctly', () => {
9
+  const tree = renderer.create(
10
+    <Index />
11
+  );
12
+});

+ 12
- 0
Example/__tests__/index.ios.js Näytä tiedosto

@@ -0,0 +1,12 @@
1
+import 'react-native';
2
+import React from 'react';
3
+import Index from '../index.ios.js';
4
+
5
+// Note: test renderer must be required after react-native.
6
+import renderer from 'react-test-renderer';
7
+
8
+it('renders correctly', () => {
9
+  const tree = renderer.create(
10
+    <Index />
11
+  );
12
+});

+ 3
- 3
Example/android/app/build.gradle Näytä tiedosto

@@ -88,7 +88,7 @@ android {
88 88
 
89 89
     defaultConfig {
90 90
         applicationId "com.example"
91
-        minSdkVersion 22
91
+        minSdkVersion 21
92 92
         targetSdkVersion 23
93 93
         versionCode 1
94 94
         versionName "1.0"
@@ -135,6 +135,6 @@ dependencies {
135 135
 // Run this once to be able to run the application with BUCK
136 136
 // puts all compile dependencies into folder libs for BUCK to use
137 137
 task copyDownloadableDepsToLibs(type: Copy) {
138
-  from configurations.compile
139
-  into 'libs'
138
+    from configurations.compile
139
+    into 'libs'
140 140
 }

+ 1
- 3
Example/android/app/src/main/AndroidManifest.xml Näytä tiedosto

@@ -9,12 +9,10 @@
9 9
     <uses-permission android:name="android.permission.CAMERA"/>
10 10
     <uses-permission android:name="android.permission.RECORD_AUDIO"/>
11 11
     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
12
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
12 13
     <uses-permission android:name="android.permission.READ_CONTACTS"/>
13 14
     <uses-permission android:name="android.permission.READ_CALENDAR"/>
14 15
 
15
-    <uses-sdk
16
-        android:minSdkVersion="18"
17
-        android:targetSdkVersion="23" />
18 16
 
19 17
     <application
20 18
       android:name=".MainApplication"

+ 9
- 2
Example/android/app/src/main/java/com/example/MainApplication.java Näytä tiedosto

@@ -9,6 +9,7 @@ import com.facebook.react.ReactNativeHost;
9 9
 import com.facebook.react.ReactPackage;
10 10
 import com.facebook.react.shell.MainReactPackage;
11 11
 import com.joshblour.reactnativepermissions.ReactNativePermissionsPackage;
12
+import com.facebook.soloader.SoLoader;
12 13
 
13 14
 import java.util.Arrays;
14 15
 import java.util.List;
@@ -17,7 +18,7 @@ public class MainApplication extends Application implements ReactApplication {
17 18
 
18 19
   private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
19 20
     @Override
20
-    protected boolean getUseDeveloperSupport() {
21
+    public boolean getUseDeveloperSupport() {
21 22
       return BuildConfig.DEBUG;
22 23
     }
23 24
 
@@ -32,6 +33,12 @@ public class MainApplication extends Application implements ReactApplication {
32 33
 
33 34
   @Override
34 35
   public ReactNativeHost getReactNativeHost() {
35
-      return mReactNativeHost;
36
+    return mReactNativeHost;
37
+  }
38
+
39
+  @Override
40
+  public void onCreate() {
41
+    super.onCreate();
42
+    SoLoader.init(this, /* native exopackage */ false);
36 43
   }
37 44
 }

+ 1
- 1
Example/android/build.gradle Näytä tiedosto

@@ -5,7 +5,7 @@ buildscript {
5 5
         jcenter()
6 6
     }
7 7
     dependencies {
8
-        classpath 'com.android.tools.build:gradle:1.3.1'
8
+        classpath 'com.android.tools.build:gradle:2.1.2'
9 9
 
10 10
         // NOTE: Do not place your application dependencies here; they belong
11 11
         // in the individual module build.gradle files

+ 2
- 1
Example/android/gradle/wrapper/gradle-wrapper.properties Näytä tiedosto

@@ -1,5 +1,6 @@
1
+#Fri Feb 03 16:27:32 CET 2017
1 2
 distributionBase=GRADLE_USER_HOME
2 3
 distributionPath=wrapper/dists
3 4
 zipStoreBase=GRADLE_USER_HOME
4 5
 zipStorePath=wrapper/dists
5
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
6
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip

+ 54
- 0
Example/ios/Example-tvOS/Info.plist Näytä tiedosto

@@ -0,0 +1,54 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+<plist version="1.0">
4
+<dict>
5
+	<key>CFBundleDevelopmentRegion</key>
6
+	<string>en</string>
7
+	<key>CFBundleExecutable</key>
8
+	<string>$(EXECUTABLE_NAME)</string>
9
+	<key>CFBundleIdentifier</key>
10
+	<string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string>
11
+	<key>CFBundleInfoDictionaryVersion</key>
12
+	<string>6.0</string>
13
+	<key>CFBundleName</key>
14
+	<string>$(PRODUCT_NAME)</string>
15
+	<key>CFBundlePackageType</key>
16
+	<string>APPL</string>
17
+	<key>CFBundleShortVersionString</key>
18
+	<string>1.0</string>
19
+	<key>CFBundleSignature</key>
20
+	<string>????</string>
21
+	<key>CFBundleVersion</key>
22
+	<string>1</string>
23
+	<key>LSRequiresIPhoneOS</key>
24
+	<true/>
25
+	<key>UILaunchStoryboardName</key>
26
+	<string>LaunchScreen</string>
27
+	<key>UIRequiredDeviceCapabilities</key>
28
+	<array>
29
+		<string>armv7</string>
30
+	</array>
31
+	<key>UISupportedInterfaceOrientations</key>
32
+	<array>
33
+		<string>UIInterfaceOrientationPortrait</string>
34
+		<string>UIInterfaceOrientationLandscapeLeft</string>
35
+		<string>UIInterfaceOrientationLandscapeRight</string>
36
+	</array>
37
+	<key>UIViewControllerBasedStatusBarAppearance</key>
38
+	<false/>
39
+	<key>NSLocationWhenInUseUsageDescription</key>
40
+	<string></string>
41
+	<key>NSAppTransportSecurity</key>
42
+	<!--See http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/ -->
43
+	<dict>
44
+		<key>NSExceptionDomains</key>
45
+		<dict>
46
+			<key>localhost</key>
47
+			<dict>
48
+				<key>NSExceptionAllowsInsecureHTTPLoads</key>
49
+				<true/>
50
+			</dict>
51
+		</dict>
52
+	</dict>
53
+</dict>
54
+</plist>

+ 24
- 0
Example/ios/Example-tvOSTests/Info.plist Näytä tiedosto

@@ -0,0 +1,24 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+<plist version="1.0">
4
+<dict>
5
+	<key>CFBundleDevelopmentRegion</key>
6
+	<string>en</string>
7
+	<key>CFBundleExecutable</key>
8
+	<string>$(EXECUTABLE_NAME)</string>
9
+	<key>CFBundleIdentifier</key>
10
+	<string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string>
11
+	<key>CFBundleInfoDictionaryVersion</key>
12
+	<string>6.0</string>
13
+	<key>CFBundleName</key>
14
+	<string>$(PRODUCT_NAME)</string>
15
+	<key>CFBundlePackageType</key>
16
+	<string>BNDL</string>
17
+	<key>CFBundleShortVersionString</key>
18
+	<string>1.0</string>
19
+	<key>CFBundleSignature</key>
20
+	<string>????</string>
21
+	<key>CFBundleVersion</key>
22
+	<string>1</string>
23
+</dict>
24
+</plist>

+ 540
- 43
Example/ios/Example.xcodeproj/project.pbxproj Näytä tiedosto

@@ -22,7 +22,20 @@
22 22
 		13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
23 23
 		140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
24 24
 		146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
25
-		50F9604CB69B4BA6A44EA44F /* libReactNativePermissions.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D9820CCF930F4ED1BE137DA6 /* libReactNativePermissions.a */; };
25
+		14902CDAB1064113A6B4C970 /* libReactNativePermissions.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B27CA08432F04FFCB0256EA1 /* libReactNativePermissions.a */; };
26
+		2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
27
+		2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
28
+		2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
29
+		2D02E4C21E0B4AEC006451C7 /* libRCTAnimation-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation-tvOS.a */; };
30
+		2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */; };
31
+		2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */; };
32
+		2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */; };
33
+		2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */; };
34
+		2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */; };
35
+		2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */; };
36
+		2D02E4C91E0B4AEC006451C7 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3EA31DF850E9000B6D8A /* libReact.a */; };
37
+		2DCD954D1E0B4F2C00145EB5 /* ExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* ExampleTests.m */; };
38
+		5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; };
26 39
 		832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
27 40
 /* End PBXBuildFile section */
28 41
 
@@ -90,6 +103,118 @@
90 103
 			remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192;
91 104
 			remoteInfo = React;
92 105
 		};
106
+		2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */ = {
107
+			isa = PBXContainerItemProxy;
108
+			containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
109
+			proxyType = 1;
110
+			remoteGlobalIDString = 2D02E47A1E0B4A5D006451C7;
111
+			remoteInfo = "Example-tvOS";
112
+		};
113
+		3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */ = {
114
+			isa = PBXContainerItemProxy;
115
+			containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
116
+			proxyType = 2;
117
+			remoteGlobalIDString = 2D2A283A1D9B042B00D4039D;
118
+			remoteInfo = "RCTImage-tvOS";
119
+		};
120
+		3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */ = {
121
+			isa = PBXContainerItemProxy;
122
+			containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
123
+			proxyType = 2;
124
+			remoteGlobalIDString = 2D2A28471D9B043800D4039D;
125
+			remoteInfo = "RCTLinking-tvOS";
126
+		};
127
+		3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
128
+			isa = PBXContainerItemProxy;
129
+			containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */;
130
+			proxyType = 2;
131
+			remoteGlobalIDString = 2D2A28541D9B044C00D4039D;
132
+			remoteInfo = "RCTNetwork-tvOS";
133
+		};
134
+		3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
135
+			isa = PBXContainerItemProxy;
136
+			containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
137
+			proxyType = 2;
138
+			remoteGlobalIDString = 2D2A28611D9B046600D4039D;
139
+			remoteInfo = "RCTSettings-tvOS";
140
+		};
141
+		3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */ = {
142
+			isa = PBXContainerItemProxy;
143
+			containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */;
144
+			proxyType = 2;
145
+			remoteGlobalIDString = 2D2A287B1D9B048500D4039D;
146
+			remoteInfo = "RCTText-tvOS";
147
+		};
148
+		3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */ = {
149
+			isa = PBXContainerItemProxy;
150
+			containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
151
+			proxyType = 2;
152
+			remoteGlobalIDString = 2D2A28881D9B049200D4039D;
153
+			remoteInfo = "RCTWebSocket-tvOS";
154
+		};
155
+		3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */ = {
156
+			isa = PBXContainerItemProxy;
157
+			containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
158
+			proxyType = 2;
159
+			remoteGlobalIDString = 2D2A28131D9B038B00D4039D;
160
+			remoteInfo = "React-tvOS";
161
+		};
162
+		3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */ = {
163
+			isa = PBXContainerItemProxy;
164
+			containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
165
+			proxyType = 2;
166
+			remoteGlobalIDString = 3D3C059A1DE3340900C268FA;
167
+			remoteInfo = yoga;
168
+		};
169
+		3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */ = {
170
+			isa = PBXContainerItemProxy;
171
+			containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
172
+			proxyType = 2;
173
+			remoteGlobalIDString = 3D3C06751DE3340C00C268FA;
174
+			remoteInfo = "yoga-tvOS";
175
+		};
176
+		3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */ = {
177
+			isa = PBXContainerItemProxy;
178
+			containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
179
+			proxyType = 2;
180
+			remoteGlobalIDString = 3D3CD9251DE5FBEC00167DC4;
181
+			remoteInfo = cxxreact;
182
+		};
183
+		3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
184
+			isa = PBXContainerItemProxy;
185
+			containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
186
+			proxyType = 2;
187
+			remoteGlobalIDString = 3D3CD9321DE5FBEE00167DC4;
188
+			remoteInfo = "cxxreact-tvOS";
189
+		};
190
+		3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
191
+			isa = PBXContainerItemProxy;
192
+			containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
193
+			proxyType = 2;
194
+			remoteGlobalIDString = 3D3CD90B1DE5FBD600167DC4;
195
+			remoteInfo = jschelpers;
196
+		};
197
+		3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
198
+			isa = PBXContainerItemProxy;
199
+			containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
200
+			proxyType = 2;
201
+			remoteGlobalIDString = 3D3CD9181DE5FBD800167DC4;
202
+			remoteInfo = "jschelpers-tvOS";
203
+		};
204
+		5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = {
205
+			isa = PBXContainerItemProxy;
206
+			containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */;
207
+			proxyType = 2;
208
+			remoteGlobalIDString = 134814201AA4EA6300B7C361;
209
+			remoteInfo = RCTAnimation;
210
+		};
211
+		5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = {
212
+			isa = PBXContainerItemProxy;
213
+			containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */;
214
+			proxyType = 2;
215
+			remoteGlobalIDString = 2D2A28201D9B03D100D4039D;
216
+			remoteInfo = "RCTAnimation-tvOS";
217
+		};
93 218
 		78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = {
94 219
 			isa = PBXContainerItemProxy;
95 220
 			containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
@@ -104,9 +229,9 @@
104 229
 			remoteGlobalIDString = 58B5119B1A9E6C1200147676;
105 230
 			remoteInfo = RCTText;
106 231
 		};
107
-		9D1B45CC1D49EE8400459C66 /* PBXContainerItemProxy */ = {
232
+		9D8131C41E44834800F4B1D3 /* PBXContainerItemProxy */ = {
108 233
 			isa = PBXContainerItemProxy;
109
-			containerPortal = 783F116470084EEB95DCA092 /* ReactNativePermissions.xcodeproj */;
234
+			containerPortal = 8068EB7451414340B0AC0D03 /* ReactNativePermissions.xcodeproj */;
110 235
 			proxyType = 2;
111 236
 			remoteGlobalIDString = 9D23B34F1C767B80008B4819;
112 237
 			remoteInfo = ReactNativePermissions;
@@ -133,10 +258,13 @@
133 258
 		13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Example/Info.plist; sourceTree = "<group>"; };
134 259
 		13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Example/main.m; sourceTree = "<group>"; };
135 260
 		146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = "<group>"; };
136
-		783F116470084EEB95DCA092 /* ReactNativePermissions.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = ReactNativePermissions.xcodeproj; path = "../node_modules/react-native-permissions/ReactNativePermissions.xcodeproj"; sourceTree = "<group>"; };
261
+		2D02E47B1E0B4A5D006451C7 /* Example-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Example-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
262
+		2D02E4901E0B4A5D006451C7 /* Example-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Example-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
263
+		5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = "<group>"; };
137 264
 		78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; };
265
+		8068EB7451414340B0AC0D03 /* ReactNativePermissions.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = ReactNativePermissions.xcodeproj; path = "../node_modules/react-native-permissions/ReactNativePermissions.xcodeproj"; sourceTree = "<group>"; };
138 266
 		832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; };
139
-		D9820CCF930F4ED1BE137DA6 /* libReactNativePermissions.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libReactNativePermissions.a; sourceTree = "<group>"; };
267
+		B27CA08432F04FFCB0256EA1 /* libReactNativePermissions.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libReactNativePermissions.a; sourceTree = "<group>"; };
140 268
 /* End PBXFileReference section */
141 269
 
142 270
 /* Begin PBXFrameworksBuildPhase section */
@@ -153,6 +281,7 @@
153 281
 			buildActionMask = 2147483647;
154 282
 			files = (
155 283
 				146834051AC3E58100842450 /* libReact.a in Frameworks */,
284
+				5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */,
156 285
 				00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */,
157 286
 				00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */,
158 287
 				00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */,
@@ -162,7 +291,29 @@
162 291
 				832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */,
163 292
 				00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */,
164 293
 				139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */,
165
-				50F9604CB69B4BA6A44EA44F /* libReactNativePermissions.a in Frameworks */,
294
+				14902CDAB1064113A6B4C970 /* libReactNativePermissions.a in Frameworks */,
295
+			);
296
+			runOnlyForDeploymentPostprocessing = 0;
297
+		};
298
+		2D02E4781E0B4A5D006451C7 /* Frameworks */ = {
299
+			isa = PBXFrameworksBuildPhase;
300
+			buildActionMask = 2147483647;
301
+			files = (
302
+				2D02E4C91E0B4AEC006451C7 /* libReact.a in Frameworks */,
303
+				2D02E4C21E0B4AEC006451C7 /* libRCTAnimation-tvOS.a in Frameworks */,
304
+				2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */,
305
+				2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */,
306
+				2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */,
307
+				2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */,
308
+				2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */,
309
+				2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */,
310
+			);
311
+			runOnlyForDeploymentPostprocessing = 0;
312
+		};
313
+		2D02E48D1E0B4A5D006451C7 /* Frameworks */ = {
314
+			isa = PBXFrameworksBuildPhase;
315
+			buildActionMask = 2147483647;
316
+			files = (
166 317
 			);
167 318
 			runOnlyForDeploymentPostprocessing = 0;
168 319
 		};
@@ -189,6 +340,7 @@
189 340
 			isa = PBXGroup;
190 341
 			children = (
191 342
 				00C302C01ABCB91800DB3ED1 /* libRCTImage.a */,
343
+				3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */,
192 344
 			);
193 345
 			name = Products;
194 346
 			sourceTree = "<group>";
@@ -197,6 +349,7 @@
197 349
 			isa = PBXGroup;
198 350
 			children = (
199 351
 				00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */,
352
+				3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */,
200 353
 			);
201 354
 			name = Products;
202 355
 			sourceTree = "<group>";
@@ -230,6 +383,7 @@
230 383
 			isa = PBXGroup;
231 384
 			children = (
232 385
 				139105C11AF99BAD00B5F7CC /* libRCTSettings.a */,
386
+				3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */,
233 387
 			);
234 388
 			name = Products;
235 389
 			sourceTree = "<group>";
@@ -238,6 +392,7 @@
238 392
 			isa = PBXGroup;
239 393
 			children = (
240 394
 				139FDEF41B06529B00C62182 /* libRCTWebSocket.a */,
395
+				3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */,
241 396
 			);
242 397
 			name = Products;
243 398
 			sourceTree = "<group>";
@@ -260,6 +415,22 @@
260 415
 			isa = PBXGroup;
261 416
 			children = (
262 417
 				146834041AC3E56700842450 /* libReact.a */,
418
+				3DAD3EA31DF850E9000B6D8A /* libReact.a */,
419
+				3DAD3EA51DF850E9000B6D8A /* libyoga.a */,
420
+				3DAD3EA71DF850E9000B6D8A /* libyoga.a */,
421
+				3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */,
422
+				3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */,
423
+				3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */,
424
+				3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */,
425
+			);
426
+			name = Products;
427
+			sourceTree = "<group>";
428
+		};
429
+		5E91572E1DD0AC6500FF2AA8 /* Products */ = {
430
+			isa = PBXGroup;
431
+			children = (
432
+				5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */,
433
+				5E9157351DD0AC6500FF2AA8 /* libRCTAnimation-tvOS.a */,
263 434
 			);
264 435
 			name = Products;
265 436
 			sourceTree = "<group>";
@@ -268,6 +439,7 @@
268 439
 			isa = PBXGroup;
269 440
 			children = (
270 441
 				78C398B91ACF4ADC00677621 /* libRCTLinking.a */,
442
+				3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */,
271 443
 			);
272 444
 			name = Products;
273 445
 			sourceTree = "<group>";
@@ -275,6 +447,7 @@
275 447
 		832341AE1AAA6A7D00B99B32 /* Libraries */ = {
276 448
 			isa = PBXGroup;
277 449
 			children = (
450
+				5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */,
278 451
 				146833FF1AC3E56700842450 /* React.xcodeproj */,
279 452
 				00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */,
280 453
 				00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */,
@@ -285,7 +458,7 @@
285 458
 				832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */,
286 459
 				00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */,
287 460
 				139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */,
288
-				783F116470084EEB95DCA092 /* ReactNativePermissions.xcodeproj */,
461
+				8068EB7451414340B0AC0D03 /* ReactNativePermissions.xcodeproj */,
289 462
 			);
290 463
 			name = Libraries;
291 464
 			sourceTree = "<group>";
@@ -294,6 +467,7 @@
294 467
 			isa = PBXGroup;
295 468
 			children = (
296 469
 				832341B51AAA6A8300B99B32 /* libRCTText.a */,
470
+				3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */,
297 471
 			);
298 472
 			name = Products;
299 473
 			sourceTree = "<group>";
@@ -315,14 +489,16 @@
315 489
 			children = (
316 490
 				13B07F961A680F5B00A75B9A /* Example.app */,
317 491
 				00E356EE1AD99517003FC87E /* ExampleTests.xctest */,
492
+				2D02E47B1E0B4A5D006451C7 /* Example-tvOS.app */,
493
+				2D02E4901E0B4A5D006451C7 /* Example-tvOSTests.xctest */,
318 494
 			);
319 495
 			name = Products;
320 496
 			sourceTree = "<group>";
321 497
 		};
322
-		9D1B45BF1D49EE8300459C66 /* Products */ = {
498
+		9D8131A81E44834700F4B1D3 /* Products */ = {
323 499
 			isa = PBXGroup;
324 500
 			children = (
325
-				9D1B45CD1D49EE8400459C66 /* libReactNativePermissions.a */,
501
+				9D8131C51E44834800F4B1D3 /* libReactNativePermissions.a */,
326 502
 			);
327 503
 			name = Products;
328 504
 			sourceTree = "<group>";
@@ -366,6 +542,42 @@
366 542
 			productReference = 13B07F961A680F5B00A75B9A /* Example.app */;
367 543
 			productType = "com.apple.product-type.application";
368 544
 		};
545
+		2D02E47A1E0B4A5D006451C7 /* Example-tvOS */ = {
546
+			isa = PBXNativeTarget;
547
+			buildConfigurationList = 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "Example-tvOS" */;
548
+			buildPhases = (
549
+				2D02E4771E0B4A5D006451C7 /* Sources */,
550
+				2D02E4781E0B4A5D006451C7 /* Frameworks */,
551
+				2D02E4791E0B4A5D006451C7 /* Resources */,
552
+				2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */,
553
+			);
554
+			buildRules = (
555
+			);
556
+			dependencies = (
557
+			);
558
+			name = "Example-tvOS";
559
+			productName = "Example-tvOS";
560
+			productReference = 2D02E47B1E0B4A5D006451C7 /* Example-tvOS.app */;
561
+			productType = "com.apple.product-type.application";
562
+		};
563
+		2D02E48F1E0B4A5D006451C7 /* Example-tvOSTests */ = {
564
+			isa = PBXNativeTarget;
565
+			buildConfigurationList = 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "Example-tvOSTests" */;
566
+			buildPhases = (
567
+				2D02E48C1E0B4A5D006451C7 /* Sources */,
568
+				2D02E48D1E0B4A5D006451C7 /* Frameworks */,
569
+				2D02E48E1E0B4A5D006451C7 /* Resources */,
570
+			);
571
+			buildRules = (
572
+			);
573
+			dependencies = (
574
+				2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */,
575
+			);
576
+			name = "Example-tvOSTests";
577
+			productName = "Example-tvOSTests";
578
+			productReference = 2D02E4901E0B4A5D006451C7 /* Example-tvOSTests.xctest */;
579
+			productType = "com.apple.product-type.bundle.unit-test";
580
+		};
369 581
 /* End PBXNativeTarget section */
370 582
 
371 583
 /* Begin PBXProject section */
@@ -386,6 +598,15 @@
386 598
 							};
387 599
 						};
388 600
 					};
601
+					2D02E47A1E0B4A5D006451C7 = {
602
+						CreatedOnToolsVersion = 8.2.1;
603
+						ProvisioningStyle = Automatic;
604
+					};
605
+					2D02E48F1E0B4A5D006451C7 = {
606
+						CreatedOnToolsVersion = 8.2.1;
607
+						ProvisioningStyle = Automatic;
608
+						TestTargetID = 2D02E47A1E0B4A5D006451C7;
609
+					};
389 610
 				};
390 611
 			};
391 612
 			buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "Example" */;
@@ -404,6 +625,10 @@
404 625
 					ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */;
405 626
 					ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */;
406 627
 				},
628
+				{
629
+					ProductGroup = 5E91572E1DD0AC6500FF2AA8 /* Products */;
630
+					ProjectRef = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */;
631
+				},
407 632
 				{
408 633
 					ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */;
409 634
 					ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */;
@@ -441,14 +666,16 @@
441 666
 					ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */;
442 667
 				},
443 668
 				{
444
-					ProductGroup = 9D1B45BF1D49EE8300459C66 /* Products */;
445
-					ProjectRef = 783F116470084EEB95DCA092 /* ReactNativePermissions.xcodeproj */;
669
+					ProductGroup = 9D8131A81E44834700F4B1D3 /* Products */;
670
+					ProjectRef = 8068EB7451414340B0AC0D03 /* ReactNativePermissions.xcodeproj */;
446 671
 				},
447 672
 			);
448 673
 			projectRoot = "";
449 674
 			targets = (
450 675
 				13B07F861A680F5B00A75B9A /* Example */,
451 676
 				00E356ED1AD99517003FC87E /* ExampleTests */,
677
+				2D02E47A1E0B4A5D006451C7 /* Example-tvOS */,
678
+				2D02E48F1E0B4A5D006451C7 /* Example-tvOSTests */,
452 679
 			);
453 680
 		};
454 681
 /* End PBXProject section */
@@ -510,6 +737,111 @@
510 737
 			remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */;
511 738
 			sourceTree = BUILT_PRODUCTS_DIR;
512 739
 		};
740
+		3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */ = {
741
+			isa = PBXReferenceProxy;
742
+			fileType = archive.ar;
743
+			path = "libRCTImage-tvOS.a";
744
+			remoteRef = 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */;
745
+			sourceTree = BUILT_PRODUCTS_DIR;
746
+		};
747
+		3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */ = {
748
+			isa = PBXReferenceProxy;
749
+			fileType = archive.ar;
750
+			path = "libRCTLinking-tvOS.a";
751
+			remoteRef = 3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */;
752
+			sourceTree = BUILT_PRODUCTS_DIR;
753
+		};
754
+		3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */ = {
755
+			isa = PBXReferenceProxy;
756
+			fileType = archive.ar;
757
+			path = "libRCTNetwork-tvOS.a";
758
+			remoteRef = 3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */;
759
+			sourceTree = BUILT_PRODUCTS_DIR;
760
+		};
761
+		3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */ = {
762
+			isa = PBXReferenceProxy;
763
+			fileType = archive.ar;
764
+			path = "libRCTSettings-tvOS.a";
765
+			remoteRef = 3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */;
766
+			sourceTree = BUILT_PRODUCTS_DIR;
767
+		};
768
+		3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */ = {
769
+			isa = PBXReferenceProxy;
770
+			fileType = archive.ar;
771
+			path = "libRCTText-tvOS.a";
772
+			remoteRef = 3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */;
773
+			sourceTree = BUILT_PRODUCTS_DIR;
774
+		};
775
+		3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */ = {
776
+			isa = PBXReferenceProxy;
777
+			fileType = archive.ar;
778
+			path = "libRCTWebSocket-tvOS.a";
779
+			remoteRef = 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */;
780
+			sourceTree = BUILT_PRODUCTS_DIR;
781
+		};
782
+		3DAD3EA31DF850E9000B6D8A /* libReact.a */ = {
783
+			isa = PBXReferenceProxy;
784
+			fileType = archive.ar;
785
+			path = libReact.a;
786
+			remoteRef = 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */;
787
+			sourceTree = BUILT_PRODUCTS_DIR;
788
+		};
789
+		3DAD3EA51DF850E9000B6D8A /* libyoga.a */ = {
790
+			isa = PBXReferenceProxy;
791
+			fileType = archive.ar;
792
+			path = libyoga.a;
793
+			remoteRef = 3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */;
794
+			sourceTree = BUILT_PRODUCTS_DIR;
795
+		};
796
+		3DAD3EA71DF850E9000B6D8A /* libyoga.a */ = {
797
+			isa = PBXReferenceProxy;
798
+			fileType = archive.ar;
799
+			path = libyoga.a;
800
+			remoteRef = 3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */;
801
+			sourceTree = BUILT_PRODUCTS_DIR;
802
+		};
803
+		3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */ = {
804
+			isa = PBXReferenceProxy;
805
+			fileType = archive.ar;
806
+			path = libcxxreact.a;
807
+			remoteRef = 3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */;
808
+			sourceTree = BUILT_PRODUCTS_DIR;
809
+		};
810
+		3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */ = {
811
+			isa = PBXReferenceProxy;
812
+			fileType = archive.ar;
813
+			path = libcxxreact.a;
814
+			remoteRef = 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */;
815
+			sourceTree = BUILT_PRODUCTS_DIR;
816
+		};
817
+		3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */ = {
818
+			isa = PBXReferenceProxy;
819
+			fileType = archive.ar;
820
+			path = libjschelpers.a;
821
+			remoteRef = 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */;
822
+			sourceTree = BUILT_PRODUCTS_DIR;
823
+		};
824
+		3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */ = {
825
+			isa = PBXReferenceProxy;
826
+			fileType = archive.ar;
827
+			path = libjschelpers.a;
828
+			remoteRef = 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */;
829
+			sourceTree = BUILT_PRODUCTS_DIR;
830
+		};
831
+		5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */ = {
832
+			isa = PBXReferenceProxy;
833
+			fileType = archive.ar;
834
+			path = libRCTAnimation.a;
835
+			remoteRef = 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */;
836
+			sourceTree = BUILT_PRODUCTS_DIR;
837
+		};
838
+		5E9157351DD0AC6500FF2AA8 /* libRCTAnimation-tvOS.a */ = {
839
+			isa = PBXReferenceProxy;
840
+			fileType = archive.ar;
841
+			path = "libRCTAnimation-tvOS.a";
842
+			remoteRef = 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */;
843
+			sourceTree = BUILT_PRODUCTS_DIR;
844
+		};
513 845
 		78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = {
514 846
 			isa = PBXReferenceProxy;
515 847
 			fileType = archive.ar;
@@ -524,11 +856,11 @@
524 856
 			remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */;
525 857
 			sourceTree = BUILT_PRODUCTS_DIR;
526 858
 		};
527
-		9D1B45CD1D49EE8400459C66 /* libReactNativePermissions.a */ = {
859
+		9D8131C51E44834800F4B1D3 /* libReactNativePermissions.a */ = {
528 860
 			isa = PBXReferenceProxy;
529 861
 			fileType = archive.ar;
530 862
 			path = libReactNativePermissions.a;
531
-			remoteRef = 9D1B45CC1D49EE8400459C66 /* PBXContainerItemProxy */;
863
+			remoteRef = 9D8131C41E44834800F4B1D3 /* PBXContainerItemProxy */;
532 864
 			sourceTree = BUILT_PRODUCTS_DIR;
533 865
 		};
534 866
 /* End PBXReferenceProxy section */
@@ -550,6 +882,21 @@
550 882
 			);
551 883
 			runOnlyForDeploymentPostprocessing = 0;
552 884
 		};
885
+		2D02E4791E0B4A5D006451C7 /* Resources */ = {
886
+			isa = PBXResourcesBuildPhase;
887
+			buildActionMask = 2147483647;
888
+			files = (
889
+				2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */,
890
+			);
891
+			runOnlyForDeploymentPostprocessing = 0;
892
+		};
893
+		2D02E48E1E0B4A5D006451C7 /* Resources */ = {
894
+			isa = PBXResourcesBuildPhase;
895
+			buildActionMask = 2147483647;
896
+			files = (
897
+			);
898
+			runOnlyForDeploymentPostprocessing = 0;
899
+		};
553 900
 /* End PBXResourcesBuildPhase section */
554 901
 
555 902
 /* Begin PBXShellScriptBuildPhase section */
@@ -567,6 +914,20 @@
567 914
 			shellPath = /bin/sh;
568 915
 			shellScript = "export NODE_BINARY=node\n../node_modules/react-native/packager/react-native-xcode.sh";
569 916
 		};
917
+		2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = {
918
+			isa = PBXShellScriptBuildPhase;
919
+			buildActionMask = 2147483647;
920
+			files = (
921
+			);
922
+			inputPaths = (
923
+			);
924
+			name = "Bundle React Native Code And Images";
925
+			outputPaths = (
926
+			);
927
+			runOnlyForDeploymentPostprocessing = 0;
928
+			shellPath = /bin/sh;
929
+			shellScript = "export NODE_BINARY=node\n../node_modules/react-native/packager/react-native-xcode.sh";
930
+		};
570 931
 /* End PBXShellScriptBuildPhase section */
571 932
 
572 933
 /* Begin PBXSourcesBuildPhase section */
@@ -587,6 +948,23 @@
587 948
 			);
588 949
 			runOnlyForDeploymentPostprocessing = 0;
589 950
 		};
951
+		2D02E4771E0B4A5D006451C7 /* Sources */ = {
952
+			isa = PBXSourcesBuildPhase;
953
+			buildActionMask = 2147483647;
954
+			files = (
955
+				2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */,
956
+				2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */,
957
+			);
958
+			runOnlyForDeploymentPostprocessing = 0;
959
+		};
960
+		2D02E48C1E0B4A5D006451C7 /* Sources */ = {
961
+			isa = PBXSourcesBuildPhase;
962
+			buildActionMask = 2147483647;
963
+			files = (
964
+				2DCD954D1E0B4F2C00145EB5 /* ExampleTests.m in Sources */,
965
+			);
966
+			runOnlyForDeploymentPostprocessing = 0;
967
+		};
590 968
 /* End PBXSourcesBuildPhase section */
591 969
 
592 970
 /* Begin PBXTargetDependency section */
@@ -595,6 +973,11 @@
595 973
 			target = 13B07F861A680F5B00A75B9A /* Example */;
596 974
 			targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */;
597 975
 		};
976
+		2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */ = {
977
+			isa = PBXTargetDependency;
978
+			target = 2D02E47A1E0B4A5D006451C7 /* Example-tvOS */;
979
+			targetProxy = 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */;
980
+		};
598 981
 /* End PBXTargetDependency section */
599 982
 
600 983
 /* Begin PBXVariantGroup section */
@@ -619,12 +1002,16 @@
619 1002
 					"$(inherited)",
620 1003
 				);
621 1004
 				INFOPLIST_FILE = ExampleTests/Info.plist;
622
-				IPHONEOS_DEPLOYMENT_TARGET = 8.2;
1005
+				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
623 1006
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
624 1007
 				LIBRARY_SEARCH_PATHS = (
625 1008
 					"$(inherited)",
626 1009
 					"\"$(SRCROOT)/$(TARGET_NAME)\"",
627 1010
 				);
1011
+				OTHER_LDFLAGS = (
1012
+					"-ObjC",
1013
+					"-lc++",
1014
+				);
628 1015
 				PRODUCT_NAME = "$(TARGET_NAME)";
629 1016
 				TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example.app/Example";
630 1017
 			};
@@ -636,12 +1023,16 @@
636 1023
 				BUNDLE_LOADER = "$(TEST_HOST)";
637 1024
 				COPY_PHASE_STRIP = NO;
638 1025
 				INFOPLIST_FILE = ExampleTests/Info.plist;
639
-				IPHONEOS_DEPLOYMENT_TARGET = 8.2;
1026
+				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
640 1027
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
641 1028
 				LIBRARY_SEARCH_PATHS = (
642 1029
 					"$(inherited)",
643 1030
 					"\"$(SRCROOT)/$(TARGET_NAME)\"",
644 1031
 				);
1032
+				OTHER_LDFLAGS = (
1033
+					"-ObjC",
1034
+					"-lc++",
1035
+				);
645 1036
 				PRODUCT_NAME = "$(TARGET_NAME)";
646 1037
 				TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example.app/Example";
647 1038
 			};
@@ -651,15 +1042,9 @@
651 1042
 			isa = XCBuildConfiguration;
652 1043
 			buildSettings = {
653 1044
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
1045
+				CURRENT_PROJECT_VERSION = 1;
654 1046
 				DEAD_CODE_STRIPPING = NO;
655
-				HEADER_SEARCH_PATHS = (
656
-					"$(inherited)",
657
-					/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
658
-					"$(SRCROOT)/../node_modules/react-native/React/**",
659
-					"$(SRCROOT)/../node_modules/react-native-permissions/**",
660
-				);
661 1047
 				INFOPLIST_FILE = Example/Info.plist;
662
-				IPHONEOS_DEPLOYMENT_TARGET = 9.0;
663 1048
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
664 1049
 				OTHER_LDFLAGS = (
665 1050
 					"$(inherited)",
@@ -667,6 +1052,7 @@
667 1052
 					"-lc++",
668 1053
 				);
669 1054
 				PRODUCT_NAME = Example;
1055
+				VERSIONING_SYSTEM = "apple-generic";
670 1056
 			};
671 1057
 			name = Debug;
672 1058
 		};
@@ -674,14 +1060,8 @@
674 1060
 			isa = XCBuildConfiguration;
675 1061
 			buildSettings = {
676 1062
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
677
-				HEADER_SEARCH_PATHS = (
678
-					"$(inherited)",
679
-					/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
680
-					"$(SRCROOT)/../node_modules/react-native/React/**",
681
-					"$(SRCROOT)/../node_modules/react-native-permissions/**",
682
-				);
1063
+				CURRENT_PROJECT_VERSION = 1;
683 1064
 				INFOPLIST_FILE = Example/Info.plist;
684
-				IPHONEOS_DEPLOYMENT_TARGET = 9.0;
685 1065
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
686 1066
 				OTHER_LDFLAGS = (
687 1067
 					"$(inherited)",
@@ -689,6 +1069,117 @@
689 1069
 					"-lc++",
690 1070
 				);
691 1071
 				PRODUCT_NAME = Example;
1072
+				VERSIONING_SYSTEM = "apple-generic";
1073
+			};
1074
+			name = Release;
1075
+		};
1076
+		2D02E4971E0B4A5E006451C7 /* Debug */ = {
1077
+			isa = XCBuildConfiguration;
1078
+			buildSettings = {
1079
+				ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
1080
+				ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
1081
+				CLANG_ANALYZER_NONNULL = YES;
1082
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
1083
+				CLANG_WARN_INFINITE_RECURSION = YES;
1084
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
1085
+				DEBUG_INFORMATION_FORMAT = dwarf;
1086
+				ENABLE_TESTABILITY = YES;
1087
+				GCC_NO_COMMON_BLOCKS = YES;
1088
+				INFOPLIST_FILE = "Example-tvOS/Info.plist";
1089
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
1090
+				LIBRARY_SEARCH_PATHS = (
1091
+					"$(inherited)",
1092
+					"\"$(SRCROOT)/$(TARGET_NAME)\"",
1093
+				);
1094
+				OTHER_LDFLAGS = (
1095
+					"-ObjC",
1096
+					"-lc++",
1097
+				);
1098
+				PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.Example-tvOS";
1099
+				PRODUCT_NAME = "$(TARGET_NAME)";
1100
+				SDKROOT = appletvos;
1101
+				TARGETED_DEVICE_FAMILY = 3;
1102
+				TVOS_DEPLOYMENT_TARGET = 9.2;
1103
+			};
1104
+			name = Debug;
1105
+		};
1106
+		2D02E4981E0B4A5E006451C7 /* Release */ = {
1107
+			isa = XCBuildConfiguration;
1108
+			buildSettings = {
1109
+				ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
1110
+				ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
1111
+				CLANG_ANALYZER_NONNULL = YES;
1112
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
1113
+				CLANG_WARN_INFINITE_RECURSION = YES;
1114
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
1115
+				COPY_PHASE_STRIP = NO;
1116
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
1117
+				GCC_NO_COMMON_BLOCKS = YES;
1118
+				INFOPLIST_FILE = "Example-tvOS/Info.plist";
1119
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
1120
+				LIBRARY_SEARCH_PATHS = (
1121
+					"$(inherited)",
1122
+					"\"$(SRCROOT)/$(TARGET_NAME)\"",
1123
+				);
1124
+				OTHER_LDFLAGS = (
1125
+					"-ObjC",
1126
+					"-lc++",
1127
+				);
1128
+				PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.Example-tvOS";
1129
+				PRODUCT_NAME = "$(TARGET_NAME)";
1130
+				SDKROOT = appletvos;
1131
+				TARGETED_DEVICE_FAMILY = 3;
1132
+				TVOS_DEPLOYMENT_TARGET = 9.2;
1133
+			};
1134
+			name = Release;
1135
+		};
1136
+		2D02E4991E0B4A5E006451C7 /* Debug */ = {
1137
+			isa = XCBuildConfiguration;
1138
+			buildSettings = {
1139
+				BUNDLE_LOADER = "$(TEST_HOST)";
1140
+				CLANG_ANALYZER_NONNULL = YES;
1141
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
1142
+				CLANG_WARN_INFINITE_RECURSION = YES;
1143
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
1144
+				DEBUG_INFORMATION_FORMAT = dwarf;
1145
+				ENABLE_TESTABILITY = YES;
1146
+				GCC_NO_COMMON_BLOCKS = YES;
1147
+				INFOPLIST_FILE = "Example-tvOSTests/Info.plist";
1148
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1149
+				LIBRARY_SEARCH_PATHS = (
1150
+					"$(inherited)",
1151
+					"\"$(SRCROOT)/$(TARGET_NAME)\"",
1152
+				);
1153
+				PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.Example-tvOSTests";
1154
+				PRODUCT_NAME = "$(TARGET_NAME)";
1155
+				SDKROOT = appletvos;
1156
+				TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example-tvOS.app/Example-tvOS";
1157
+				TVOS_DEPLOYMENT_TARGET = 10.1;
1158
+			};
1159
+			name = Debug;
1160
+		};
1161
+		2D02E49A1E0B4A5E006451C7 /* Release */ = {
1162
+			isa = XCBuildConfiguration;
1163
+			buildSettings = {
1164
+				BUNDLE_LOADER = "$(TEST_HOST)";
1165
+				CLANG_ANALYZER_NONNULL = YES;
1166
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
1167
+				CLANG_WARN_INFINITE_RECURSION = YES;
1168
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
1169
+				COPY_PHASE_STRIP = NO;
1170
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
1171
+				GCC_NO_COMMON_BLOCKS = YES;
1172
+				INFOPLIST_FILE = "Example-tvOSTests/Info.plist";
1173
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1174
+				LIBRARY_SEARCH_PATHS = (
1175
+					"$(inherited)",
1176
+					"\"$(SRCROOT)/$(TARGET_NAME)\"",
1177
+				);
1178
+				PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.Example-tvOSTests";
1179
+				PRODUCT_NAME = "$(TARGET_NAME)";
1180
+				SDKROOT = appletvos;
1181
+				TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example-tvOS.app/Example-tvOS";
1182
+				TVOS_DEPLOYMENT_TARGET = 10.1;
692 1183
 			};
693 1184
 			name = Release;
694 1185
 		};
@@ -726,13 +1217,7 @@
726 1217
 				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
727 1218
 				GCC_WARN_UNUSED_FUNCTION = YES;
728 1219
 				GCC_WARN_UNUSED_VARIABLE = YES;
729
-				HEADER_SEARCH_PATHS = (
730
-					"$(inherited)",
731
-					/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
732
-					"$(SRCROOT)/../node_modules/react-native/React/**",
733
-					"$(SRCROOT)/../node_modules/react-native-permissions/**",
734
-				);
735
-				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
1220
+				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
736 1221
 				MTL_ENABLE_DEBUG_INFO = YES;
737 1222
 				ONLY_ACTIVE_ARCH = YES;
738 1223
 				SDKROOT = iphoneos;
@@ -767,13 +1252,7 @@
767 1252
 				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
768 1253
 				GCC_WARN_UNUSED_FUNCTION = YES;
769 1254
 				GCC_WARN_UNUSED_VARIABLE = YES;
770
-				HEADER_SEARCH_PATHS = (
771
-					"$(inherited)",
772
-					/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
773
-					"$(SRCROOT)/../node_modules/react-native/React/**",
774
-					"$(SRCROOT)/../node_modules/react-native-permissions/**",
775
-				);
776
-				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
1255
+				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
777 1256
 				MTL_ENABLE_DEBUG_INFO = NO;
778 1257
 				SDKROOT = iphoneos;
779 1258
 				VALIDATE_PRODUCT = YES;
@@ -801,6 +1280,24 @@
801 1280
 			defaultConfigurationIsVisible = 0;
802 1281
 			defaultConfigurationName = Release;
803 1282
 		};
1283
+		2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "Example-tvOS" */ = {
1284
+			isa = XCConfigurationList;
1285
+			buildConfigurations = (
1286
+				2D02E4971E0B4A5E006451C7 /* Debug */,
1287
+				2D02E4981E0B4A5E006451C7 /* Release */,
1288
+			);
1289
+			defaultConfigurationIsVisible = 0;
1290
+			defaultConfigurationName = Release;
1291
+		};
1292
+		2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "Example-tvOSTests" */ = {
1293
+			isa = XCConfigurationList;
1294
+			buildConfigurations = (
1295
+				2D02E4991E0B4A5E006451C7 /* Debug */,
1296
+				2D02E49A1E0B4A5E006451C7 /* Release */,
1297
+			);
1298
+			defaultConfigurationIsVisible = 0;
1299
+			defaultConfigurationName = Release;
1300
+		};
804 1301
 		83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "Example" */ = {
805 1302
 			isa = XCConfigurationList;
806 1303
 			buildConfigurations = (

+ 129
- 0
Example/ios/Example.xcodeproj/xcshareddata/xcschemes/Example-tvOS.xcscheme Näytä tiedosto

@@ -0,0 +1,129 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<Scheme
3
+   LastUpgradeVersion = "0820"
4
+   version = "1.3">
5
+   <BuildAction
6
+      parallelizeBuildables = "NO"
7
+      buildImplicitDependencies = "YES">
8
+      <BuildActionEntries>
9
+         <BuildActionEntry
10
+            buildForTesting = "YES"
11
+            buildForRunning = "YES"
12
+            buildForProfiling = "YES"
13
+            buildForArchiving = "YES"
14
+            buildForAnalyzing = "YES">
15
+            <BuildableReference
16
+               BuildableIdentifier = "primary"
17
+               BlueprintIdentifier = "2D2A28121D9B038B00D4039D"
18
+               BuildableName = "libReact.a"
19
+               BlueprintName = "React-tvOS"
20
+               ReferencedContainer = "container:../node_modules/react-native/React/React.xcodeproj">
21
+            </BuildableReference>
22
+         </BuildActionEntry>
23
+         <BuildActionEntry
24
+            buildForTesting = "YES"
25
+            buildForRunning = "YES"
26
+            buildForProfiling = "YES"
27
+            buildForArchiving = "YES"
28
+            buildForAnalyzing = "YES">
29
+            <BuildableReference
30
+               BuildableIdentifier = "primary"
31
+               BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
32
+               BuildableName = "Example-tvOS.app"
33
+               BlueprintName = "Example-tvOS"
34
+               ReferencedContainer = "container:Example.xcodeproj">
35
+            </BuildableReference>
36
+         </BuildActionEntry>
37
+         <BuildActionEntry
38
+            buildForTesting = "YES"
39
+            buildForRunning = "YES"
40
+            buildForProfiling = "NO"
41
+            buildForArchiving = "NO"
42
+            buildForAnalyzing = "YES">
43
+            <BuildableReference
44
+               BuildableIdentifier = "primary"
45
+               BlueprintIdentifier = "2D02E48F1E0B4A5D006451C7"
46
+               BuildableName = "Example-tvOSTests.xctest"
47
+               BlueprintName = "Example-tvOSTests"
48
+               ReferencedContainer = "container:Example.xcodeproj">
49
+            </BuildableReference>
50
+         </BuildActionEntry>
51
+      </BuildActionEntries>
52
+   </BuildAction>
53
+   <TestAction
54
+      buildConfiguration = "Debug"
55
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
56
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
57
+      shouldUseLaunchSchemeArgsEnv = "YES">
58
+      <Testables>
59
+         <TestableReference
60
+            skipped = "NO">
61
+            <BuildableReference
62
+               BuildableIdentifier = "primary"
63
+               BlueprintIdentifier = "2D02E48F1E0B4A5D006451C7"
64
+               BuildableName = "Example-tvOSTests.xctest"
65
+               BlueprintName = "Example-tvOSTests"
66
+               ReferencedContainer = "container:Example.xcodeproj">
67
+            </BuildableReference>
68
+         </TestableReference>
69
+      </Testables>
70
+      <MacroExpansion>
71
+         <BuildableReference
72
+            BuildableIdentifier = "primary"
73
+            BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
74
+            BuildableName = "Example-tvOS.app"
75
+            BlueprintName = "Example-tvOS"
76
+            ReferencedContainer = "container:Example.xcodeproj">
77
+         </BuildableReference>
78
+      </MacroExpansion>
79
+      <AdditionalOptions>
80
+      </AdditionalOptions>
81
+   </TestAction>
82
+   <LaunchAction
83
+      buildConfiguration = "Debug"
84
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
85
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
86
+      launchStyle = "0"
87
+      useCustomWorkingDirectory = "NO"
88
+      ignoresPersistentStateOnLaunch = "NO"
89
+      debugDocumentVersioning = "YES"
90
+      debugServiceExtension = "internal"
91
+      allowLocationSimulation = "YES">
92
+      <BuildableProductRunnable
93
+         runnableDebuggingMode = "0">
94
+         <BuildableReference
95
+            BuildableIdentifier = "primary"
96
+            BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
97
+            BuildableName = "Example-tvOS.app"
98
+            BlueprintName = "Example-tvOS"
99
+            ReferencedContainer = "container:Example.xcodeproj">
100
+         </BuildableReference>
101
+      </BuildableProductRunnable>
102
+      <AdditionalOptions>
103
+      </AdditionalOptions>
104
+   </LaunchAction>
105
+   <ProfileAction
106
+      buildConfiguration = "Release"
107
+      shouldUseLaunchSchemeArgsEnv = "YES"
108
+      savedToolIdentifier = ""
109
+      useCustomWorkingDirectory = "NO"
110
+      debugDocumentVersioning = "YES">
111
+      <BuildableProductRunnable
112
+         runnableDebuggingMode = "0">
113
+         <BuildableReference
114
+            BuildableIdentifier = "primary"
115
+            BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
116
+            BuildableName = "Example-tvOS.app"
117
+            BlueprintName = "Example-tvOS"
118
+            ReferencedContainer = "container:Example.xcodeproj">
119
+         </BuildableReference>
120
+      </BuildableProductRunnable>
121
+   </ProfileAction>
122
+   <AnalyzeAction
123
+      buildConfiguration = "Debug">
124
+   </AnalyzeAction>
125
+   <ArchiveAction
126
+      buildConfiguration = "Release"
127
+      revealArchiveInOrganizer = "YES">
128
+   </ArchiveAction>
129
+</Scheme>

+ 15
- 1
Example/ios/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme Näytä tiedosto

@@ -3,9 +3,23 @@
3 3
    LastUpgradeVersion = "0820"
4 4
    version = "1.3">
5 5
    <BuildAction
6
-      parallelizeBuildables = "YES"
6
+      parallelizeBuildables = "NO"
7 7
       buildImplicitDependencies = "YES">
8 8
       <BuildActionEntries>
9
+         <BuildActionEntry
10
+            buildForTesting = "YES"
11
+            buildForRunning = "YES"
12
+            buildForProfiling = "YES"
13
+            buildForArchiving = "YES"
14
+            buildForAnalyzing = "YES">
15
+            <BuildableReference
16
+               BuildableIdentifier = "primary"
17
+               BlueprintIdentifier = "83CBBA2D1A601D0E00E9B192"
18
+               BuildableName = "libReact.a"
19
+               BlueprintName = "React"
20
+               ReferencedContainer = "container:../node_modules/react-native/React/React.xcodeproj">
21
+            </BuildableReference>
22
+         </BuildActionEntry>
9 23
          <BuildActionEntry
10 24
             buildForTesting = "YES"
11 25
             buildForRunning = "YES"

+ 2
- 2
Example/ios/Example/AppDelegate.m Näytä tiedosto

@@ -9,8 +9,8 @@
9 9
 
10 10
 #import "AppDelegate.h"
11 11
 
12
-#import "RCTBundleURLProvider.h"
13
-#import "RCTRootView.h"
12
+#import <React/RCTBundleURLProvider.h>
13
+#import <React/RCTRootView.h>
14 14
 
15 15
 @implementation AppDelegate
16 16
 

+ 20
- 4
Example/ios/Example/Info.plist Näytä tiedosto

@@ -8,8 +8,6 @@
8 8
 	<string>$(EXECUTABLE_NAME)</string>
9 9
 	<key>CFBundleIdentifier</key>
10 10
 	<string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string>
11
-	<key>CFBundleInfoDictionaryVersion</key>
12
-	<string>6.0</string>
13 11
 	<key>CFBundleName</key>
14 12
 	<string>$(PRODUCT_NAME)</string>
15 13
 	<key>CFBundlePackageType</key>
@@ -28,13 +26,31 @@
28 26
 		<dict>
29 27
 			<key>localhost</key>
30 28
 			<dict>
31
-				<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
29
+				<key>NSExceptionAllowsInsecureHTTPLoads</key>
32 30
 				<true/>
33 31
 			</dict>
34 32
 		</dict>
35 33
 	</dict>
34
+	<key>NSAppleMusicUsageDescription</key>
35
+	<string>test</string>
36
+	<key>NSBluetoothPeripheralUsageDescription</key>
37
+	<string>test</string>
38
+	<key>NSCalendarsUsageDescription</key>
39
+	<string>test</string>
40
+	<key>NSCameraUsageDescription</key>
41
+	<string>test</string>
42
+	<key>NSContactsUsageDescription</key>
43
+	<string>test</string>
44
+	<key>NSLocationAlwaysUsageDescription</key>
45
+	<string>test</string>
36 46
 	<key>NSLocationWhenInUseUsageDescription</key>
37
-	<string>We need your location</string>
47
+	<string>test</string>
48
+	<key>NSMicrophoneUsageDescription</key>
49
+	<string>6.0</string>
50
+	<key>NSPhotoLibraryUsageDescription</key>
51
+	<string>test</string>
52
+	<key>NSRemindersUsageDescription</key>
53
+	<string>test</string>
38 54
 	<key>UIBackgroundModes</key>
39 55
 	<array>
40 56
 		<string>bluetooth-peripheral</string>

+ 1
- 1
Example/ios/Example/main.m Näytä tiedosto

@@ -1,4 +1,4 @@
1
-  /**
1
+/**
2 2
  * Copyright (c) 2015-present, Facebook, Inc.
3 3
  * All rights reserved.
4 4
  *

+ 2
- 2
Example/ios/ExampleTests/ExampleTests.m Näytä tiedosto

@@ -10,8 +10,8 @@
10 10
 #import <UIKit/UIKit.h>
11 11
 #import <XCTest/XCTest.h>
12 12
 
13
-#import "RCTLog.h"
14
-#import "RCTRootView.h"
13
+#import <React/RCTLog.h>
14
+#import <React/RCTRootView.h>
15 15
 
16 16
 #define TIMEOUT_SECONDS 600
17 17
 #define TEXT_TO_LOOK_FOR @"Welcome to React Native!"

+ 21
- 11
Example/package.json Näytä tiedosto

@@ -1,13 +1,23 @@
1 1
 {
2
-  "name": "Example",
3
-  "version": "0.0.1",
4
-  "private": true,
5
-  "scripts": {
6
-    "start": "react-native start"
7
-  },
8
-  "dependencies": {
9
-    "react": "15.2.1",
10
-    "react-native": "^0.30.0",
2
+	"name": "Example",
3
+	"version": "0.0.1",
4
+	"private": true,
5
+	"scripts": {
6
+		"start": "react-native start",
7
+		"test": "jest"
8
+	},
9
+	"dependencies": {
10
+		"react": "15.4.2",
11
+		"react-native": "^0.41.0",
11 12
     "react-native-permissions": "../"
12
-  }
13
-}
13
+	},
14
+	"devDependencies": {
15
+		"babel-jest": "18.0.0",
16
+		"babel-preset-react-native": "1.9.1",
17
+		"jest": "18.1.0",
18
+		"react-test-renderer": "15.4.2"
19
+	},
20
+	"jest": {
21
+		"preset": "react-native"
22
+	}
23
+}

+ 1
- 1
RCTConvert+RNPStatus.h Näytä tiedosto

@@ -6,7 +6,7 @@
6 6
 //  Copyright © 2016 Yonah Forst. All rights reserved.
7 7
 //
8 8
 
9
-#import "RCTConvert.h"
9
+#import <React/RCTConvert.h>
10 10
 
11 11
 static NSString* RNPStatusUndetermined = @"undetermined";
12 12
 static NSString* RNPStatusDenied = @"denied";

+ 23
- 8
README.md Näytä tiedosto

@@ -15,9 +15,11 @@ The current supported permissions are:
15 15
 - Speech Recognition *(iOS only)*
16 16
 
17 17
 
18
-###New in version 0.2.X
19
-- Android support 🎉🎉🍾
20
-- Example app
18
+| Version | React Native Support |
19
+|---|---|
20
+| 0.2.7 | 0.40.0 - 0.41.0 |
21
+| 0.2.5 | 0.33.0 - 0.39.0 |
22
+*Complies with [react-native-version-support-table](https://github.com/dangnelson/react-native-version-support-table)*
21 23
 
22 24
 ##General Usage
23 25
 ```
@@ -52,7 +54,7 @@ const Permissions = require('react-native-permissions');
52 54
 
53 55
   //check the status of multiple permissions
54 56
   _checkCameraAndPhotos() {
55
-    Permissions.checkMultiplePermissions(['camera', 'photo', 'speechRecognition'])
57
+    Permissions.checkMultiplePermissions(['camera', 'photo'])
56 58
       .then(response => {
57 59
         //response is an object mapping type to permission
58 60
         this.setState({
@@ -110,11 +112,12 @@ Promises resolve into one of these statuses
110 112
 |`notification`| ✔️ | ❌ |
111 113
 |`backgroundRefresh`| ✔️ | ❌ |
112 114
 |`speechRecognition`| ✔️ | ❌ |
115
+|`storage`| ❌️ | ✔ |
113 116
 
114 117
 ###Methods
115 118
 | Method Name | Arguments | Notes
116 119
 |---|---|---|
117
-| `getPermissionStatus` | `type` | - Returns a promise with the permission status. Note: for type `location`, iOS `AuthorizedAlways` and `AuthorizedWhenInUse` both return `authorized` |
120
+| `getPermissionStatus` | `type` | - Returns a promise with the permission status. See iOS Notes for special cases |
118 121
 | `requestPermission` | `type` | - Accepts any permission type except `backgroundRefresh`. If the current status is `undetermined`, shows the permission dialog and returns a promise with the resulting status. Otherwise, immediately return a promise with the current status. See iOS Notes for special cases|
119 122
 | `checkMultiplePermissions` | `[types]` | - Accepts an array of permission types and returns a promise with an object mapping permission types to statuses |
120 123
 | `getPermissionTypes` | *none* | - Returns an array of valid permission types  |
@@ -124,11 +127,17 @@ Promises resolve into one of these statuses
124 127
 ###iOS Notes
125 128
 Permission type `bluetooth` represents the status of the `CBPeripheralManager`. Don't use this if only need `CBCentralManager`
126 129
 
127
-`requestPermission` also accepts a second parameter for types `location` and `notification`.
128
-- `location`: the second parameter is a string, either `always` or `whenInUse`(default).
129
-- `notification`: the second parameter is an array with the desired alert types. Any combination of `alert`, `badge` and `sound` (default requests all three)
130
+Permission type `location` accepts a second parameter for `requestPermission` and `getPermissionStatus`;  the second parameter is a string, either `always` or `whenInUse`(default).
131
+
132
+Permission type `notification` accepts a second parameter for `requestPermission`. The second parameter is an array with the desired alert types. Any combination of `alert`, `badge` and `sound` (default requests all three)
133
+
130 134
 ```js
131 135
 ///example
136
+    Permissions.getPermissionStatus('location', 'always')
137
+      .then(response => {
138
+        this.setState({ locationPermission: response })
139
+      })
140
+
132 141
     Permissions.requestPermission('location', 'always')
133 142
       .then(response => {
134 143
         this.setState({ locationPermission: response })
@@ -140,6 +149,8 @@ Permission type `bluetooth` represents the status of the `CBPeripheralManager`.
140 149
       })
141 150
 ```
142 151
 
152
+You cannot request microphone permissions on the simulator.
153
+
143 154
 With Xcode 8, you now need to add usage descriptions for each permission you will request. Open Xcode > Info.plist > Add a key (starting with "Privacy - ...") with your kit specific permission.
144 155
 
145 156
 Example:
@@ -162,6 +173,7 @@ Here's a map of types to Android system permissions names:
162 173
 `contacts` -> `android.permission.READ_CONTACTS`
163 174
 `event` -> `android.permission.READ_CALENDAR`
164 175
 
176
+
165 177
 You can request write access to any of these types by also including the appropriate write permission in the Manifest. Read more here: https://developer.android.com/guide/topics/security/permissions.html#normal-dangerous
166 178
 
167 179
 ##Setup
@@ -227,3 +239,6 @@ A: `rnpm` may not have linked correctly. Follow the manual linking steps and mak
227 239
 
228 240
 #### Q: iOS - app crashes as soon as I request permission
229 241
 A: starting with xcode 8, you need to add permission descriptions. see iOS notes for more details. Thanks to @jesperlndk for discovering this.
242
+
243
+#### Q: iOS - app crashes when I change permissions from settings
244
+A: This is normal. iOS restarts your app when your privacy settings change. Just google "ios crash permission change"

+ 1
- 1
ReactNativePermissions.h Näytä tiedosto

@@ -5,7 +5,7 @@
5 5
 //  Created by Yonah Forst on 18/02/16.
6 6
 //  Copyright © 2016 Yonah Forst. All rights reserved.
7 7
 //
8
-#import "RCTBridgeModule.h"
8
+#import <React/RCTBridgeModule.h>
9 9
 
10 10
 #import <Foundation/Foundation.h>
11 11
 

+ 5
- 4
ReactNativePermissions.js Näytä tiedosto

@@ -25,6 +25,7 @@ const RNPTypes = {
25 25
 		'contacts',
26 26
 		'event',
27 27
 		'photo',
28
+		'storage'
28 29
 	]
29 30
 }
30 31
 
@@ -58,9 +59,9 @@ class ReactNativePermissions {
58 59
 	}
59 60
 
60 61
 
61
-	getPermissionStatus(permission) {
62
+	getPermissionStatus(permission, type) {
62 63
   	if (this.getPermissionTypes().indexOf(permission) >= 0) {
63
-			return RNPermissions.getPermissionStatus(permission)
64
+			return RNPermissions.getPermissionStatus(permission, type)
64 65
 		} else {
65 66
 			return Promise.reject(`ReactNativePermissions: ${permission} is not a valid permission type on ${Platform.OS}`)
66 67
 		}
@@ -68,7 +69,7 @@ class ReactNativePermissions {
68 69
 
69 70
 	requestPermission(permission, type) {
70 71
 		let options;
71
-		
72
+
72 73
 		if (this.getPermissionTypes().indexOf(permission) === -1) {
73 74
 			return Promise.reject(`ReactNativePermissions: ${permission} is not a valid permission type on ${Platform.OS}`)
74 75
 		} else if (permission == 'backgroundRefresh'){
@@ -90,7 +91,7 @@ class ReactNativePermissions {
90 91
 		function processNext() {
91 92
 			i--
92 93
 			let p = permissions[i]
93
-			
94
+
94 95
 			if (!p) {
95 96
 				return Promise.resolve(obj)
96 97
 			}

+ 8
- 7
ReactNativePermissions.m Näytä tiedosto

@@ -10,9 +10,9 @@
10 10
 
11 11
 #import "ReactNativePermissions.h"
12 12
 
13
-#import "RCTBridge.h"
14
-#import "RCTConvert.h"
15
-#import "RCTEventDispatcher.h"
13
+#import <React/RCTBridge.h>
14
+#import <React/RCTConvert.h>
15
+#import <React/RCTEventDispatcher.h>
16 16
 
17 17
 #import "RNPLocation.h"
18 18
 #import "RNPBluetooth.h"
@@ -67,15 +67,17 @@ RCT_EXPORT_METHOD(openSettings)
67 67
     }
68 68
 }
69 69
 
70
-RCT_REMAP_METHOD(getPermissionStatus, getPermissionStatus:(RNPType)type resolve:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
70
+RCT_REMAP_METHOD(getPermissionStatus, getPermissionStatus:(RNPType)type json:(id)json resolve:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
71 71
 {
72 72
     NSString *status;
73 73
     
74 74
     switch (type) {
75 75
             
76
-        case RNPTypeLocation:
77
-            status = [RNPLocation getStatus];
76
+        case RNPTypeLocation: {
77
+            NSString *locationPermissionType = [RCTConvert NSString:json];
78
+            status = [RNPLocation getStatusForType:locationPermissionType];
78 79
             break;
80
+        }
79 81
         case RNPTypeCamera:
80 82
             status = [RNPAudioVideo getStatus:@"video"];
81 83
             break;
@@ -145,7 +147,6 @@ RCT_REMAP_METHOD(requestPermission, permissionType:(RNPType)type json:(id)json r
145 147
 
146 148
 }
147 149
 
148
-
149 150
 - (void) requestLocation:(id)json resolve:(RCTPromiseResolveBlock)resolve
150 151
 {
151 152
     if (self.locationMgr == nil) {

+ 6
- 3
android/src/main/java/com/joshblour/reactnativepermissions/ReactNativePermissionsModule.java Näytä tiedosto

@@ -30,6 +30,7 @@ public class ReactNativePermissionsModule extends ReactContextBaseJavaModule {
30 30
     MICROPHONE,
31 31
     CONTACTS,
32 32
     EVENT,
33
+    STORAGE,
33 34
     PHOTO;
34 35
   }
35 36
 
@@ -45,7 +46,7 @@ public class ReactNativePermissionsModule extends ReactContextBaseJavaModule {
45 46
   }
46 47
 
47 48
   @ReactMethod
48
-  public void getPermissionStatus(String permissionString, Promise promise) {
49
+  public void getPermissionStatus(String permissionString, String nullForiOSCompat, Promise promise) {
49 50
     String permission = permissionForString(permissionString);
50 51
 
51 52
     // check if permission is valid
@@ -84,7 +85,7 @@ public class ReactNativePermissionsModule extends ReactContextBaseJavaModule {
84 85
     Callback resolve = new Callback() {
85 86
       @Override
86 87
       public void invoke(Object... args) {
87
-        getPermissionStatus(permissionString, promise);
88
+        getPermissionStatus(permissionString, "", promise);
88 89
       }
89 90
     };
90 91
     Callback reject = new Callback() {
@@ -93,7 +94,8 @@ public class ReactNativePermissionsModule extends ReactContextBaseJavaModule {
93 94
         // NOOP
94 95
       }
95 96
     };
96
-    mPermissionsModule.requestPermission(permission, resolve, reject);
97
+
98
+    mPermissionsModule.requestPermission(permission, new PromiseImpl(resolve, reject));
97 99
   }
98 100
 
99 101
 
@@ -126,6 +128,7 @@ public class ReactNativePermissionsModule extends ReactContextBaseJavaModule {
126 128
         return Manifest.permission.READ_CONTACTS;
127 129
       case EVENT:
128 130
         return Manifest.permission.READ_CALENDAR;
131
+      case STORAGE:
129 132
       case PHOTO:
130 133
         return Manifest.permission.READ_EXTERNAL_STORAGE;
131 134
       default:

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

@@ -1,6 +1,6 @@
1 1
 {
2 2
   "name": "react-native-permissions",
3
-  "version": "0.2.4",
3
+  "version": "0.2.7",
4 4
   "repository": {
5 5
     "type": "git",
6 6
     "url": "https://github.com/joshblour/react-native-permissions.git"

+ 1
- 1
permissions/RNPLocation.h Näytä tiedosto

@@ -11,7 +11,7 @@
11 11
 
12 12
 @interface RNPLocation : NSObject
13 13
 
14
-+ (NSString *)getStatus;
14
++ (NSString *)getStatusForType:(NSString *)type;
15 15
 - (void)request:(NSString *)type completionHandler:(void (^)(NSString *))completionHandler;
16 16
 
17 17
 @end

+ 14
- 9
permissions/RNPLocation.m Näytä tiedosto

@@ -17,13 +17,14 @@
17 17
 
18 18
 @implementation RNPLocation
19 19
 
20
-+ (NSString *)getStatus
20
++ (NSString *)getStatusForType:(NSString *)type
21 21
 {
22 22
     int status = [CLLocationManager authorizationStatus];
23 23
     switch (status) {
24 24
         case kCLAuthorizationStatusAuthorizedAlways:
25
-        case kCLAuthorizationStatusAuthorizedWhenInUse:
26 25
             return RNPStatusAuthorized;
26
+        case kCLAuthorizationStatusAuthorizedWhenInUse:
27
+            return [type isEqualToString:@"always"] ? RNPStatusDenied : RNPStatusAuthorized;
27 28
         case kCLAuthorizationStatusDenied:
28 29
             return RNPStatusDenied;
29 30
         case kCLAuthorizationStatusRestricted:
@@ -35,22 +36,26 @@
35 36
 
36 37
 - (void)request:(NSString*)type completionHandler:(void (^)(NSString *))completionHandler
37 38
 {
38
-    NSString *status = [RNPLocation getStatus];
39
+    NSString *status = [RNPLocation getStatusForType:nil];
39 40
     if (status == RNPStatusUndetermined) {
40 41
         self.completionHandler = completionHandler;
41
-        
42
+
42 43
         if (self.locationManager == nil) {
43 44
             self.locationManager = [[CLLocationManager alloc] init];
44 45
             self.locationManager.delegate = self;
45 46
         }
46
-        
47
+
47 48
         if ([type isEqualToString:@"always"]) {
48 49
             [self.locationManager requestAlwaysAuthorization];
49 50
         } else {
50 51
             [self.locationManager requestWhenInUseAuthorization];
51 52
         }
52 53
     } else {
53
-        completionHandler(status);
54
+        if ([CLLocationManager authorizationStatus] == kCLAuthorizationStatusAuthorizedWhenInUse && [type isEqualToString:@"always"]) {
55
+            completionHandler(RNPStatusDenied);
56
+        } else {
57
+            completionHandler(status);
58
+        }
54 59
     }
55 60
 }
56 61
 
@@ -60,14 +65,14 @@
60 65
             self.locationManager.delegate = nil;
61 66
             self.locationManager = nil;
62 67
         }
63
-        
68
+
64 69
         if (self.completionHandler) {
65 70
             //for some reason, checking permission right away returns denied. need to wait a tiny bit
66 71
             dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.1 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
67
-                self.completionHandler([RNPLocation getStatus]);
72
+                self.completionHandler([RNPLocation getStatusForType:nil]);
68 73
                 self.completionHandler = nil;
69 74
             });
70
-        }        
75
+        }
71 76
     }
72 77
 }
73 78
 @end

+ 12
- 31
permissions/RNPNotification.m Näytä tiedosto

@@ -19,35 +19,21 @@ static NSString* RNPDidAskForNotification = @"RNPDidAskForNotification";
19 19
 + (NSString *)getStatus
20 20
 {
21 21
     BOOL didAskForPermission = [[NSUserDefaults standardUserDefaults] boolForKey:RNPDidAskForNotification];
22
+    BOOL isRegistered = [[UIApplication sharedApplication] isRegisteredForRemoteNotifications];
23
+    BOOL isEnabled = [[[UIApplication sharedApplication] currentUserNotificationSettings] types] != UIUserNotificationTypeNone;
22 24
     
23
-    if (didAskForPermission) {
24
-        if ([[UIApplication sharedApplication] respondsToSelector:@selector(isRegisteredForRemoteNotifications)]) {
25
-            // iOS8+
26
-            BOOL isRegistered = [[UIApplication sharedApplication] isRegisteredForRemoteNotifications];
27
-            BOOL isEnabled = [[[UIApplication sharedApplication] currentUserNotificationSettings] types] != UIUserNotificationTypeNone;
28
-            if (isRegistered || isEnabled) {
29
-                return isEnabled ? RNPStatusAuthorized : RNPStatusDenied;
30
-            }
31
-            else {
32
-                return RNPStatusDenied;
33
-            }
34
-        } else {
35
-            if ([[UIApplication sharedApplication] enabledRemoteNotificationTypes] == UIRemoteNotificationTypeNone) {
36
-                return RNPStatusDenied;
37
-            }
38
-            else {
39
-                return RNPStatusAuthorized;
40
-            }
41
-        }
25
+    if (isRegistered || isEnabled) {
26
+        return isEnabled ? RNPStatusAuthorized : RNPStatusDenied;
42 27
     } else {
43
-        return RNPStatusUndetermined;
28
+        return didAskForPermission ? RNPStatusDenied : RNPStatusUndetermined;
44 29
     }
45 30
 }
46 31
 
47 32
 - (void)request:(UIUserNotificationType)types completionHandler:(void (^)(NSString*))completionHandler
48 33
 {
49
-    BOOL didAskForPermission = [[NSUserDefaults standardUserDefaults] boolForKey:RNPDidAskForNotification];
50
-    if (!didAskForPermission) {
34
+    NSString *status = [self.class getStatus];
35
+    
36
+    if (status == RNPStatusUndetermined) {
51 37
         self.completionHandler = completionHandler;
52 38
         
53 39
         [[NSNotificationCenter defaultCenter] addObserver:self
@@ -55,19 +41,14 @@ static NSString* RNPDidAskForNotification = @"RNPDidAskForNotification";
55 41
                                                      name:UIApplicationDidBecomeActiveNotification
56 42
                                                    object:nil];
57 43
         
58
-        if ([[UIApplication sharedApplication] respondsToSelector:@selector(isRegisteredForRemoteNotifications)]) {
59
-            // iOS8+
60
-            UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:types categories:nil];
61
-            [[UIApplication sharedApplication] registerUserNotificationSettings:settings];
62
-            [[UIApplication sharedApplication] registerForRemoteNotifications];
63
-        } else {
64
-            [[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationType)types];
65
-        }
44
+        UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:types categories:nil];
45
+        [[UIApplication sharedApplication] registerUserNotificationSettings:settings];
46
+        [[UIApplication sharedApplication] registerForRemoteNotifications];
66 47
         
67 48
         [[NSUserDefaults standardUserDefaults] setBool:YES forKey:RNPDidAskForNotification];
68 49
         [[NSUserDefaults standardUserDefaults] synchronize];
69 50
     } else {
70
-        completionHandler([self.class getStatus]);
51
+        completionHandler(status);
71 52
     }
72 53
 }
73 54