Browse Source

upgrade rn to 0.60.0 for demo; upgrade react-native-webview to 6.3.1 for demo

iou90 5 years ago
parent
commit
d661931f62

+ 4
- 0
demo/.eslintrc.js View File

@@ -0,0 +1,4 @@
1
+module.exports = {
2
+  root: true,
3
+  extends: '@react-native-community',
4
+};

+ 44
- 15
demo/.flowconfig View File

@@ -11,20 +11,26 @@
11 11
 ; Ignore duplicate module providers
12 12
 ; For RN Apps installed via npm, "Libraries" folder is inside
13 13
 ; "node_modules/react-native" but in the source repo it is in the root
14
-.*/Libraries/react-native/React.js
14
+node_modules/react-native/Libraries/react-native/React.js
15 15
 
16 16
 ; Ignore polyfills
17
-.*/Libraries/polyfills/.*
17
+node_modules/react-native/Libraries/polyfills/.*
18 18
 
19
-; Ignore metro
20
-.*/node_modules/metro/.*
19
+; These should not be required directly
20
+; require from fbjs/lib instead: require('fbjs/lib/warning')
21
+node_modules/warning/.*
22
+
23
+; Flow doesn't support platforms
24
+.*/Libraries/Utilities/HMRLoadingView.js
25
+
26
+[untyped]
27
+.*/node_modules/@react-native-community/cli/.*/.*
21 28
 
22 29
 [include]
23 30
 
24 31
 [libs]
25 32
 node_modules/react-native/Libraries/react-native/react-native-interface.js
26 33
 node_modules/react-native/flow/
27
-node_modules/react-native/flow-github/
28 34
 
29 35
 [options]
30 36
 emoji=true
@@ -32,6 +38,10 @@ emoji=true
32 38
 esproposal.optional_chaining=enable
33 39
 esproposal.nullish_coalescing=enable
34 40
 
41
+module.file_ext=.js
42
+module.file_ext=.json
43
+module.file_ext=.ios.js
44
+
35 45
 module.system=haste
36 46
 module.system.haste.use_name_reducers=true
37 47
 # get basename
@@ -44,27 +54,46 @@ module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
44 54
 module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
45 55
 module.system.haste.paths.blacklist=.*/__tests__/.*
46 56
 module.system.haste.paths.blacklist=.*/__mocks__/.*
47
-module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*
48 57
 module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.*
58
+module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/RNTester/.*
59
+module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/IntegrationTests/.*
60
+module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/react-native/react-native-implementation.js
61
+module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*
49 62
 
50 63
 munge_underscores=true
51 64
 
52 65
 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'
53 66
 
54
-module.file_ext=.js
55
-module.file_ext=.jsx
56
-module.file_ext=.json
57
-module.file_ext=.native.js
58
-
59 67
 suppress_type=$FlowIssue
60 68
 suppress_type=$FlowFixMe
61 69
 suppress_type=$FlowFixMeProps
62 70
 suppress_type=$FlowFixMeState
63 71
 
64
-suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
65
-suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
66
-suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
72
+suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
73
+suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
67 74
 suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
68 75
 
76
+[lints]
77
+sketchy-null-number=warn
78
+sketchy-null-mixed=warn
79
+sketchy-number=warn
80
+untyped-type-import=warn
81
+nonstrict-import=warn
82
+deprecated-type=warn
83
+unsafe-getters-setters=warn
84
+inexact-spread=warn
85
+unnecessary-invariant=warn
86
+signature-verification-failure=warn
87
+deprecated-utility=error
88
+
89
+[strict]
90
+deprecated-type
91
+nonstrict-import
92
+sketchy-null
93
+unclear-type
94
+unsafe-getters-setters
95
+untyped-import
96
+untyped-type-import
97
+
69 98
 [version]
70
-^0.86.0
99
+^0.98.0

+ 3
- 0
demo/.gitignore View File

@@ -54,3 +54,6 @@ buck-out/
54 54
 
55 55
 # Bundle artifact
56 56
 *.jsbundle
57
+
58
+# CocoaPods
59
+/ios/Pods/

demo/__tests__/App.js → demo/__tests__/App-test.js View File

@@ -1,6 +1,5 @@
1 1
 /**
2 2
  * @format
3
- * @lint-ignore-every XPLATJSCOPYRIGHT1
4 3
  */
5 4
 
6 5
 import 'react-native';

