Browse Source

add animation; update example rn version to 0.43.4;

iou90 7 years ago
parent
commit
e3401d6a7b

+ 4
- 1
README.md View File

@@ -8,12 +8,15 @@ An auto height webview for React Native.
8 8
 
9 9
 ## showcase
10 10
 ![react-native-autoheight-webview](https://media.giphy.com/media/xUA7bj3KScXHeom1I4/giphy.gif) 
11
-![react-native-autoheight-webview](https://media.giphy.com/media/xUA7b4xTJ4FYX3RuZq/giphy.gif)
11
+![react-native-autoheight-webview](https://media.giphy.com/media/l0Iyaze16ATSDIZoI/giphy.gif)
12 12
 
13 13
 # usage
14 14
 
15 15
 ```javascript
16 16
 <AutoHeightWebView
17
+    enableAnimation={true},
18
+    // only works on enable animation
19
+    animationDuration={255},
17 20
     onHeightUpdated={height => console.log(height)}
18 21
     // or uri
19 22
     source={{ html: `<p style="font-weight: 400;font-style: normal;font-size: 21px;line-height: 1.58;letter-spacing: -.003em;">Tags are great for describing the essence of your story in a single word or phrase, but stories are rarely about a single thing. <span style="background-color: transparent !important;background-image: linear-gradient(to bottom, rgba(146, 249, 190, 1), rgba(146, 249, 190, 1));">If I pen a story about moving across the country to start a new job in a car with my husband, two cats, a dog, and a tarantula, I wouldn’t only tag the piece with “moving”. I’d also use the tags “pets”, “marriage”, “career change”, and “travel tips”.</span></p>` }}

+ 43
- 17
autoHeightWebView/index.android.js View File

@@ -8,6 +8,7 @@ import React, {
8 8
 import {
9 9
     findNodeHandle,
10 10
     requireNativeComponent,
11
+    Animated,
11 12
     DeviceEventEmitter,
12 13
     Dimensions,
13 14
     Platform,
@@ -26,6 +27,9 @@ export default class AutoHeightWebView extends ImmutableComponent {
26 27
     constructor(props) {
27 28
         super(props);
28 29
         this.onMessage = this.onMessage.bind(this);
30
+        if (this.props.enableAnimation) {
31
+            this.opacityAnimatedValue = new Animated.Value(0);
32
+        }
29 33
         if (IsBelowKitKat) {
30 34
             this.listenWebViewBridgeMessage = this.listenWebViewBridgeMessage.bind(this);
31 35
         }
@@ -58,6 +62,9 @@ export default class AutoHeightWebView extends ImmutableComponent {
58 62
                 isChangingSource: true,
59 63
                 height: 0,
60 64
                 heightOffset: 0
65
+            }, () => {
66
+                this.startInterval();
67
+                this.setState({ isChangingSource: false });
61 68
             });
62 69
         }
63 70
         let currentScript = BaseScript;
@@ -67,13 +74,13 @@ export default class AutoHeightWebView extends ImmutableComponent {
67 74
         this.setState({ script: currentScript });
68 75
     }
69 76
 
70
-    componentDidUpdate(prevProps, prevState) {
71
-        // redisplay webview when changing source
72
-        if (this.state.isChangingSource) {
73
-            this.startInterval();
74
-            this.setState({ isChangingSource: false });
75
-        }
76
-    }
77
+    // componentDidUpdate(prevProps, prevState) {
78
+    //     // redisplay webview when changing source
79
+    //     if (this.state.isChangingSource) {
80
+    //         this.startInterval();
81
+    //         this.setState({ isChangingSource: false });
82
+    //     }
83
+    // }
77 84
 
78 85
     componentWillUnmount() {
79 86
         this.stopInterval();
@@ -118,17 +125,33 @@ export default class AutoHeightWebView extends ImmutableComponent {
118 125
         clearInterval(this.interval);
119 126
     }
120 127
 
128
+    onHeightUpdated(height) {
129
+        if (this.props.onHeightUpdated) {
130
+            this.props.onHeightUpdated(height);
131
+        }
132
+    }
133
+
121 134
     onMessage(e) {
122 135
         const height = parseInt(IsBelowKitKat ? e.nativeEvent.message : e.nativeEvent.data);
123 136
         if (height) {
137
+            if (this.props.enableAnimation) {
138
+                this.opacityAnimatedValue.setValue(0);
139
+            }
124 140
             this.stopInterval();
125 141
             this.setState({
126 142
                 heightOffset: this.props.heightOffset,
127 143
                 height
144
+            }, () => {
145
+                if (this.props.enableAnimation) {
146
+                    Animated.timing(this.opacityAnimatedValue, {
147
+                        toValue: 1,
148
+                        duration: this.props.animationDuration
149
+                    }).start(() => this.onHeightUpdated(height));
150
+                }
151
+                else {
152
+                    this.onHeightUpdated(height);
153
+                }
128 154
             });
129
-            if (this.props.onHeightUpdated) {
130
-                this.props.onHeightUpdated(height);
131
-            }
132 155
         }
133 156
     }
134 157
 
@@ -150,14 +173,15 @@ export default class AutoHeightWebView extends ImmutableComponent {
150 173
     }
151 174
 
152 175
     render() {
153
-        const { height, script, isChangingSource } = this.state;
154
-        const { source, heightOffset, customScript, style, enableBaseUrl } = this.props;
176
+        const { height, script, isChangingSource, heightOffset } = this.state;
177
+        const { enableAnimation, source, customScript, style, enableBaseUrl } = this.props;
155 178
         let webViewSource = source;
156 179
         if (enableBaseUrl) {
157 180
             webViewSource = Object.assign({}, source, { baseUrl: 'file:///android_asset/web/' });
158 181
         }
159 182
         return (
160
-            <View style={[{
183
+            <Animated.View style={[{
184
+                opacity: enableAnimation ? this.opacityAnimatedValue : 1,
161 185
                 width: ScreenWidth,
162 186
                 height: height + heightOffset,
163 187
                 backgroundColor: 'transparent'
@@ -174,17 +198,18 @@ export default class AutoHeightWebView extends ImmutableComponent {
174 198
                             injectedJavaScript={script + customScript}
175 199
                             scrollEnabled={false}
176 200
                             source={webViewSource}
177
-                            // below kitkat
178
-                            onChange={this.onMessage}
179 201
                             onMessage={this.onMessage}
180
-                            messagingEnabled={true} />
202
+                            messagingEnabled={true}
203
+                            // below kitkat
204
+                            onChange={this.onMessage} />
181 205
                 }
182
-            </View>
206
+            </Animated.View>
183 207
         );
184 208
     }
185 209
 }
186 210
 
187 211
 AutoHeightWebView.propTypes = {
212
+    enableAnimation: PropTypes.bool,
188 213
     source: WebView.propTypes.source,
189 214
     onHeightUpdated: PropTypes.func,
190 215
     customScript: PropTypes.string,
@@ -202,6 +227,7 @@ AutoHeightWebView.propTypes = {
202 227
 }
203 228
 
204 229
 AutoHeightWebView.defaultProps = {
230
+    animationDuration: 555,
205 231
     enableBaseUrl: false,
206 232
     heightOffset: 20
207 233
 }

+ 31
- 6
autoHeightWebView/index.ios.js View File

@@ -6,6 +6,7 @@ import React, {
6 6
 } from 'react';
7 7
 
8 8
 import {
9
+    Animated,
9 10
     Dimensions,
10 11
     View,
11 12
     WebView
@@ -17,6 +18,9 @@ export default class AutoHeightWebView extends ImmutableComponent {
17 18
     constructor(props) {
18 19
         super(props);
19 20
         this.handleNavigationStateChange = this.handleNavigationStateChange.bind(this);
21
+        if (this.props.enableAnimation) {
22
+            this.opacityAnimatedValue = new Animated.Value(0);
23
+        }
20 24
         const initialScript = props.files ? this.appendFilesToHead(props.files, BaseScript) : BaseScript;
21 25
         this.state = {
22 26
             height: 0,
@@ -49,22 +53,39 @@ export default class AutoHeightWebView extends ImmutableComponent {
49 53
         return script;
50 54
     }
51 55
 
56
+    onHeightUpdated(height) {
57
+        if (this.props.onHeightUpdated) {
58
+            this.props.onHeightUpdated(height);
59
+        }
60
+    }
61
+
52 62
     handleNavigationStateChange(navState) {
53 63
         const height = Number(navState.title);
54 64
         if (height) {
55
-            this.setState({ height });
56
-            if (this.props.onHeightUpdated) {
57
-                this.props.onHeightUpdated(height);
65
+            if (this.props.enableAnimation) {
66
+                this.opacityAnimatedValue.setValue(0);
58 67
             }
68
+            this.setState({ height }, () => {
69
+                if (this.props.enableAnimation) {
70
+                    Animated.timing(this.opacityAnimatedValue, {
71
+                        toValue: 1,
72
+                        duration: this.props.animationDuration
73
+                    }).start(() => this.onHeightUpdated(height));
74
+                }
75
+                else {
76
+                    this.onHeightUpdated(height);
77
+                }
78
+            });
59 79
         }
60 80
     }
61 81
 
62 82
     render() {
63 83
         const { height, script } = this.state;
64
-        const { source, heightOffset, customScript, style } = this.props;
84
+        const { enableAnimation, source, heightOffset, customScript, style } = this.props;
65 85
         const webViewSource = Object.assign({}, source, { baseUrl: 'web/' });
66 86
         return (
67
-            <View style={[{
87
+            <Animated.View style={[{
88
+                opacity: enableAnimation ? this.opacityAnimatedValue : 1,
68 89
                 width: ScreenWidth,
69 90
                 height: height + heightOffset,
70 91
                 backgroundColor: 'transparent'
@@ -78,12 +99,15 @@ export default class AutoHeightWebView extends ImmutableComponent {
78 99
                     scrollEnabled={false}
79 100
                     source={webViewSource}
80 101
                     onNavigationStateChange={this.handleNavigationStateChange} />
81
-            </View>
102
+            </Animated.View>
82 103
         );
83 104
     }
84 105
 }
85 106
 
86 107
 AutoHeightWebView.propTypes = {
108
+    enableAnimation: PropTypes.bool,
109
+    // only works on enable animation
110
+    animationDuration: PropTypes.number,
87 111
     source: WebView.propTypes.source,
88 112
     onHeightUpdated: PropTypes.func,
89 113
     customScript: PropTypes.string,
@@ -99,6 +123,7 @@ AutoHeightWebView.propTypes = {
99 123
 }
100 124
 
101 125
 AutoHeightWebView.defaultProps = {
126
+    animationDuration: 555,
102 127
     heightOffset: 12
103 128
 }
104 129
 

+ 6
- 3
demo/.flowconfig View File

@@ -22,6 +22,8 @@ node_modules/react-native/flow
22 22
 flow/
23 23
 
24 24
 [options]
25
+emoji=true
26
+
25 27
 module.system=haste
26 28
 
27 29
 experimental.strict_type_args=true
@@ -34,11 +36,12 @@ suppress_type=$FlowIssue
34 36
 suppress_type=$FlowFixMe
35 37
 suppress_type=$FixMe
36 38
 
37
-suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-6]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
38
-suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-6]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
39
+suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-0]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
40
+suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-0]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
39 41
 suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
42
+suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
40 43
 
41 44
 unsafe.enable_getters_and_setters=true
42 45
 
43 46
 [version]
44
-^0.36.0
47
+^0.40.0

+ 1
- 1
demo/.gitignore View File

@@ -34,11 +34,11 @@ local.properties
34 34
 #
35 35
 node_modules/
36 36
 npm-debug.log
37
+yarn-error.log
37 38
 
38 39
 # BUCK
39 40
 buck-out/
40 41
 \.buckd/
41
-android/app/libs
42 42
 *.keystore
43 43
 
44 44
 # fastlane

+ 26
- 27
demo/android/app/BUCK View File

@@ -1,5 +1,3 @@
1
-import re
2
-
3 1
 # To learn about Buck see [Docs](https://buckbuild.com/).
4 2
 # To run your application with Buck:
5 3
 # - install Buck
@@ -11,8 +9,9 @@ import re
11 9
 #
12 10
 
13 11
 lib_deps = []
12
+
14 13
 for jarfile in glob(['libs/*.jar']):
15
-  name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'\1', jarfile)
14
+  name = 'jars__' + jarfile[jarfile.rindex('/') + 1: jarfile.rindex('.jar')]
16 15
   lib_deps.append(':' + name)
17 16
   prebuilt_jar(
18 17
     name = name,
@@ -20,7 +19,7 @@ for jarfile in glob(['libs/*.jar']):
20 19
   )
21 20
 
22 21
 for aarfile in glob(['libs/*.aar']):
23
-  name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'\1', aarfile)
22
+  name = 'aars__' + aarfile[aarfile.rindex('/') + 1: aarfile.rindex('.aar')]
24 23
   lib_deps.append(':' + name)
25 24
   android_prebuilt_aar(
26 25
     name = name,
@@ -28,39 +27,39 @@ for aarfile in glob(['libs/*.aar']):
28 27
   )
29 28
 
30 29
 android_library(
31
-  name = 'all-libs',
32
-  exported_deps = lib_deps
30
+    name = "all-libs",
31
+    exported_deps = lib_deps,
33 32
 )
34 33
 
35 34
 android_library(
36
-  name = 'app-code',
37
-  srcs = glob([
38
-    'src/main/java/**/*.java',
39
-  ]),
40
-  deps = [
41
-    ':all-libs',
42
-    ':build_config',
43
-    ':res',
44
-  ],
35
+    name = "app-code",
36
+    srcs = glob([
37
+        "src/main/java/**/*.java",
38
+    ]),
39
+    deps = [
40
+        ":all-libs",
41
+        ":build_config",
42
+        ":res",
43
+    ],
45 44
 )
46 45
 
47 46
 android_build_config(
48
-  name = 'build_config',
49
-  package = 'com.demo',
47
+    name = "build_config",
48
+    package = "com.demo",
50 49
 )
51 50
 
52 51
 android_resource(
53
-  name = 'res',
54
-  res = 'src/main/res',
55
-  package = 'com.demo',
52
+    name = "res",
53
+    package = "com.demo",
54
+    res = "src/main/res",
56 55
 )
57 56
 
58 57
 android_binary(
59
-  name = 'app',
60
-  package_type = 'debug',
61
-  manifest = 'src/main/AndroidManifest.xml',
62
-  keystore = '//android/keystores:debug',
63
-  deps = [
64
-    ':app-code',
65
-  ],
58
+    name = "app",
59
+    keystore = "//android/keystores:debug",
60
+    manifest = "src/main/AndroidManifest.xml",
61
+    package_type = "debug",
62
+    deps = [
63
+        ":app-code",
64
+    ],
66 65
 )

+ 2
- 1
demo/android/app/src/main/AndroidManifest.xml View File

@@ -19,7 +19,8 @@
19 19
       <activity
20 20
         android:name=".MainActivity"
21 21
         android:label="@string/app_name"
22
-        android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
22
+        android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
23
+        android:windowSoftInputMode="adjustResize">
23 24
         <intent-filter>
24 25
             <action android:name="android.intent.action.MAIN" />
25 26
             <category android:name="android.intent.category.LAUNCHER" />

+ 1
- 3
demo/android/app/src/main/java/com/demo/MainApplication.java View File

@@ -1,11 +1,9 @@
1 1
 package com.demo;
2 2
 
3 3
 import android.app.Application;
4
-import android.util.Log;
5 4
 
6 5
 import com.facebook.react.ReactApplication;
7 6
 import com.dscj.autoheightwebview.AutoHeightWebViewPackage;
8
-import com.facebook.react.ReactInstanceManager;
9 7
 import com.facebook.react.ReactNativeHost;
10 8
 import com.facebook.react.ReactPackage;
11 9
 import com.facebook.react.shell.MainReactPackage;
@@ -18,7 +16,7 @@ public class MainApplication extends Application implements ReactApplication {
18 16
 
19 17
   private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
20 18
     @Override
21
-    protected boolean getUseDeveloperSupport() {
19
+    public boolean getUseDeveloperSupport() {
22 20
       return BuildConfig.DEBUG;
23 21
     }
24 22
 

+ 1
- 1
demo/android/build.gradle View File

@@ -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.2.3'
9 9
 
10 10
         // NOTE: Do not place your application dependencies here; they belong
11 11
         // in the individual module build.gradle files

+ 1
- 1
demo/android/gradle/wrapper/gradle-wrapper.properties View File

@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
2 2
 distributionPath=wrapper/dists
3 3
 zipStoreBase=GRADLE_USER_HOME
4 4
 zipStorePath=wrapper/dists
5
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
5
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip

+ 6
- 6
demo/android/keystores/BUCK View File

@@ -1,8 +1,8 @@
1 1
 keystore(
2
-  name = 'debug',
3
-  store = 'debug.keystore',
4
-  properties = 'debug.keystore.properties',
5
-  visibility = [
6
-    'PUBLIC',
7
-  ],
2
+    name = "debug",
3
+    properties = "debug.keystore.properties",
4
+    store = "debug.keystore",
5
+    visibility = [
6
+        "PUBLIC",
7
+    ],
8 8
 )

+ 4
- 0
demo/app.json View File

@@ -0,0 +1,4 @@
1
+{
2
+  "name": "demo",
3
+  "displayName": "demo"
4
+}

+ 1
- 0
demo/explorer.js View File

@@ -55,6 +55,7 @@ export default class Explorer extends Component {
55 55
                     alignItems: 'center'
56 56
                 }}>
57 57
                 <AutoHeightWebView
58
+                    enableAnimation
58 59
                     onHeightUpdated={height => this.setState({ height })}
59 60
                     source={{ html: this.state.html }}
60 61
                     customScript={this.state.script} />

+ 0
- 0
demo/index.android.js View File


+ 0
- 0
demo/index.ios.js View File


+ 54
- 0
demo/ios/demo-tvOS/Info.plist View File

@@ -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
demo/ios/demo-tvOSTests/Info.plist View File

@@ -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>

+ 264
- 1
demo/ios/demo.xcodeproj/project.pbxproj View File

@@ -22,6 +22,18 @@
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
+		2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
26
+		2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
27
+		2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
28
+		2D02E4C21E0B4AEC006451C7 /* libRCTAnimation-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation-tvOS.a */; };
29
+		2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */; };
30
+		2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */; };
31
+		2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */; };
32
+		2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */; };
33
+		2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */; };
34
+		2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */; };
35
+		2D02E4C91E0B4AEC006451C7 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3EA31DF850E9000B6D8A /* libReact.a */; };
36
+		2DCD954D1E0B4F2C00145EB5 /* demoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* demoTests.m */; };
25 37
 		5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; };
26 38
 		832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
27 39
 /* End PBXBuildFile section */
@@ -90,6 +102,13 @@
90 102
 			remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192;
91 103
 			remoteInfo = React;
92 104
 		};
105
+		2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */ = {
106
+			isa = PBXContainerItemProxy;
107
+			containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
108
+			proxyType = 1;
109
+			remoteGlobalIDString = 2D02E47A1E0B4A5D006451C7;
110
+			remoteInfo = "demo-tvOS";
111
+		};
93 112
 		3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */ = {
94 113
 			isa = PBXContainerItemProxy;
95 114
 			containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
@@ -231,6 +250,8 @@
231 250
 		13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = demo/Info.plist; sourceTree = "<group>"; };
232 251
 		13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = demo/main.m; sourceTree = "<group>"; };
233 252
 		146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = "<group>"; };
253
+		2D02E47B1E0B4A5D006451C7 /* demo-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "demo-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
254
+		2D02E4901E0B4A5D006451C7 /* demo-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "demo-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
234 255
 		5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = "<group>"; };
235 256
 		78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; };
236 257
 		832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; };
@@ -249,8 +270,8 @@
249 270
 			isa = PBXFrameworksBuildPhase;
250 271
 			buildActionMask = 2147483647;
251 272
 			files = (
252
-				5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */,
253 273
 				146834051AC3E58100842450 /* libReact.a in Frameworks */,
274
+				5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */,
254 275
 				00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */,
255 276
 				00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */,
256 277
 				00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */,
@@ -263,6 +284,28 @@
263 284
 			);
264 285
 			runOnlyForDeploymentPostprocessing = 0;
265 286
 		};
287
+		2D02E4781E0B4A5D006451C7 /* Frameworks */ = {
288
+			isa = PBXFrameworksBuildPhase;
289
+			buildActionMask = 2147483647;
290
+			files = (
291
+				2D02E4C91E0B4AEC006451C7 /* libReact.a in Frameworks */,
292
+				2D02E4C21E0B4AEC006451C7 /* libRCTAnimation-tvOS.a in Frameworks */,
293
+				2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */,
294
+				2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */,
295
+				2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */,
296
+				2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */,
297
+				2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */,
298
+				2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */,
299
+			);
300
+			runOnlyForDeploymentPostprocessing = 0;
301
+		};
302
+		2D02E48D1E0B4A5D006451C7 /* Frameworks */ = {
303
+			isa = PBXFrameworksBuildPhase;
304
+			buildActionMask = 2147483647;
305
+			files = (
306
+			);
307
+			runOnlyForDeploymentPostprocessing = 0;
308
+		};
266 309
 /* End PBXFrameworksBuildPhase section */
267 310
 
268 311
 /* Begin PBXGroup section */
@@ -434,6 +477,8 @@
434 477
 			children = (
435 478
 				13B07F961A680F5B00A75B9A /* demo.app */,
436 479
 				00E356EE1AD99517003FC87E /* demoTests.xctest */,
480
+				2D02E47B1E0B4A5D006451C7 /* demo-tvOS.app */,
481
+				2D02E4901E0B4A5D006451C7 /* demo-tvOSTests.xctest */,
437 482
 			);
438 483
 			name = Products;
439 484
 			sourceTree = "<group>";
@@ -477,6 +522,42 @@
477 522
 			productReference = 13B07F961A680F5B00A75B9A /* demo.app */;
478 523
 			productType = "com.apple.product-type.application";
479 524
 		};
525
+		2D02E47A1E0B4A5D006451C7 /* demo-tvOS */ = {
526
+			isa = PBXNativeTarget;
527
+			buildConfigurationList = 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "demo-tvOS" */;
528
+			buildPhases = (
529
+				2D02E4771E0B4A5D006451C7 /* Sources */,
530
+				2D02E4781E0B4A5D006451C7 /* Frameworks */,
531
+				2D02E4791E0B4A5D006451C7 /* Resources */,
532
+				2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */,
533
+			);
534
+			buildRules = (
535
+			);
536
+			dependencies = (
537
+			);
538
+			name = "demo-tvOS";
539
+			productName = "demo-tvOS";
540
+			productReference = 2D02E47B1E0B4A5D006451C7 /* demo-tvOS.app */;
541
+			productType = "com.apple.product-type.application";
542
+		};
543
+		2D02E48F1E0B4A5D006451C7 /* demo-tvOSTests */ = {
544
+			isa = PBXNativeTarget;
545
+			buildConfigurationList = 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "demo-tvOSTests" */;
546
+			buildPhases = (
547
+				2D02E48C1E0B4A5D006451C7 /* Sources */,
548
+				2D02E48D1E0B4A5D006451C7 /* Frameworks */,
549
+				2D02E48E1E0B4A5D006451C7 /* Resources */,
550
+			);
551
+			buildRules = (
552
+			);
553
+			dependencies = (
554
+				2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */,
555
+			);
556
+			name = "demo-tvOSTests";
557
+			productName = "demo-tvOSTests";
558
+			productReference = 2D02E4901E0B4A5D006451C7 /* demo-tvOSTests.xctest */;
559
+			productType = "com.apple.product-type.bundle.unit-test";
560
+		};
480 561
 /* End PBXNativeTarget section */
481 562
 
482 563
 /* Begin PBXProject section */
@@ -490,6 +571,15 @@
490 571
 						CreatedOnToolsVersion = 6.2;
491 572
 						TestTargetID = 13B07F861A680F5B00A75B9A;
492 573
 					};
574
+					2D02E47A1E0B4A5D006451C7 = {
575
+						CreatedOnToolsVersion = 8.2.1;
576
+						ProvisioningStyle = Automatic;
577
+					};
578
+					2D02E48F1E0B4A5D006451C7 = {
579
+						CreatedOnToolsVersion = 8.2.1;
580
+						ProvisioningStyle = Automatic;
581
+						TestTargetID = 2D02E47A1E0B4A5D006451C7;
582
+					};
493 583
 				};
494 584
 			};
495 585
 			buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "demo" */;
@@ -553,6 +643,8 @@
553 643
 			targets = (
554 644
 				13B07F861A680F5B00A75B9A /* demo */,
555 645
 				00E356ED1AD99517003FC87E /* demoTests */,
646
+				2D02E47A1E0B4A5D006451C7 /* demo-tvOS */,
647
+				2D02E48F1E0B4A5D006451C7 /* demo-tvOSTests */,
556 648
 			);
557 649
 		};
558 650
 /* End PBXProject section */
@@ -752,6 +844,21 @@
752 844
 			);
753 845
 			runOnlyForDeploymentPostprocessing = 0;
754 846
 		};
847
+		2D02E4791E0B4A5D006451C7 /* Resources */ = {
848
+			isa = PBXResourcesBuildPhase;
849
+			buildActionMask = 2147483647;
850
+			files = (
851
+				2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */,
852
+			);
853
+			runOnlyForDeploymentPostprocessing = 0;
854
+		};
855
+		2D02E48E1E0B4A5D006451C7 /* Resources */ = {
856
+			isa = PBXResourcesBuildPhase;
857
+			buildActionMask = 2147483647;
858
+			files = (
859
+			);
860
+			runOnlyForDeploymentPostprocessing = 0;
861
+		};
755 862
 /* End PBXResourcesBuildPhase section */
756 863
 
757 864
 /* Begin PBXShellScriptBuildPhase section */
@@ -769,6 +876,20 @@
769 876
 			shellPath = /bin/sh;
770 877
 			shellScript = "export NODE_BINARY=node\n../node_modules/react-native/packager/react-native-xcode.sh";
771 878
 		};
879
+		2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = {
880
+			isa = PBXShellScriptBuildPhase;
881
+			buildActionMask = 2147483647;
882
+			files = (
883
+			);
884
+			inputPaths = (
885
+			);
886
+			name = "Bundle React Native Code And Images";
887
+			outputPaths = (
888
+			);
889
+			runOnlyForDeploymentPostprocessing = 0;
890
+			shellPath = /bin/sh;
891
+			shellScript = "export NODE_BINARY=node\n../node_modules/react-native/packager/react-native-xcode.sh";
892
+		};
772 893
 /* End PBXShellScriptBuildPhase section */
773 894
 
774 895
 /* Begin PBXSourcesBuildPhase section */
@@ -789,6 +910,23 @@
789 910
 			);
790 911
 			runOnlyForDeploymentPostprocessing = 0;
791 912
 		};
913
+		2D02E4771E0B4A5D006451C7 /* Sources */ = {
914
+			isa = PBXSourcesBuildPhase;
915
+			buildActionMask = 2147483647;
916
+			files = (
917
+				2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */,
918
+				2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */,
919
+			);
920
+			runOnlyForDeploymentPostprocessing = 0;
921
+		};
922
+		2D02E48C1E0B4A5D006451C7 /* Sources */ = {
923
+			isa = PBXSourcesBuildPhase;
924
+			buildActionMask = 2147483647;
925
+			files = (
926
+				2DCD954D1E0B4F2C00145EB5 /* demoTests.m in Sources */,
927
+			);
928
+			runOnlyForDeploymentPostprocessing = 0;
929
+		};
792 930
 /* End PBXSourcesBuildPhase section */
793 931
 
794 932
 /* Begin PBXTargetDependency section */
@@ -797,6 +935,11 @@
797 935
 			target = 13B07F861A680F5B00A75B9A /* demo */;
798 936
 			targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */;
799 937
 		};
938
+		2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */ = {
939
+			isa = PBXTargetDependency;
940
+			target = 2D02E47A1E0B4A5D006451C7 /* demo-tvOS */;
941
+			targetProxy = 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */;
942
+		};
800 943
 /* End PBXTargetDependency section */
801 944
 
802 945
 /* Begin PBXVariantGroup section */
@@ -823,6 +966,10 @@
823 966
 				INFOPLIST_FILE = demoTests/Info.plist;
824 967
 				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
825 968
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
969
+				OTHER_LDFLAGS = (
970
+					"-ObjC",
971
+					"-lc++",
972
+				);
826 973
 				PRODUCT_NAME = "$(TARGET_NAME)";
827 974
 				TEST_HOST = "$(BUILT_PRODUCTS_DIR)/demo.app/demo";
828 975
 			};
@@ -836,6 +983,10 @@
836 983
 				INFOPLIST_FILE = demoTests/Info.plist;
837 984
 				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
838 985
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
986
+				OTHER_LDFLAGS = (
987
+					"-ObjC",
988
+					"-lc++",
989
+				);
839 990
 				PRODUCT_NAME = "$(TARGET_NAME)";
840 991
 				TEST_HOST = "$(BUILT_PRODUCTS_DIR)/demo.app/demo";
841 992
 			};
@@ -876,6 +1027,100 @@
876 1027
 			};
877 1028
 			name = Release;
878 1029
 		};
1030
+		2D02E4971E0B4A5E006451C7 /* Debug */ = {
1031
+			isa = XCBuildConfiguration;
1032
+			buildSettings = {
1033
+				ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
1034
+				ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
1035
+				CLANG_ANALYZER_NONNULL = YES;
1036
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
1037
+				CLANG_WARN_INFINITE_RECURSION = YES;
1038
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
1039
+				DEBUG_INFORMATION_FORMAT = dwarf;
1040
+				ENABLE_TESTABILITY = YES;
1041
+				GCC_NO_COMMON_BLOCKS = YES;
1042
+				INFOPLIST_FILE = "demo-tvOS/Info.plist";
1043
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
1044
+				OTHER_LDFLAGS = (
1045
+					"-ObjC",
1046
+					"-lc++",
1047
+				);
1048
+				PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.demo-tvOS";
1049
+				PRODUCT_NAME = "$(TARGET_NAME)";
1050
+				SDKROOT = appletvos;
1051
+				TARGETED_DEVICE_FAMILY = 3;
1052
+				TVOS_DEPLOYMENT_TARGET = 9.2;
1053
+			};
1054
+			name = Debug;
1055
+		};
1056
+		2D02E4981E0B4A5E006451C7 /* Release */ = {
1057
+			isa = XCBuildConfiguration;
1058
+			buildSettings = {
1059
+				ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
1060
+				ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
1061
+				CLANG_ANALYZER_NONNULL = YES;
1062
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
1063
+				CLANG_WARN_INFINITE_RECURSION = YES;
1064
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
1065
+				COPY_PHASE_STRIP = NO;
1066
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
1067
+				GCC_NO_COMMON_BLOCKS = YES;
1068
+				INFOPLIST_FILE = "demo-tvOS/Info.plist";
1069
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
1070
+				OTHER_LDFLAGS = (
1071
+					"-ObjC",
1072
+					"-lc++",
1073
+				);
1074
+				PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.demo-tvOS";
1075
+				PRODUCT_NAME = "$(TARGET_NAME)";
1076
+				SDKROOT = appletvos;
1077
+				TARGETED_DEVICE_FAMILY = 3;
1078
+				TVOS_DEPLOYMENT_TARGET = 9.2;
1079
+			};
1080
+			name = Release;
1081
+		};
1082
+		2D02E4991E0B4A5E006451C7 /* Debug */ = {
1083
+			isa = XCBuildConfiguration;
1084
+			buildSettings = {
1085
+				BUNDLE_LOADER = "$(TEST_HOST)";
1086
+				CLANG_ANALYZER_NONNULL = YES;
1087
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
1088
+				CLANG_WARN_INFINITE_RECURSION = YES;
1089
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
1090
+				DEBUG_INFORMATION_FORMAT = dwarf;
1091
+				ENABLE_TESTABILITY = YES;
1092
+				GCC_NO_COMMON_BLOCKS = YES;
1093
+				INFOPLIST_FILE = "demo-tvOSTests/Info.plist";
1094
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1095
+				PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.demo-tvOSTests";
1096
+				PRODUCT_NAME = "$(TARGET_NAME)";
1097
+				SDKROOT = appletvos;
1098
+				TEST_HOST = "$(BUILT_PRODUCTS_DIR)/demo-tvOS.app/demo-tvOS";
1099
+				TVOS_DEPLOYMENT_TARGET = 10.1;
1100
+			};
1101
+			name = Debug;
1102
+		};
1103
+		2D02E49A1E0B4A5E006451C7 /* Release */ = {
1104
+			isa = XCBuildConfiguration;
1105
+			buildSettings = {
1106
+				BUNDLE_LOADER = "$(TEST_HOST)";
1107
+				CLANG_ANALYZER_NONNULL = YES;
1108
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
1109
+				CLANG_WARN_INFINITE_RECURSION = YES;
1110
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
1111
+				COPY_PHASE_STRIP = NO;
1112
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
1113
+				GCC_NO_COMMON_BLOCKS = YES;
1114
+				INFOPLIST_FILE = "demo-tvOSTests/Info.plist";
1115
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1116
+				PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.demo-tvOSTests";
1117
+				PRODUCT_NAME = "$(TARGET_NAME)";
1118
+				SDKROOT = appletvos;
1119
+				TEST_HOST = "$(BUILT_PRODUCTS_DIR)/demo-tvOS.app/demo-tvOS";
1120
+				TVOS_DEPLOYMENT_TARGET = 10.1;
1121
+			};
1122
+			name = Release;
1123
+		};
879 1124
 		83CBBA201A601CBA00E9B192 /* Debug */ = {
880 1125
 			isa = XCBuildConfiguration;
881 1126
 			buildSettings = {
@@ -973,6 +1218,24 @@
973 1218
 			defaultConfigurationIsVisible = 0;
974 1219
 			defaultConfigurationName = Release;
975 1220
 		};
1221
+		2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "demo-tvOS" */ = {
1222
+			isa = XCConfigurationList;
1223
+			buildConfigurations = (
1224
+				2D02E4971E0B4A5E006451C7 /* Debug */,
1225
+				2D02E4981E0B4A5E006451C7 /* Release */,
1226
+			);
1227
+			defaultConfigurationIsVisible = 0;
1228
+			defaultConfigurationName = Release;
1229
+		};
1230
+		2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "demo-tvOSTests" */ = {
1231
+			isa = XCConfigurationList;
1232
+			buildConfigurations = (
1233
+				2D02E4991E0B4A5E006451C7 /* Debug */,
1234
+				2D02E49A1E0B4A5E006451C7 /* Release */,
1235
+			);
1236
+			defaultConfigurationIsVisible = 0;
1237
+			defaultConfigurationName = Release;
1238
+		};
976 1239
 		83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "demo" */ = {
977 1240
 			isa = XCConfigurationList;
978 1241
 			buildConfigurations = (

+ 129
- 0
demo/ios/demo.xcodeproj/xcshareddata/xcschemes/demo-tvOS.xcscheme View File

@@ -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 = "demo-tvOS.app"
33
+               BlueprintName = "demo-tvOS"
34
+               ReferencedContainer = "container:demo.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 = "demo-tvOSTests.xctest"
47
+               BlueprintName = "demo-tvOSTests"
48
+               ReferencedContainer = "container:demo.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 = "demo-tvOSTests.xctest"
65
+               BlueprintName = "demo-tvOSTests"
66
+               ReferencedContainer = "container:demo.xcodeproj">
67
+            </BuildableReference>
68
+         </TestableReference>
69
+      </Testables>
70
+      <MacroExpansion>
71
+         <BuildableReference
72
+            BuildableIdentifier = "primary"
73
+            BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
74
+            BuildableName = "demo-tvOS.app"
75
+            BlueprintName = "demo-tvOS"
76
+            ReferencedContainer = "container:demo.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 = "demo-tvOS.app"
98
+            BlueprintName = "demo-tvOS"
99
+            ReferencedContainer = "container:demo.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 = "demo-tvOS.app"
117
+            BlueprintName = "demo-tvOS"
118
+            ReferencedContainer = "container:demo.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>

+ 11
- 2
demo/ios/demo/Info.plist View File

@@ -4,6 +4,8 @@
4 4
 <dict>
5 5
 	<key>CFBundleDevelopmentRegion</key>
6 6
 	<string>en</string>
7
+	<key>CFBundleDisplayName</key>
8
+	<string>demo</string>
7 9
 	<key>CFBundleExecutable</key>
8 10
 	<string>$(EXECUTABLE_NAME)</string>
9 11
 	<key>CFBundleIdentifier</key>
@@ -39,9 +41,16 @@
39 41
 	<key>NSLocationWhenInUseUsageDescription</key>
40 42
 	<string></string>
41 43
 	<key>NSAppTransportSecurity</key>
44
+	<!--See http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/ -->
42 45
 	<dict>
43
-		<key>NSAllowsArbitraryLoads</key>
44
-		<true/>
46
+		<key>NSExceptionDomains</key>
47
+		<dict>
48
+			<key>localhost</key>
49
+			<dict>
50
+				<key>NSExceptionAllowsInsecureHTTPLoads</key>
51
+				<true/>
52
+			</dict>
53
+		</dict>
45 54
 	</dict>
46 55
 </dict>
47 56
 </plist>

+ 5
- 5
demo/package.json View File

@@ -7,15 +7,15 @@
7 7
     "test": "jest"
8 8
   },
9 9
   "dependencies": {
10
-    "react": "15.4.2",
11
-    "react-native": "0.40.0",
10
+    "react": "16.0.0-alpha.6",
11
+    "react-native": "0.43.4",
12 12
     "react-native-autoheight-webview": "file:///Users/iou90/Works/Lab/react-native-autoheight-webview"
13 13
   },
14 14
   "devDependencies": {
15
-    "babel-jest": "18.0.0",
15
+    "babel-jest": "19.0.0",
16 16
     "babel-preset-react-native": "1.9.1",
17
-    "jest": "18.1.0",
18
-    "react-test-renderer": "15.4.2"
17
+    "jest": "19.0.2",
18
+    "react-test-renderer": "16.0.0-alpha.6"
19 19
   },
20 20
   "jest": {
21 21
     "preset": "react-native"

+ 1091
- 1017
demo/yarn.lock
File diff suppressed because it is too large
View File


+ 1
- 1
package.json View File

@@ -1,6 +1,6 @@
1 1
 {
2 2
   "name": "react-native-autoheight-webview",
3
-  "version": "0.1.3",
3
+  "version": "0.2.0",
4 4
   "description": "An auto height webview for React Native",
5 5
   "main": "autoHeightWebView",
6 6
   "files": [