From d11870b1eb0a418f5d8b33964531896b1f9c1296 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Tue, 2 Oct 2018 19:02:38 +0000 Subject: [PATCH] Trying to get RN 0.57.1 to work --- .../lib/components/note-body-viewer.js | 3 ++ ReactNativeClient/main.js | 2 +- ReactNativeClient/package-lock.json | 28 ++++++++++++++----- 3 files changed, 25 insertions(+), 8 deletions(-) diff --git a/ReactNativeClient/lib/components/note-body-viewer.js b/ReactNativeClient/lib/components/note-body-viewer.js index 17ade52f7..f36d7ac5f 100644 --- a/ReactNativeClient/lib/components/note-body-viewer.js +++ b/ReactNativeClient/lib/components/note-body-viewer.js @@ -116,6 +116,9 @@ class NoteBodyViewer extends Component { scalesPageToFit={Platform.OS !== 'ios'} style={webViewStyle} source={source} + originWhitelist={['file://*', './*', 'http://*', 'https://*']} + mixedContentMode="always" + allowFileAccess={true} onLoadEnd={() => this.onLoadEnd()} onError={() => reg.logger().error('WebView error') } onMessage={(event) => { diff --git a/ReactNativeClient/main.js b/ReactNativeClient/main.js index e4b0259c7..afbc27ffa 100644 --- a/ReactNativeClient/main.js +++ b/ReactNativeClient/main.js @@ -11,7 +11,7 @@ // componentWillReceiveProps. Should be fixed at some point and at that // time this code could be removed. // https://github.com/facebook/react-native/issues/18165#issuecomment-369907978 -require("ReactFeatureFlags").warnAboutDeprecatedLifecycles = false; +// require("ReactFeatureFlags").warnAboutDeprecatedLifecycles = false; const { AppRegistry } = require('react-native'); diff --git a/ReactNativeClient/package-lock.json b/ReactNativeClient/package-lock.json index 8e00b9f18..0ef8216ba 100644 --- a/ReactNativeClient/package-lock.json +++ b/ReactNativeClient/package-lock.json @@ -2997,11 +2997,13 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true + "bundled": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -3014,15 +3016,18 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "concat-map": { "version": "0.0.1", - "bundled": true + "bundled": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -3125,7 +3130,8 @@ }, "inherits": { "version": "2.0.3", - "bundled": true + "bundled": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -3135,6 +3141,7 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -3147,17 +3154,20 @@ "minimatch": { "version": "3.0.4", "bundled": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "bundled": true + "bundled": true, + "optional": true }, "minipass": { "version": "2.2.4", "bundled": true, + "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -3174,6 +3184,7 @@ "mkdirp": { "version": "0.5.1", "bundled": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -3246,7 +3257,8 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true + "bundled": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -3256,6 +3268,7 @@ "once": { "version": "1.4.0", "bundled": true, + "optional": true, "requires": { "wrappy": "1" } @@ -3361,6 +3374,7 @@ "string-width": { "version": "1.0.2", "bundled": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0",