浏览代码

update rn version of demo to 0.58.3

iou90 5 年前
父节点
当前提交
e461862aa8

+ 0
- 3
demo/.babelrc 查看文件

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

+ 4
- 1
demo/.flowconfig 查看文件

@@ -29,6 +29,9 @@ node_modules/react-native/flow-github/
29 29
 [options]
30 30
 emoji=true
31 31
 
32
+esproposal.optional_chaining=enable
33
+esproposal.nullish_coalescing=enable
34
+
32 35
 module.system=haste
33 36
 module.system.haste.use_name_reducers=true
34 37
 # get basename
@@ -64,4 +67,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
64 67
 suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
65 68
 
66 69
 [version]
67
-^0.75.0
70
+^0.86.0

+ 0
- 2
demo/App.js 查看文件

@@ -1,5 +1,3 @@
1
-'use strict';
2
-
3 1
 import React, { Component } from 'react';
4 2
 
5 3
 import { ScrollView, StyleSheet, Text, TouchableOpacity, Platform, Linking } from 'react-native';

+ 15
- 0
demo/__tests__/App.js 查看文件

@@ -0,0 +1,15 @@
1
+/**
2
+ * @format
3
+ * @lint-ignore-every XPLATJSCOPYRIGHT1
4
+ */
5
+
6
+import 'react-native';
7
+import React from 'react';
8
+import App from '../App';
9
+
10
+// Note: test renderer must be required after react-native.
11
+import renderer from 'react-test-renderer';
12
+
13
+it('renders correctly', () => {
14
+  renderer.create(<App />);
15
+});

+ 4
- 14
demo/android/app/BUCK 查看文件

@@ -8,23 +8,13 @@
8 8
 # - `buck install -r android/app` - compile, install and run application
9 9
 #
10 10
 
11
+load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
12
+
11 13
 lib_deps = []
12 14
 
13
-for jarfile in glob(['libs/*.jar']):
14
-  name = 'jars__' + jarfile[jarfile.rindex('/') + 1: jarfile.rindex('.jar')]
15
-  lib_deps.append(':' + name)
16
-  prebuilt_jar(
17
-    name = name,
18
-    binary_jar = jarfile,
19
-  )
15
+create_aar_targets(glob(["libs/*.aar"]))
20 16
 
21
-for aarfile in glob(['libs/*.aar']):
22
-  name = 'aars__' + aarfile[aarfile.rindex('/') + 1: aarfile.rindex('.aar')]
23
-  lib_deps.append(':' + name)
24
-  android_prebuilt_aar(
25
-    name = name,
26
-    aar = aarfile,
27
-  )
17
+create_jar_targets(glob(["libs/*.jar"]))
28 18
 
