Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update react native webview #19375

Merged
merged 4 commits into from Oct 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -9,6 +9,7 @@ Package-specific changes not released in any SDK will be added here just before

- Updated `@stripe/stripe-react-native` from `0.13.1` to `0.18.1` on iOS. ([#19055](https://github.com/expo/expo/pull/19055) by [@tsapeta](https://github.com/tsapeta))
- Updated `@shopify/flash-list` from `1.1.0` to `1.3.0`. ([#19317](https://github.com/expo/expo/pull/19317) by [@kudo](https://github.com/kudo))
- Updated `react-native-webview` from `11.23.0` to `11.23.1`. ([#19375](https://github.com/expo/expo/pull/19375) by [@aleqsio](https://github.com/aleqsio))

### 🛠 Breaking changes

Expand Down
Expand Up @@ -316,13 +316,10 @@ public void setCacheEnabled(WebView view, boolean enabled) {
if (enabled) {
Context ctx = view.getContext();
if (ctx != null) {
view.getSettings().setAppCachePath(ctx.getCacheDir().getAbsolutePath());
view.getSettings().setCacheMode(WebSettings.LOAD_DEFAULT);
view.getSettings().setAppCacheEnabled(true);
}
} else {
view.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
view.getSettings().setAppCacheEnabled(false);
}
}

Expand Down Expand Up @@ -521,7 +518,6 @@ public void setIncognito(WebView view, boolean enabled) {

// Disable caching
view.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
view.getSettings().setAppCacheEnabled(false);
view.clearHistory();
view.clearCache(true);

Expand Down
2 changes: 1 addition & 1 deletion apps/bare-expo/package.json
Expand Up @@ -119,7 +119,7 @@
"react-native-shared-element": "0.8.4",
"react-native-svg": "12.3.0",
"react-native-view-shot": "3.3.0",
"react-native-webview": "11.22.4",
"react-native-webview": "11.23.1",
"test-suite": "*"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion apps/native-component-list/package.json
Expand Up @@ -157,7 +157,7 @@
"react-native-svg": "12.3.0",
"react-native-view-shot": "3.3.0",
"react-native-web": "~0.18.9",
"react-native-webview": "11.22.4",
"react-native-webview": "11.23.1",
"react-navigation": "^4.4.0",
"react-navigation-shared-element": "^3.1.2",
"react-navigation-stack": "^2.8.2",
Expand Down
4 changes: 2 additions & 2 deletions ios/Podfile.lock
Expand Up @@ -1944,7 +1944,7 @@ PODS:
- React
- React-callinvoker
- React-Core
- react-native-webview (11.22.4):
- react-native-webview (11.23.1):
- React-Core
- React-perflogger (0.70.1)
- React-RCTActionSheet (0.70.1):
Expand Down Expand Up @@ -3495,7 +3495,7 @@ SPEC CHECKSUMS:
react-native-safe-area-context: 6c12e3859b6f27b25de4fee8201cfb858432d8de
react-native-segmented-control: 06607462630512ff8eef652ec560e6235a30cc3e
react-native-skia: faacd6a970a757d67c4f4a44a31d347651abbb8e
react-native-webview: a1ed211d50a5047a4fe54e07140991e277cd66e6
react-native-webview: d33e2db8925d090871ffeb232dfa50cb3a727581
React-perflogger: 48c6b363e867d64b682e84f80ca45636bd65e19c
React-RCTActionSheet: 33c74fe5c754835e3715c300618da9aa2f7203fa
React-RCTAnimation: 2dbf0120d4d1ab7716079b4180f2ca89c465e46b
Expand Down
Expand Up @@ -1143,9 +1143,13 @@ - (void) webView:(WKWebView *)webView

if (_onShouldStartLoadWithRequest) {
NSMutableDictionary<NSString *, id> *event = [self baseEvent];
if (request.mainDocumentURL) {
[event addEntriesFromDictionary: @{
@"mainDocumentURL": (request.mainDocumentURL).absoluteString,
}];
}
[event addEntriesFromDictionary: @{
@"url": (request.URL).absoluteString,
@"mainDocumentURL": (request.mainDocumentURL).absoluteString,
@"navigationType": navigationTypes[@(navigationType)],
@"isTopFrame": @(isTopFrame)
}];
Expand Down
@@ -1,6 +1,6 @@
{
"name": "react-native-webview",
"version": "11.22.4",
"version": "11.23.1",
"summary": "React Native WebView component for iOS, Android, macOS, and Windows",
"license": "MIT",
"authors": "Jamon Holmgren <jamon@infinite.red>",
Expand All @@ -11,7 +11,7 @@
},
"source": {
"git": "https://github.com/react-native-webview/react-native-webview.git",
"tag": "v11.22.4"
"tag": "v11.23.1"
},
"source_files": "apple/**/*.{h,m}",
"dependencies": {
Expand Down
12 changes: 6 additions & 6 deletions packages/expo-test-runner/package.json
Expand Up @@ -10,13 +10,13 @@
"expo-test-runner": "bin/expo-test-runner.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/expo/expo-test-runner.git"
},
"type": "git",
"url": "git+https://github.com/expo/expo-test-runner.git"
},
"bugs": {
"url": "https://github.com/expo/expo-test-runner/issues"
},
"homepage": "https://github.com/expo/expo-test-runner#readme",
"url": "https://github.com/expo/expo-test-runner/issues"
},
"homepage": "https://github.com/expo/expo-test-runner#readme",
"scripts": {
"build": "expo-module build",
"clean": "expo-module clean",
Expand Down
2 changes: 1 addition & 1 deletion packages/expo/bundledNativeModules.json
Expand Up @@ -100,7 +100,7 @@
"react-native-shared-element": "0.8.4",
"react-native-svg": "12.3.0",
"react-native-view-shot": "3.3.0",
"react-native-webview": "11.23.0",
"react-native-webview": "11.23.1",
"sentry-expo": "~5.0.0",
"unimodules-app-loader": "~3.1.0",
"unimodules-image-loader-interface": "~6.1.0",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Expand Up @@ -17430,10 +17430,10 @@ react-native-web@~0.18.9:
postcss-value-parser "^4.2.0"
styleq "^0.1.2"

react-native-webview@11.22.4:
version "11.22.4"
resolved "https://registry.yarnpkg.com/react-native-webview/-/react-native-webview-11.22.4.tgz#0381b09ed33ad3c1f9d5c40a6c619dc9306757d8"
integrity sha512-nhDibIY2wzjA1Ydn0Kiydx5e20XJ3QWTi2wgIq4iq76pI186fqtcgcsaT69XUGLM0C2iQSn33d/joDgW20pFWg==
react-native-webview@11.23.1:
version "11.23.1"
resolved "https://registry.yarnpkg.com/react-native-webview/-/react-native-webview-11.23.1.tgz#6a4bf2620e491dd4fecf4e6dc079005117fae12c"
integrity sha512-bmqsdg4RYOUYD37R9XTrQALm7eD62KbLNPRfgvpLGd1SjaurvAjjsLrLN4mt6yOtKOMKeZvlcAl3x6De6cCQsA==
dependencies:
escape-string-regexp "2.0.0"
invariant "2.2.4"
Expand Down