+ 43
- 5
demo/android/app/build.gradle View File

@@ -18,6 +18,9 @@ import com.android.build.OutputFile
18 18
  *   // the entry file for bundle generation
19 19
  *   entryFile: "index.android.js",
20 20
  *
21
+ *   // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format
22
+ *   bundleCommand: "ram-bundle",
23
+ *
21 24
  *   // whether to bundle JS and assets in debug mode
22 25
  *   bundleInDebug: false,
23 26
  *
@@ -93,9 +96,22 @@ def enableSeparateBuildPerCPUArchitecture = false
93 96
  */
94 97
 def enableProguardInReleaseBuilds = false
95 98
 
99
+/**
100
+ * Use international variant JavaScriptCore
101
+ * International variant includes ICU i18n library and necessary data allowing to use
102
+ * e.g. Date.toLocaleString and String.localeCompare that give correct results
103
+ * when using with locales other than en-US.
104
+ * Note that this variant is about 6MiB larger per architecture than default.
105
+ */
106
+def useIntlJsc = false
107
+
96 108
 android {
97 109
     compileSdkVersion rootProject.ext.compileSdkVersion
98
-    buildToolsVersion rootProject.ext.buildToolsVersion
110
+
111
+    compileOptions {
112
+        sourceCompatibility JavaVersion.VERSION_1_8
113
+        targetCompatibility JavaVersion.VERSION_1_8
114
+    }
99 115
 
100 116
     defaultConfig {
101 117
         applicationId "com.demo"
@@ -109,11 +125,25 @@ android {
109 125
             reset()
110 126
             enable enableSeparateBuildPerCPUArchitecture
111 127
             universalApk false  // If true, also generate a universal APK
112
-            include "armeabi-v7a", "x86", "arm64-v8a"
128
+            include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
129
+        }
130
+    }
131
+    signingConfigs {
132
+        debug {
133
+            storeFile file('debug.keystore')
134
+            storePassword 'android'
135
+            keyAlias 'androiddebugkey'
136
+            keyPassword 'android'
113 137
         }
114 138
     }
115 139
     buildTypes {
140
+        debug {
141
+            signingConfig signingConfigs.debug
142
+        }
116 143
         release {
144
+            // Caution! In production, you need to generate your own keystore file.
145
+            // see https://facebook.github.io/react-native/docs/signed-apk-android.
146
+            signingConfig signingConfigs.debug
117 147
             minifyEnabled enableProguardInReleaseBuilds
118 148
             proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
119 149
         }
@@ -122,8 +152,8 @@ android {
122 152
     applicationVariants.all { variant ->
123 153
         variant.outputs.each { output ->
124 154
             // For each separate APK per architecture, set a unique version code as described here:
125
-            // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
126
-            def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3]
155
+            // https://developer.android.com/studio/build/configure-apk-splits.html
156
+            def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
127 157
             def abi = output.getFilter(OutputFile.ABI)
128 158
             if (abi != null) {  // null for the universal-debug, universal-release variants
129 159
                 output.versionCodeOverride =
@@ -136,8 +166,14 @@ android {
136 166
 dependencies {
137 167
     implementation project(':react-native-webview')
138 168
     implementation fileTree(dir: "libs", include: ["*.jar"])
139
-    implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
140 169
     implementation "com.facebook.react:react-native:+"  // From node_modules
170
+
171
+    // JSC from node_modules
172
+    if (useIntlJsc) {
173
+        implementation 'org.webkit:android-jsc-intl:+'
174
+    } else {
175
+        implementation 'org.webkit:android-jsc:+'
176
+    }
141 177
 }
142 178
 
143 179
 // Run this once to be able to run the application with BUCK
@@ -146,3 +182,5 @@ task copyDownloadableDepsToLibs(type: Copy) {
146 182
     from configurations.compile
147 183
     into 'libs'
148 184
 }
185
+
186
+apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

+ 0
- 7
demo/android/app/proguard-rules.pro View File

@@ -8,10 +8,3 @@
8 8
 #   http://developer.android.com/guide/developing/tools/proguard.html
9 9
 
10 10
 # Add any project specific keep options here:
11
-
12
-# If your project uses WebView with JS, uncomment the following
13
-# and specify the fully qualified class name to the JavaScript interface
14
-# class:
15
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16
-#   public *;
17
-#}

+ 8
- 0
demo/android/app/src/debug/AndroidManifest.xml View File

@@ -0,0 +1,8 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
+    xmlns:tools="http://schemas.android.com/tools">
4
+
5
+    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
6
+
7
+    <application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" />
8
+</manifest>

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

@@ -2,7 +2,6 @@
2 2
   package="com.demo">
3 3
 
4 4
     <uses-permission android:name="android.permission.INTERNET" />
5
-    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
6 5
 
7 6
     <application
8 7
       android:name=".MainApplication"

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

@@ -2,14 +2,13 @@ package com.demo;
2 2
 
3 3
 import android.app.Application;
4 4
 
5
+import com.facebook.react.PackageList;
5 6
 import com.facebook.react.ReactApplication;
6 7
 import com.reactnativecommunity.webview.RNCWebViewPackage;
7 8
 import com.facebook.react.ReactNativeHost;
8 9
 import com.facebook.react.ReactPackage;
9
-import com.facebook.react.shell.MainReactPackage;
10 10
 import com.facebook.soloader.SoLoader;
11 11
 
12
-import java.util.Arrays;
13 12
 import java.util.List;
14 13
 
15 14
 public class MainApplication extends Application implements ReactApplication {
@@ -22,10 +21,11 @@ public class MainApplication extends Application implements ReactApplication {
22 21
 
23 22
     @Override
24 23
     protected List<ReactPackage> getPackages() {
25
-      return Arrays.<ReactPackage>asList(
26
-          new MainReactPackage(),
27
-            new RNCWebViewPackage()
28
-      );
24
+      @SuppressWarnings("UnnecessaryLocalVariable")
25
+      List<ReactPackage> packages = new PackageList(this).getPackages();
26
+      // Packages that cannot be autolinked yet can be added manually here, for example:
27
+      // packages.add(new MyReactNativePackage());
28
+      return packages;
29 29
     }
30 30
 
31 31
     @Override

+ 1
- 0
demo/android/app/src/main/res/values/styles.xml View File

@@ -3,6 +3,7 @@
3 3
     <!-- Base application theme. -->
4 4
     <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
5 5
         <!-- Customize your theme here. -->
6
+        <item name="android:textColor">#000000</item>
6 7
     </style>
7 8
 
8 9
 </resources>

+ 11
- 12
demo/android/build.gradle View File

@@ -2,10 +2,10 @@
2 2
 
3 3
 buildscript {
4 4
     ext {
5
-        buildToolsVersion = "28.0.2"
5
+        buildToolsVersion = "28.0.3"
6 6
         minSdkVersion = 16
7 7
         compileSdkVersion = 28
8
-        targetSdkVersion = 27
8
+        targetSdkVersion = 28
9 9
         supportLibVersion = "28.0.0"
10 10
     }
11 11
     repositories {
@@ -13,7 +13,7 @@ buildscript {
13 13
         jcenter()
14 14
     }
15 15
     dependencies {
16
-        classpath 'com.android.tools.build:gradle:3.3.0'
16
+        classpath("com.android.tools.build:gradle:3.4.1")
17 17
 
18 18
         // NOTE: Do not place your application dependencies here; they belong
19 19
         // in the individual module build.gradle files
@@ -23,17 +23,16 @@ buildscript {
23 23
 allprojects {
24 24
     repositories {
25 25
         mavenLocal()
26
-        google()
27
-        jcenter()
28 26
         maven {
29 27
             // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
30
-            url "$rootDir/../node_modules/react-native/android"
28
+            url("$rootDir/../node_modules/react-native/android")
29
+        }
30
+        maven {
31
+            // Android JSC is installed from npm
32
+            url("$rootDir/../node_modules/jsc-android/dist")
31 33
         }
32
-    }
33
-}
34
-
35 34
 
36
-task wrapper(type: Wrapper) {
37
-    gradleVersion = '4.7'
38
-    distributionUrl = distributionUrl.replace("bin", "all")
35
+        google()
36
+        jcenter()
37
+    }
39 38
 }

+ 3
- 0
demo/android/gradle.properties View File

@@ -16,3 +16,6 @@
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.useAndroidX=true
21
+android.enableJetifier=true

BIN
demo/android/gradle/wrapper/gradle-wrapper.jar View File


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

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

+ 17
- 1
demo/android/gradlew View File

@@ -1,5 +1,21 @@
1 1
 #!/usr/bin/env sh
2 2
 
3
+#
4
+# Copyright 2015 the original author or authors.
5
+#
6
+# Licensed under the Apache License, Version 2.0 (the "License");
7
+# you may not use this file except in compliance with the License.
8
+# You may obtain a copy of the License at
9
+#
10
+#      http://www.apache.org/licenses/LICENSE-2.0
11
+#
12
+# Unless required by applicable law or agreed to in writing, software
13
+# distributed under the License is distributed on an "AS IS" BASIS,
14
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+# See the License for the specific language governing permissions and
16
+# limitations under the License.
17
+#
18
+
3 19
 ##############################################################################
4 20
 ##
5 21
 ##  Gradle start up script for UN*X
@@ -28,7 +44,7 @@ APP_NAME="Gradle"
28 44
 APP_BASE_NAME=`basename "$0"`
29 45
 
30 46
 # 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=""
47
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
32 48
 
33 49
 # Use the maximum available, or set MAX_FD != -1 to use that value.
34 50
 MAX_FD="maximum"

+ 17
- 1
demo/android/gradlew.bat View File

@@ -1,3 +1,19 @@
1
+@rem
2
+@rem Copyright 2015 the original author or authors.
3
+@rem
4
+@rem Licensed under the Apache License, Version 2.0 (the "License");
5
+@rem you may not use this file except in compliance with the License.
6
+@rem You may obtain a copy of the License at
7
+@rem
8
+@rem      http://www.apache.org/licenses/LICENSE-2.0
9
+@rem
10
+@rem Unless required by applicable law or agreed to in writing, software
11
+@rem distributed under the License is distributed on an "AS IS" BASIS,
12
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+@rem See the License for the specific language governing permissions and
14
+@rem limitations under the License.
15
+@rem
16
+
1 17
 @if "%DEBUG%" == "" @echo off
2 18
 @rem ##########################################################################
3 19
 @rem
@@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0
14 30
 set APP_HOME=%DIRNAME%
15 31
 
16 32
 @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=
33
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
18 34
 
19 35
 @rem Find java.exe
20 36
 if defined JAVA_HOME goto findJavaFromJavaHome

+ 0
- 8
demo/android/keystores/BUCK View File

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

+ 0
- 4
demo/android/keystores/debug.keystore.properties View File

@@ -1,4 +0,0 @@
1
-key.store=debug.keystore
2
-key.alias=androiddebugkey
3
-key.store.password=android
4
-key.alias.password=android

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

@@ -1,5 +1,5 @@
1 1
 rootProject.name = 'demo'
2 2
 include ':react-native-webview'
3 3
 project(':react-native-webview').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-webview/android')
4
-
4
+apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
5 5
 include ':app'

+ 2
- 2
demo/babel.config.js View File

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

+ 1
- 6
demo/index.js View File

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

+ 50
- 0
demo/ios/Podfile View File

@@ -0,0 +1,50 @@
1
+platform :ios, '9.0'
2
+require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
3
+
4
+target 'demo' do
5
+  # Pods for demo
6
+  pod 'React', :path => '../node_modules/react-native/'
7
+  pod 'React-Core', :path => '../node_modules/react-native/React'
8
+  pod 'React-DevSupport', :path => '../node_modules/react-native/React'
9
+  pod 'React-fishhook', :path => '../node_modules/react-native/Libraries/fishhook'
10
+  pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
11
+  pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
12
+  pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
13
+  pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
14
+  pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
15
+  pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
16
+  pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
17
+  pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
18
+  pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
19
+  pod 'React-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket'
20
+
21
+  pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
22
+  pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
23
+  pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
24
+  pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
25
+  pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
26
+
27
+  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
28
+  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
29
+  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
30
+
31
+
32
+  pod 'react-native-webview', :path => '../node_modules/react-native-webview'
33
+
34
+  target 'demoTests' do
35
+    inherit! :search_paths
36
+    # Pods for testing
37
+  end
38
+
39
+  use_native_modules!
40
+end
41
+
42
+target 'demo-tvOS' do
43
+  # Pods for demo-tvOS
44
+
45
+  target 'demo-tvOSTests' do
46
+    inherit! :search_paths
47
+    # Pods for testing
48
+  end
49
+
50
+end

+ 193
- 0
demo/ios/Podfile.lock View File

@@ -0,0 +1,193 @@
1
+PODS:
2
+  - boost-for-react-native (1.63.0)
3
+  - DoubleConversion (1.1.6)
4
+  - Folly (2018.10.22.00):
5
+    - boost-for-react-native
6
+    - DoubleConversion
7
+    - Folly/Default (= 2018.10.22.00)
8
+    - glog
9
+  - Folly/Default (2018.10.22.00):
10
+    - boost-for-react-native
11
+    - DoubleConversion
12
+    - glog
13
+  - glog (0.3.5)
14
+  - React (0.60.0):
15
+    - React-Core (= 0.60.0)
16
+    - React-DevSupport (= 0.60.0)
17
+    - React-RCTActionSheet (= 0.60.0)
18
+    - React-RCTAnimation (= 0.60.0)
19
+    - React-RCTBlob (= 0.60.0)
20
+    - React-RCTImage (= 0.60.0)
21
+    - React-RCTLinking (= 0.60.0)
22
+    - React-RCTNetwork (= 0.60.0)
23
+    - React-RCTSettings (= 0.60.0)
24
+    - React-RCTText (= 0.60.0)
25
+    - React-RCTVibration (= 0.60.0)
26
+    - React-RCTWebSocket (= 0.60.0)
27
+  - React-Core (0.60.0):
28
+    - Folly (= 2018.10.22.00)
29
+    - React-cxxreact (= 0.60.0)
30
+    - React-jsiexecutor (= 0.60.0)
31
+    - yoga (= 0.60.0.React)
32
+  - React-cxxreact (0.60.0):
33
+    - boost-for-react-native (= 1.63.0)
34
+    - DoubleConversion
35
+    - Folly (= 2018.10.22.00)
36
+    - glog
37
+    - React-jsinspector (= 0.60.0)
38
+  - React-DevSupport (0.60.0):
39
+    - React-Core (= 0.60.0)
40
+    - React-RCTWebSocket (= 0.60.0)
41
+  - React-fishhook (0.60.0)
42
+  - React-jsi (0.60.0):
43
+    - boost-for-react-native (= 1.63.0)
44
+    - DoubleConversion
45
+    - Folly (= 2018.10.22.00)
46
+    - glog
47
+    - React-jsi/Default (= 0.60.0)
48
+  - React-jsi/Default (0.60.0):
49
+    - boost-for-react-native (= 1.63.0)
50
+    - DoubleConversion
51
+    - Folly (= 2018.10.22.00)
52
+    - glog
53
+  - React-jsiexecutor (0.60.0):
54
+    - DoubleConversion
55
+    - Folly (= 2018.10.22.00)
56
+    - glog
57
+    - React-cxxreact (= 0.60.0)
58
+    - React-jsi (= 0.60.0)
59
+  - React-jsinspector (0.60.0)
60
+  - react-native-webview (6.3.1):
61
+    - React
62
+  - React-RCTActionSheet (0.60.0):
63
+    - React-Core (= 0.60.0)
64
+  - React-RCTAnimation (0.60.0):
65
+    - React-Core (= 0.60.0)
66
+  - React-RCTBlob (0.60.0):
67
+    - React-Core (= 0.60.0)
68
+    - React-RCTNetwork (= 0.60.0)
69
+    - React-RCTWebSocket (= 0.60.0)
70
+  - React-RCTImage (0.60.0):
71
+    - React-Core (= 0.60.0)
72
+    - React-RCTNetwork (= 0.60.0)
73
+  - React-RCTLinking (0.60.0):
74
+    - React-Core (= 0.60.0)
75
+  - React-RCTNetwork (0.60.0):
76
+    - React-Core (= 0.60.0)
77
+  - React-RCTSettings (0.60.0):
78
+    - React-Core (= 0.60.0)
79
+  - React-RCTText (0.60.0):
80
+    - React-Core (= 0.60.0)
81
+  - React-RCTVibration (0.60.0):
82
+    - React-Core (= 0.60.0)
83
+  - React-RCTWebSocket (0.60.0):
84
+    - React-Core (= 0.60.0)
85
+    - React-fishhook (= 0.60.0)
86
+  - yoga (0.60.0.React)
87
+
88
+DEPENDENCIES:
89
+  - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
90
+  - Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`)
91
+  - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
92
+  - React (from `../node_modules/react-native/`)
93
+  - React-Core (from `../node_modules/react-native/React`)
94
+  - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`)
95
+  - React-DevSupport (from `../node_modules/react-native/React`)
96
+  - React-fishhook (from `../node_modules/react-native/Libraries/fishhook`)
97
+  - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`)
98
+  - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`)
99
+  - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
100
+  - react-native-webview (from `../node_modules/react-native-webview`)
101
+  - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
102
+  - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`)
103
+  - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`)
104
+  - React-RCTImage (from `../node_modules/react-native/Libraries/Image`)
105
+  - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`)
106
+  - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`)
107
+  - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`)
108
+  - React-RCTText (from `../node_modules/react-native/Libraries/Text`)
109
+  - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`)
110
+  - React-RCTWebSocket (from `../node_modules/react-native/Libraries/WebSocket`)
111
+  - yoga (from `../node_modules/react-native/ReactCommon/yoga`)
112
+
113
+SPEC REPOS:
114
+  https://github.com/cocoapods/specs.git:
115
+    - boost-for-react-native
116
+
117
+EXTERNAL SOURCES:
118
+  DoubleConversion:
119
+    :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
120
+  Folly:
121
+    :podspec: "../node_modules/react-native/third-party-podspecs/Folly.podspec"
122
+  glog:
123
+    :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
124
+  React:
125
+    :path: "../node_modules/react-native/"
126
+  React-Core:
127
+    :path: "../node_modules/react-native/React"
128
+  React-cxxreact:
129
+    :path: "../node_modules/react-native/ReactCommon/cxxreact"
130
+  React-DevSupport:
131
+    :path: "../node_modules/react-native/React"
132
+  React-fishhook:
133
+    :path: "../node_modules/react-native/Libraries/fishhook"
134
+  React-jsi:
135
+    :path: "../node_modules/react-native/ReactCommon/jsi"
136
+  React-jsiexecutor:
137
+    :path: "../node_modules/react-native/ReactCommon/jsiexecutor"
138
+  React-jsinspector:
139
+    :path: "../node_modules/react-native/ReactCommon/jsinspector"
140
+  react-native-webview:
141
+    :path: "../node_modules/react-native-webview"
142
+  React-RCTActionSheet:
143
+    :path: "../node_modules/react-native/Libraries/ActionSheetIOS"
144
+  React-RCTAnimation:
145
+    :path: "../node_modules/react-native/Libraries/NativeAnimation"
146
+  React-RCTBlob:
147
+    :path: "../node_modules/react-native/Libraries/Blob"
148
+  React-RCTImage:
149
+    :path: "../node_modules/react-native/Libraries/Image"
150
+  React-RCTLinking:
151
+    :path: "../node_modules/react-native/Libraries/LinkingIOS"
152
+  React-RCTNetwork:
153
+    :path: "../node_modules/react-native/Libraries/Network"
154
+  React-RCTSettings:
155
+    :path: "../node_modules/react-native/Libraries/Settings"
156
+  React-RCTText:
157
+    :path: "../node_modules/react-native/Libraries/Text"
158
+  React-RCTVibration:
159
+    :path: "../node_modules/react-native/Libraries/Vibration"
160
+  React-RCTWebSocket:
161
+    :path: "../node_modules/react-native/Libraries/WebSocket"
162
+  yoga:
163
+    :path: "../node_modules/react-native/ReactCommon/yoga"
164
+
165
+SPEC CHECKSUMS:
166
+  boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
167
+  DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2
168
+  Folly: 30e7936e1c45c08d884aa59369ed951a8e68cf51
169
+  glog: 1f3da668190260b06b429bb211bfbee5cd790c28
170
+  React: 4b3c068e793e96672dcd186a2b572fac43e4b031
171
+  React-Core: 3dc86b22920597f813c62a96db3165950b64826b
172
+  React-cxxreact: 0dacb291e59b81e7c3f22a2118bee853ba8a60d2
173
+  React-DevSupport: 4eb4135386acd10c2586cc9c759bf96b4dac035e
174
+  React-fishhook: 86ca737527bb9d860efbb943c11c729a5b69aa3d
175
+  React-jsi: 8e128c4d0d8febc2977ef617d1c09bb54326069c
176
+  React-jsiexecutor: 7a3554f703a58963ec80b860144ea0f0e9b910e1
177
+  React-jsinspector: d4ed52225912efe0019bb7f1a225aec20f23049a
178
+  react-native-webview: 830d41c90141f3e997ddb271fa93c19f3a619ccc
179
+  React-RCTActionSheet: b27ff3cf3a68f917c46d2b94abf938b625b96570
180
+  React-RCTAnimation: 9e4708e5bd65fca8285ce7c0aa076f3f4fa5c2f8
181
+  React-RCTBlob: 6eafcc3a24f33785692a7be24918ade607bc8719
182
+  React-RCTImage: 46b965d7225b428ea11580ead08a4318aef1d6be
183
+  React-RCTLinking: d65b9f56cf0b8e171575a86764df7bb019ac28d6
184
+  React-RCTNetwork: 783ee2f430740e58f724e46adc79fe7feff64202
185
+  React-RCTSettings: aa28315aadfbfaf94206d865673ae509f1e97c07
186
+  React-RCTText: 685fca2e13b024271048e7e247ef24476f28a41e
187
+  React-RCTVibration: 4ee1cf208ab17a50fafb1c16ffe28fe594a64e4f
188
+  React-RCTWebSocket: fca087d583724aa0e5fef7d911f0f2a28d0f2736
189
+  yoga: 616fde658be980aa60a2158835170f3f9c2d04b4
190
+
191
+PODFILE CHECKSUM: 03c5e59e8f81b8809e805efc7c17e30906e3d940
192
+
193
+COCOAPODS: 1.7.3

+ 14
- 15
demo/ios/demo-tvOS/Info.plist View File

@@ -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>
@@ -22,6 +22,19 @@
22 22
 	<string>1</string>
23 23
 	<key>LSRequiresIPhoneOS</key>
24 24
 	<true/>
25
+	<key>NSAppTransportSecurity</key>
26
+	<dict>
27
+		<key>NSExceptionDomains</key>
28
+		<dict>
29
+			<key>localhost</key>
30
+			<dict>
31
+				<key>NSExceptionAllowsInsecureHTTPLoads</key>
32
+				<true/>
33
+			</dict>
34
+		</dict>
35
+	</dict>
36
+	<key>NSLocationWhenInUseUsageDescription</key>
37
+	<string></string>
25 38
 	<key>UILaunchStoryboardName</key>
26 39
 	<string>LaunchScreen</string>
27 40
 	<key>UIRequiredDeviceCapabilities</key>
@@ -36,19 +49,5 @@
36 49
 	</array>
37 50
 	<key>UIViewControllerBasedStatusBarAppearance</key>
38 51
 	<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 52
 </dict>
54 53
 </plist>

+ 185
- 942
demo/ios/demo.xcodeproj/project.pbxproj
File diff suppressed because it is too large
View File


+ 10
- 0
demo/ios/demo.xcworkspace/contents.xcworkspacedata View File

@@ -0,0 +1,10 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<Workspace
3
+   version = "1.0">
4
+   <FileRef
5
+      location = "group:demo.xcodeproj">
6
+   </FileRef>
7
+   <FileRef
8
+      location = "group:Pods/Pods.xcodeproj">
9
+   </FileRef>
10
+</Workspace>

+ 2
- 1
demo/ios/demo/AppDelegate.h View File

@@ -5,9 +5,10 @@
5 5
  * LICENSE file in the root directory of this source tree.
6 6
  */
7 7
 
8
+#import <React/RCTBridgeDelegate.h>
8 9
 #import <UIKit/UIKit.h>
9 10
 
10
-@interface AppDelegate : UIResponder <UIApplicationDelegate>
11
+@interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate>
11 12
 
12 13
 @property (nonatomic, strong) UIWindow *window;
13 14
 

+ 15
- 8
demo/ios/demo/AppDelegate.m View File

@@ -7,6 +7,7 @@
7 7
 
8 8
 #import "AppDelegate.h"
9 9
 
10
+#import <React/RCTBridge.h>
10 11
 #import <React/RCTBundleURLProvider.h>
11 12
 #import <React/RCTRootView.h>
12 13
 
@@ -14,15 +15,12 @@
14 15
 
15 16
 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
16 17
 {
17
-  NSURL *jsCodeLocation;
18
+  RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
19
+  RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
20
+                                                   moduleName:@"demo"
21
+                                            initialProperties:nil];
18 22
 
19
-  jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
20
-
21
-  RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
22
-                                                      moduleName:@"demo"
23
-                                               initialProperties:nil
24
-                                                   launchOptions:launchOptions];
25
-  rootView.backgroundColor = [UIColor blackColor];
23
+  rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
26 24
 
27 25
   self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
28 26
   UIViewController *rootViewController = [UIViewController new];
@@ -32,4 +30,13 @@
32 30
   return YES;
33 31
 }
34 32
 
33
+- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
34
+{
35
+#if DEBUG
36
+  return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
37
+#else
38
+  return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
39
+#endif
40
+}
41
+
35 42
 @end

+ 13
- 16
demo/ios/demo/Info.plist View File

@@ -24,6 +24,19 @@
24 24
 	<string>1</string>
25 25
 	<key>LSRequiresIPhoneOS</key>
26 26
 	<true/>
27
+	<key>NSAppTransportSecurity</key>
28
+	<dict>
29
+		<key>NSAllowsArbitraryLoads</key>
30
+		<true/>
31
+		<key>NSExceptionDomains</key>
32
+		<dict>
33
+			<key>localhost</key>
34
+			<dict>
35
+				<key>NSExceptionAllowsInsecureHTTPLoads</key>
36
+				<true/>
37
+			</dict>
38
+		</dict>
39
+	</dict>
27 40
 	<key>NSLocationWhenInUseUsageDescription</key>
28 41
 	<string></string>
29 42
 	<key>UILaunchStoryboardName</key>
@@ -40,21 +53,5 @@
40 53
 	</array>
41 54
 	<key>UIViewControllerBasedStatusBarAppearance</key>
42 55
 	<false/>
43
-	<key>NSLocationWhenInUseUsageDescription</key>
44
-	<string></string>
45
-	<key>NSAppTransportSecurity</key>
46
-	<!--See http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/ -->
47
-	<dict>
48
-    <key>NSAllowsArbitraryLoads</key>
49
-    <true/>
50
-		<key>NSExceptionDomains</key>
51
-		<dict>
52
-			<key>localhost</key>
53
-			<dict>
54
-				<key>NSExceptionAllowsInsecureHTTPLoads</key>
55
-				<true/>
56
-			</dict>
57
-		</dict>
58
-	</dict>
59 56
 </dict>
60 57
 </plist>

+ 16
- 9
demo/metro.config.js View File

@@ -1,10 +1,17 @@
1
+/**
2
+ * Metro configuration for React Native
3
+ * https://github.com/facebook/react-native
4
+ *
5
+ * @format
6
+ */
7
+
1 8
 module.exports = {
2
-    transformer: {
3
-      getTransformOptions: async () => ({
4
-        transform: {
5
-          experimentalImportSupport: false,
6
-          inlineRequires: false,
7
-        },
8
-      }),
9
-    },
10
-  };
9
+  transformer: {
10
+    getTransformOptions: async () => ({
11
+      transform: {
12
+        experimentalImportSupport: false,
13
+        inlineRequires: false,
14
+      },
15
+    }),
16
+  },
17
+};

+ 17
- 7
demo/package.json View File

@@ -3,17 +3,27 @@
3 3
   "version": "0.0.1",
4 4
   "private": true,
5 5
   "scripts": {
6
-    "start": "node node_modules/react-native/local-cli/cli.js start"
6
+    "start": "react-native start",
7
+    "test": "jest",
8
+    "lint": "eslint ."
7 9
   },
8 10
   "dependencies": {
9
-    "react": "16.8.3",
10
-    "react-native": "0.59.9",
11
+    "react": "16.8.6",
12
+    "react-native": "0.60.0",
11 13
     "react-native-autoheight-webview": "../",
12
-    "react-native-webview": "^5.12.0"
14
+    "react-native-webview": "6.3.1"
13 15
   },
14 16
   "devDependencies": {
15
-    "@babel/core": "^7.0.0",
16
-    "metro-react-native-babel-preset": "0.51.1",
17
-    "react-test-renderer": "16.8.3"
17
+    "@babel/core": "^7.4.5",
18
+    "@babel/runtime": "^7.4.5",
19
+    "@react-native-community/eslint-config": "^0.0.5",
20
+    "babel-jest": "^24.8.0",
21
+    "eslint": "^6.0.1",
22
+    "jest": "^24.8.0",
23
+    "metro-react-native-babel-preset": "^0.54.1",
24
+    "react-test-renderer": "16.8.6"
25
+  },
26
+  "jest": {
27
+    "preset": "react-native"
18 28
   }
19 29
 }

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