29 19
 android_library(
30 20
     name = "all-libs",

+ 5
- 8
demo/android/app/build.gradle 查看文件

@@ -103,16 +103,13 @@ android {
103 103
         targetSdkVersion rootProject.ext.targetSdkVersion
104 104
         versionCode 1
105 105
         versionName "1.0"
106
-        ndk {
107
-            abiFilters "armeabi-v7a", "x86"
108
-        }
109 106
     }
110 107
     splits {
111 108
         abi {
112 109
             reset()
113 110
             enable enableSeparateBuildPerCPUArchitecture
114 111
             universalApk false  // If true, also generate a universal APK
115
-            include "armeabi-v7a", "x86"
112
+            include "armeabi-v7a", "x86", "arm64-v8a"
116 113
         }
117 114
     }
118 115
     buildTypes {
@@ -126,7 +123,7 @@ android {
126 123
         variant.outputs.each { output ->
127 124
             // For each separate APK per architecture, set a unique version code as described here:
128 125
             // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
129
-            def versionCodes = ["armeabi-v7a":1, "x86":2]
126
+            def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3]
130 127
             def abi = output.getFilter(OutputFile.ABI)
131 128
             if (abi != null) {  // null for the universal-debug, universal-release variants
132 129
                 output.versionCodeOverride =
@@ -137,9 +134,9 @@ android {
137 134
 }
138 135
 
139 136
 dependencies {
140
-    compile fileTree(dir: "libs", include: ["*.jar"])
141
-    compile "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
142
-    compile "com.facebook.react:react-native:+"  // From node_modules
137
+    implementation fileTree(dir: "libs", include: ["*.jar"])
138
+    implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
139
+    implementation "com.facebook.react:react-native:+"  // From node_modules
143 140
 }
144 141
 
145 142
 // Run this once to be able to run the application with BUCK

+ 19
- 0
demo/android/app/build_defs.bzl 查看文件

@@ -0,0 +1,19 @@
1
+"""Helper definitions to glob .aar and .jar targets"""
2
+
3
+def create_aar_targets(aarfiles):
4
+    for aarfile in aarfiles:
5
+        name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
6
+        lib_deps.append(":" + name)
7
+        android_prebuilt_aar(
8
+            name = name,
9
+            aar = aarfile,
10
+        )
11
+
12
+def create_jar_targets(jarfiles):
13
+    for jarfile in jarfiles:
14
+        name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")]
15
+        lib_deps.append(":" + name)
16
+        prebuilt_jar(
17
+            name = name,
18
+            binary_jar = jarfile,
19
+        )

+ 1
- 0
demo/android/app/src/main/AndroidManifest.xml 查看文件

@@ -8,6 +8,7 @@
8 8
       android:name=".MainApplication"
9 9
       android:label="@string/app_name"
10 10
       android:icon="@mipmap/ic_launcher"
11
+      android:roundIcon="@mipmap/ic_launcher_round"
11 12
       android:allowBackup="false"
12 13
       android:theme="@style/AppTheme">
13 14
       <activity

+ 0
- 3
demo/android/app/src/main/assets/web/demo.css 查看文件

@@ -1,3 +0,0 @@
1
-.localStyle {
2
-    font-weight: bold;
3
-}

+ 0
- 3
demo/android/app/src/main/assets/webAssets/demo.css 查看文件

@@ -1,3 +0,0 @@
1
-.localStyle {
2
-    font-weight: bold;
3
-}

+ 14
- 16
demo/android/build.gradle 查看文件

@@ -1,16 +1,19 @@
1 1
 // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 2
 
3 3
 buildscript {
4
+    ext {
5
+        buildToolsVersion = "28.0.2"
6
+        minSdkVersion = 16
7
+        compileSdkVersion = 28
8
+        targetSdkVersion = 27
9
+        supportLibVersion = "28.0.0"
10
+    }
4 11
     repositories {
5
-        jcenter()
6
-        maven {
7
-            url 'https://maven.google.com/'
8
-            name 'Google'
9
-        }
10 12
         google()
13
+        jcenter()
11 14
     }
12 15
     dependencies {
13
-        classpath 'com.android.tools.build:gradle:3.1.3'
16
+        classpath 'com.android.tools.build:gradle:3.2.1'
14 17
 
15 18
         // NOTE: Do not place your application dependencies here; they belong
16 19
         // in the individual module build.gradle files
@@ -20,22 +23,17 @@ buildscript {
20 23
 allprojects {
21 24
     repositories {
22 25
         mavenLocal()
26
+        google()
23 27
         jcenter()
24 28
         maven {
25 29
             // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
26 30
             url "$rootDir/../node_modules/react-native/android"
27 31
         }
28
-        maven {
29
-            url 'https://maven.google.com/'
30
-            name 'Google'
31
-        }
32 32
     }
33 33
 }
34 34
 
35
-ext {
36
-    buildToolsVersion = "27.0.3"
37
-    minSdkVersion = 16
38
-    compileSdkVersion = 26
39
-    targetSdkVersion = 26
40
-    supportLibVersion = "26.1.0"
35
+
36
+task wrapper(type: Wrapper) {
37
+    gradleVersion = '4.7'
38
+    distributionUrl = distributionUrl.replace("bin", "all")
41 39
 }

+ 0
- 2
demo/android/gradle.properties 查看文件

@@ -16,5 +16,3 @@
16 16
 # This option should only be used with decoupled projects. More details, visit
17 17
 # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 18
 # org.gradle.parallel=true
19
-
20
-android.useDeprecatedNdk=true

二进制
demo/android/gradle/wrapper/gradle-wrapper.jar 查看文件


+ 1
- 2
demo/android/gradle/wrapper/gradle-wrapper.properties 查看文件

@@ -1,6 +1,5 @@
1
-#Wed Jul 25 15:22:06 CST 2018
2 1
 distributionBase=GRADLE_USER_HOME
3 2
 distributionPath=wrapper/dists
4 3
 zipStoreBase=GRADLE_USER_HOME
5 4
 zipStorePath=wrapper/dists
6
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
5
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip

+ 43
- 35
demo/android/gradlew 查看文件

@@ -1,4 +1,4 @@
1
-#!/usr/bin/env bash
1
+#!/usr/bin/env sh
2 2
 
3 3
 ##############################################################################
4 4
 ##
@@ -6,20 +6,38 @@
6 6
 ##
7 7
 ##############################################################################
8 8
 
9
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10
-DEFAULT_JVM_OPTS=""
9
+# Attempt to set APP_HOME
10
+# Resolve links: $0 may be a link
11
+PRG="$0"
12
+# Need this for relative symlinks.
13
+while [ -h "$PRG" ] ; do
14
+    ls=`ls -ld "$PRG"`
15
+    link=`expr "$ls" : '.*-> \(.*\)$'`
16
+    if expr "$link" : '/.*' > /dev/null; then
17
+        PRG="$link"
18
+    else
19
+        PRG=`dirname "$PRG"`"/$link"
20
+    fi
21
+done
22
+SAVED="`pwd`"
23
+cd "`dirname \"$PRG\"`/" >/dev/null
24
+APP_HOME="`pwd -P`"
25
+cd "$SAVED" >/dev/null
11 26
 
12 27
 APP_NAME="Gradle"
13 28
 APP_BASE_NAME=`basename "$0"`
14 29
 
30
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31
+DEFAULT_JVM_OPTS=""
32
+
15 33
 # Use the maximum available, or set MAX_FD != -1 to use that value.
16 34
 MAX_FD="maximum"
17 35
 
18
-warn ( ) {
36
+warn () {
19 37
     echo "$*"
20 38
 }
21 39
 
22
-die ( ) {
40
+die () {
23 41
     echo
24 42
     echo "$*"
25 43
     echo
@@ -30,6 +48,7 @@ die ( ) {
30 48
 cygwin=false
31 49
 msys=false
32 50
 darwin=false
51
+nonstop=false
33 52
 case "`uname`" in
34 53
   CYGWIN* )
35 54
     cygwin=true
@@ -40,31 +59,11 @@ case "`uname`" in
40 59
   MINGW* )
41 60
     msys=true
42 61
     ;;
62
+  NONSTOP* )
63
+    nonstop=true
64
+    ;;
43 65
 esac
44 66
 
45
-# For Cygwin, ensure paths are in UNIX format before anything is touched.
46
-if $cygwin ; then
47
-    [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48
-fi
49
-
50
-# Attempt to set APP_HOME
51
-# Resolve links: $0 may be a link
52
-PRG="$0"
53
-# Need this for relative symlinks.
54
-while [ -h "$PRG" ] ; do
55
-    ls=`ls -ld "$PRG"`
56
-    link=`expr "$ls" : '.*-> \(.*\)$'`
57
-    if expr "$link" : '/.*' > /dev/null; then
58
-        PRG="$link"
59
-    else
60
-        PRG=`dirname "$PRG"`"/$link"
61
-    fi
62
-done
63
-SAVED="`pwd`"
64
-cd "`dirname \"$PRG\"`/" >&-
65
-APP_HOME="`pwd -P`"
66
-cd "$SAVED" >&-
67
-
68 67
 CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
69 68
 
70 69
 # Determine the Java command to use to start the JVM.
@@ -90,7 +89,7 @@ location of your Java installation."
90 89
 fi
91 90
 
92 91
 # Increase the maximum file descriptors if we can.
93
-if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
92
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
94 93
     MAX_FD_LIMIT=`ulimit -H -n`
95 94
     if [ $? -eq 0 ] ; then
96 95
         if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
@@ -114,6 +113,7 @@ fi
114 113
 if $cygwin ; then
115 114
     APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116 115
     CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116
+    JAVACMD=`cygpath --unix "$JAVACMD"`
117 117
 
118 118
     # We build the pattern for arguments to be converted via cygpath
119 119
     ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
@@ -154,11 +154,19 @@ if $cygwin ; then
154 154
     esac
155 155
 fi
156 156
 
157
-# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158
-function splitJvmOpts() {
159
-    JVM_OPTS=("$@")
157
+# Escape application args
158
+save () {
159
+    for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160
+    echo " "
160 161
 }
161
-eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162
-JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
162
+APP_ARGS=$(save "$@")
163
+
164
+# Collect all arguments for the java command, following the shell quoting and substitution rules
165
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166
+
167
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169
+  cd "$(dirname "$0")"
170
+fi
163 171
 
164
-exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
172
+exec "$JAVACMD" "$@"

+ 4
- 10
demo/android/gradlew.bat 查看文件

@@ -8,14 +8,14 @@
8 8
 @rem Set local scope for the variables with windows NT shell
9 9
 if "%OS%"=="Windows_NT" setlocal
10 10
 
11
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12
-set DEFAULT_JVM_OPTS=
13
-
14 11
 set DIRNAME=%~dp0
15 12
 if "%DIRNAME%" == "" set DIRNAME=.
16 13
 set APP_BASE_NAME=%~n0
17 14
 set APP_HOME=%DIRNAME%
18 15
 
16
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17
+set DEFAULT_JVM_OPTS=
18
+
19 19
 @rem Find java.exe
20 20
 if defined JAVA_HOME goto findJavaFromJavaHome
21 21
 
@@ -46,10 +46,9 @@ echo location of your Java installation.
46 46
 goto fail
47 47
 
48 48
 :init
49
-@rem Get command-line arguments, handling Windowz variants
49
+@rem Get command-line arguments, handling Windows variants
50 50
 
51 51
 if not "%OS%" == "Windows_NT" goto win9xME_args
52
-if "%@eval[2+2]" == "4" goto 4NT_args
53 52
 
54 53
 :win9xME_args
55 54
 @rem Slurp the command line arguments.
@@ -60,11 +59,6 @@ set _SKIP=2
60 59
 if "x%~1" == "x" goto execute
61 60
 
62 61
 set CMD_LINE_ARGS=%*
63
-goto execute
64
-
65
-:4NT_args
66
-@rem Get arguments from the 4NT Shell from JP Software
67
-set CMD_LINE_ARGS=%$
68 62
 
69 63
 :execute
70 64
 @rem Setup the command line

+ 3
- 0
demo/babel.config.js 查看文件

@@ -0,0 +1,3 @@
1
+module.exports = {
2
+  presets: ["module:metro-react-native-babel-preset"]
3
+}

+ 7
- 6
demo/index.js 查看文件

@@ -1,11 +1,12 @@
1
-/** @format */
2
-
3
-'use strict'
1
+/**
2
+ * @format
3
+ * @lint-ignore-every XPLATJSCOPYRIGHT1
4
+ */
4 5
 
5 6
 import { AppRegistry } from 'react-native';
6 7
 
7
-import Explorer from './App';
8
+import App from './App';
8 9
 
9
-import {name as appName} from './app.json';
10
+import { name as appName } from './app.json';
10 11
 
11
-AppRegistry.registerComponent(appName, () => Explorer);
12
+AppRegistry.registerComponent(appName, () => App);

+ 38
- 16
demo/ios/demo.xcodeproj/project.pbxproj 查看文件

@@ -13,6 +13,7 @@
13 13
 		00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; };
14 14
 		00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; };
15 15
 		00E356F31AD99517003FC87E /* demoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* demoTests.m */; };
16
+		11D1A2F320CAFA9E000508D9 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; };
16 17
 		133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; };
17 18
 		139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; };
18 19
 		139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; };
@@ -35,10 +36,10 @@
35 36
 		2D16E6881FA4F8E400B85C8A /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D16E6891FA4F8E400B85C8A /* libReact.a */; };
36 37
 		2DCD954D1E0B4F2C00145EB5 /* demoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* demoTests.m */; };
37 38
 		2DF0FFEE2056DD460020B375 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3EA31DF850E9000B6D8A /* libReact.a */; };
38
-		37C4D8D1212434D7009B8FF3 /* demo.css in Resources */ = {isa = PBXBuildFile; fileRef = 37C4D8D0212434D7009B8FF3 /* demo.css */; };
39
-		5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; };
40 39
 		832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
41 40
 		ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */; };
41
+		ED297163215061F000B7C4FE /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ED297162215061F000B7C4FE /* JavaScriptCore.framework */; };
42
+		ED2971652150620600B7C4FE /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ED2971642150620600B7C4FE /* JavaScriptCore.framework */; };
42 43
 /* End PBXBuildFile section */
43 44
 
44 45
 /* Begin PBXContainerItemProxy section */
@@ -340,11 +341,12 @@
340 341
 		2D02E47B1E0B4A5D006451C7 /* demo-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "demo-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
341 342
 		2D02E4901E0B4A5D006451C7 /* demo-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "demo-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
342 343
 		2D16E6891FA4F8E400B85C8A /* libReact.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libReact.a; sourceTree = BUILT_PRODUCTS_DIR; };
343
-		37C4D8D0212434D7009B8FF3 /* demo.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = demo.css; sourceTree = "<group>"; };
344 344
 		5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = "<group>"; };
345 345
 		78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; };
346 346
 		832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; };
347 347
 		ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = "<group>"; };
348
+		ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
349
+		ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; };
348 350
 /* End PBXFileReference section */
349 351
 
350 352
 /* Begin PBXFrameworksBuildPhase section */
@@ -360,10 +362,10 @@
360 362
 			isa = PBXFrameworksBuildPhase;
361 363
 			buildActionMask = 2147483647;
362 364
 			files = (
365
+				ED297163215061F000B7C4FE /* JavaScriptCore.framework in Frameworks */,
363 366
 				ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */,
364
-				5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */,
367
+				11D1A2F320CAFA9E000508D9 /* libRCTAnimation.a in Frameworks */,
365 368
 				146834051AC3E58100842450 /* libReact.a in Frameworks */,
366
-				5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */,
367 369
 				00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */,
368 370
 				00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */,
369 371
 				00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */,
@@ -380,6 +382,7 @@
380 382
 			isa = PBXFrameworksBuildPhase;
381 383
 			buildActionMask = 2147483647;
382 384
 			files = (
385
+				ED2971652150620600B7C4FE /* JavaScriptCore.framework in Frameworks */,
383 386
 				2D16E6881FA4F8E400B85C8A /* libReact.a in Frameworks */,
384 387
 				2D02E4C21E0B4AEC006451C7 /* libRCTAnimation.a in Frameworks */,
385 388
 				2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */,
@@ -484,7 +487,6 @@
484 487
 		13B07FAE1A68108700A75B9A /* demo */ = {
485 488
 			isa = PBXGroup;
486 489
 			children = (
487
-				37C4D8CF2124349B009B8FF3 /* webAssets */,
488 490
 				008F07F21AC5B25A0029DE68 /* main.jsbundle */,
489 491
 				13B07FAF1A68108700A75B9A /* AppDelegate.h */,
490 492
 				13B07FB01A68108700A75B9A /* AppDelegate.m */,
@@ -522,19 +524,13 @@
522 524
 		2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
523 525
 			isa = PBXGroup;
524 526
 			children = (
527
+				ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
528
+				ED2971642150620600B7C4FE /* JavaScriptCore.framework */,
525 529
 				2D16E6891FA4F8E400B85C8A /* libReact.a */,
526 530
 			);
527 531
 			name = Frameworks;
528 532
 			sourceTree = "<group>";
529 533
 		};
530
-		37C4D8CF2124349B009B8FF3 /* webAssets */ = {
531
-			isa = PBXGroup;
532
-			children = (
533
-				37C4D8D0212434D7009B8FF3 /* demo.css */,
534
-			);
535
-			path = webAssets;
536
-			sourceTree = "<group>";
537
-		};
538 534
 		5E91572E1DD0AC6500FF2AA8 /* Products */ = {
539 535
 			isa = PBXGroup;
540 536
 			children = (
@@ -696,7 +692,7 @@
696 692
 		83CBB9F71A601CBA00E9B192 /* Project object */ = {
697 693
 			isa = PBXProject;
698 694
 			attributes = {
699
-				LastUpgradeCheck = 0610;
695
+				LastUpgradeCheck = 0940;
700 696
 				ORGANIZATIONNAME = Facebook;
701 697
 				TargetAttributes = {
702 698
 					00E356ED1AD99517003FC87E = {
@@ -1059,7 +1055,6 @@
1059 1055
 			isa = PBXResourcesBuildPhase;
1060 1056
 			buildActionMask = 2147483647;
1061 1057
 			files = (
1062
-				37C4D8D1212434D7009B8FF3 /* demo.css in Resources */,
1063 1058
 				13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
1064 1059
 				13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
1065 1060
 			);
@@ -1191,6 +1186,7 @@
1191 1186
 					"-ObjC",
1192 1187
 					"-lc++",
1193 1188
 				);
1189
+				PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
1194 1190
 				PRODUCT_NAME = "$(TARGET_NAME)";
1195 1191
 				TEST_HOST = "$(BUILT_PRODUCTS_DIR)/demo.app/demo";
1196 1192
 			};
@@ -1208,6 +1204,7 @@
1208 1204
 					"-ObjC",
1209 1205
 					"-lc++",
1210 1206
 				);
1207
+				PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
1211 1208
 				PRODUCT_NAME = "$(TARGET_NAME)";
1212 1209
 				TEST_HOST = "$(BUILT_PRODUCTS_DIR)/demo.app/demo";
1213 1210
 			};
@@ -1226,6 +1223,7 @@
1226 1223
 					"-ObjC",
1227 1224
 					"-lc++",
1228 1225
 				);
1226
+				PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
1229 1227
 				PRODUCT_NAME = demo;
1230 1228
 				VERSIONING_SYSTEM = "apple-generic";
1231 1229
 			};
@@ -1243,6 +1241,7 @@
1243 1241
 					"-ObjC",
1244 1242
 					"-lc++",
1245 1243
 				);
1244
+				PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
1246 1245
 				PRODUCT_NAME = demo;
1247 1246
 				VERSIONING_SYSTEM = "apple-generic";
1248 1247
 			};
@@ -1358,20 +1357,32 @@
1358 1357
 				CLANG_CXX_LIBRARY = "libc++";
1359 1358
 				CLANG_ENABLE_MODULES = YES;
1360 1359
 				CLANG_ENABLE_OBJC_ARC = YES;
1360
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
1361 1361
 				CLANG_WARN_BOOL_CONVERSION = YES;
1362
+				CLANG_WARN_COMMA = YES;
1362 1363
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
1364
+				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
1363 1365
 				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
1364 1366
 				CLANG_WARN_EMPTY_BODY = YES;
1365 1367
 				CLANG_WARN_ENUM_CONVERSION = YES;
1368
+				CLANG_WARN_INFINITE_RECURSION = YES;
1366 1369
 				CLANG_WARN_INT_CONVERSION = YES;
1370
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
1371
+				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
1372
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
1367 1373
 				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
1374
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
1375
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
1376
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
1368 1377
 				CLANG_WARN_UNREACHABLE_CODE = YES;
1369 1378
 				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
1370 1379
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
1371 1380
 				COPY_PHASE_STRIP = NO;
1372 1381
 				ENABLE_STRICT_OBJC_MSGSEND = YES;
1382
+				ENABLE_TESTABILITY = YES;
1373 1383
 				GCC_C_LANGUAGE_STANDARD = gnu99;
1374 1384
 				GCC_DYNAMIC_NO_PIC = NO;
1385
+				GCC_NO_COMMON_BLOCKS = YES;
1375 1386
 				GCC_OPTIMIZATION_LEVEL = 0;
1376 1387
 				GCC_PREPROCESSOR_DEFINITIONS = (
1377 1388
 					"DEBUG=1",
@@ -1399,13 +1410,23 @@
1399 1410
 				CLANG_CXX_LIBRARY = "libc++";
1400 1411
 				CLANG_ENABLE_MODULES = YES;
1401 1412
 				CLANG_ENABLE_OBJC_ARC = YES;
1413
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
1402 1414
 				CLANG_WARN_BOOL_CONVERSION = YES;
1415
+				CLANG_WARN_COMMA = YES;
1403 1416
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
1417
+				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
1404 1418
 				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
1405 1419
 				CLANG_WARN_EMPTY_BODY = YES;
1406 1420
 				CLANG_WARN_ENUM_CONVERSION = YES;
1421
+				CLANG_WARN_INFINITE_RECURSION = YES;
1407 1422
 				CLANG_WARN_INT_CONVERSION = YES;
1423
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
1424
+				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
1425
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
1408 1426
 				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
1427
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
1428
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
1429
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
1409 1430
 				CLANG_WARN_UNREACHABLE_CODE = YES;
1410 1431
 				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
1411 1432
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -1413,6 +1434,7 @@
1413 1434
 				ENABLE_NS_ASSERTIONS = NO;
1414 1435
 				ENABLE_STRICT_OBJC_MSGSEND = YES;
1415 1436
 				GCC_C_LANGUAGE_STANDARD = gnu99;
1437
+				GCC_NO_COMMON_BLOCKS = YES;
1416 1438
 				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
1417 1439
 				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
1418 1440
 				GCC_WARN_UNDECLARED_SELECTOR = YES;

+ 1
- 1
demo/ios/demo.xcodeproj/xcshareddata/xcschemes/demo-tvOS.xcscheme 查看文件

@@ -1,6 +1,6 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <Scheme
3
-   LastUpgradeVersion = "0820"
3
+   LastUpgradeVersion = "0940"
4 4
    version = "1.3">
5 5
    <BuildAction
6 6
       parallelizeBuildables = "NO"

+ 1
- 1
demo/ios/demo.xcodeproj/xcshareddata/xcschemes/demo.xcscheme 查看文件

@@ -1,6 +1,6 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <Scheme
3
-   LastUpgradeVersion = "0620"
3
+   LastUpgradeVersion = "0940"
4 4
    version = "1.3">
5 5
    <BuildAction
6 6
       parallelizeBuildables = "NO"

+ 1
- 1
demo/ios/demo/AppDelegate.h 查看文件

@@ -1,5 +1,5 @@
1 1
 /**
2
- * Copyright (c) 2015-present, Facebook, Inc.
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3 3
  *
4 4
  * This source code is licensed under the MIT license found in the
5 5
  * LICENSE file in the root directory of this source tree.

+ 2
- 2
demo/ios/demo/AppDelegate.m 查看文件

@@ -1,5 +1,5 @@
1 1
 /**
2
- * Copyright (c) 2015-present, Facebook, Inc.
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3 3
  *
4 4
  * This source code is licensed under the MIT license found in the
5 5
  * LICENSE file in the root directory of this source tree.
@@ -22,7 +22,7 @@
22 22
                                                       moduleName:@"demo"
23 23
                                                initialProperties:nil
24 24
                                                    launchOptions:launchOptions];
25
-  rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
25
+  rootView.backgroundColor = [UIColor blackColor];
26 26
 
27 27
   self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
28 28
   UIViewController *rootViewController = [UIViewController new];

+ 5
- 1
demo/ios/demo/Info.plist 查看文件

@@ -9,7 +9,7 @@
9 9
 	<key>CFBundleExecutable</key>
10 10
 	<string>$(EXECUTABLE_NAME)</string>
11 11
 	<key>CFBundleIdentifier</key>
12
-	<string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string>
12
+	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
13 13
 	<key>CFBundleInfoDictionaryVersion</key>
14 14
 	<string>6.0</string>
15 15
 	<key>CFBundleName</key>
@@ -24,6 +24,8 @@
24 24
 	<string>1</string>
25 25
 	<key>LSRequiresIPhoneOS</key>
26 26
 	<true/>
27
+	<key>NSLocationWhenInUseUsageDescription</key>
28
+	<string></string>
27 29
 	<key>UILaunchStoryboardName</key>
28 30
 	<string>LaunchScreen</string>
29 31
 	<key>UIRequiredDeviceCapabilities</key>
@@ -43,6 +45,8 @@
43 45
 	<key>NSAppTransportSecurity</key>
44 46
 	<!--See http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/ -->
45 47
 	<dict>
48
+    <key>NSAllowsArbitraryLoads</key>
49
+    <true/>
46 50
 		<key>NSExceptionDomains</key>
47 51
 		<dict>
48 52
 			<key>localhost</key>

+ 1
- 1
demo/ios/demo/main.m 查看文件

@@ -1,5 +1,5 @@
1 1
 /**
2
- * Copyright (c) 2015-present, Facebook, Inc.
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3 3
  *
4 4
  * This source code is licensed under the MIT license found in the
5 5
  * LICENSE file in the root directory of this source tree.

+ 1
- 1
demo/ios/demoTests/Info.plist 查看文件

@@ -7,7 +7,7 @@
7 7
 	<key>CFBundleExecutable</key>
8 8
 	<string>$(EXECUTABLE_NAME)</string>
9 9
 	<key>CFBundleIdentifier</key>
10
-	<string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string>
10
+	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11 11
 	<key>CFBundleInfoDictionaryVersion</key>
12 12
 	<string>6.0</string>
13 13
 	<key>CFBundleName</key>

+ 1
- 1
demo/ios/demoTests/demoTests.m 查看文件

@@ -1,5 +1,5 @@
1 1
 /**
2
- * Copyright (c) 2015-present, Facebook, Inc.
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3 3
  *
4 4
  * This source code is licensed under the MIT license found in the
5 5
  * LICENSE file in the root directory of this source tree.

+ 0
- 3
demo/ios/webAssets/demo.css 查看文件

@@ -1,3 +0,0 @@
1
-.localStyle {
2
-    font-weight: bold;
3
-}

+ 0
- 8263
demo/package-lock.json
文件差异内容过多而无法显示
查看文件


+ 6
- 5
demo/package.json 查看文件

@@ -7,16 +7,17 @@
7 7
     "test": "jest"
8 8
   },
9 9
   "dependencies": {
10
-    "@babel/core": "^7.1.2",
11 10
     "react": "16.6.3",
12
-    "react-native": "0.57.8"
11
+    "react-native": "0.58.3"
13 12
   },
14 13
   "devDependencies": {
15
-    "jest": "23.6.0",
16
-    "metro-react-native-babel-preset": "^0.48.1",
14
+    "babel-core": "^7.0.0-bridge.0",
15
+    "babel-jest": "24.0.0",
16
+    "jest": "24.0.0",
17
+    "metro-react-native-babel-preset": "0.51.1",
17 18
     "react-test-renderer": "16.6.3"
18 19
   },
19 20
   "jest": {
20 21
     "preset": "react-native"
21 22
   }
22
-}
23
+}

+ 1450
- 1126
demo/yarn.lock
文件差异内容过多而无法显示
查看文件