-
-
Notifications
You must be signed in to change notification settings - Fork 663
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
Upgrade WebView #3296
Upgrade WebView #3296
Conversation
@borisyankov Thanks for this PR! And for the ping <_< 48132ac44 Add 'react-native-webview' dependency
ebbfa016f Link 'react-native-webview' libraryLooks good, thanks! And thanks in particular for the command saying what you did, since the iOS/Xcode part of this is hard to read. 5f492bdf0 Use WebView from 'react-native-webview' instead of 'react-native'
a04ad0e19 webview: Replace UIWebView with WKWebViewCool. Thanks for the very informative commit message!
7c3864062 WIP: XCode chages. Are these needed?Huh indeed. Are they needed? (What are they intended to do? Or, how did they get made?) |
Ah, I see the PR description has more or less this information. Please put that in the commit message too. 😉 |
3ce4c47
to
d4b1c20
Compare
Note: I renamed the PR to |
Sounds like a good plan -- thanks! |
d95b13a
to
a91104b
Compare
a91104b
to
53d1e34
Compare
I see you've taken the "WIP" back out of the title -- is the latest version of the branch intended for review and merge? |
Yeah. Ready for a review. |
The `WebView` component is being removed out of RN Core as part of the "Lean Core" project: facebook/react-native#23313 Its development continues here: https://github.com/react-native-community/react-native-webview Just add the dependency to `package.json` and `yarn.lock`. Version 2.0 is the exact same version that is in `react-native`. While there are newer versions that have exciting features, the first step is to simply start using this new package.
This is the result of running: `react-native link react-native-webview` Then manually reviewing and cleaning up any accidental and unrelated changes.
The WebView component has moved out of RN core into its own library; see the grandparent commit. Now, import the WebView library from the new package. No functional change introduced, because we're using the version that corresponds to what's in RN core.
React Native 0.57+ supports the new `WKWebView` iOS component in `WebView` instead of the legacy `UIWebView`. The UIWebView component is deprecated since iOS 12: https://developer.apple.com/documentation/uikit/uiwebview WKWebView is supported on iOS 8 and newer so that is not a concern. https://developer.apple.com/documentation/webkit/wkwebview An article on the `WKWebView` support in React Native here: http://facebook.github.io/react-native/blog/2018/08/27/wkwebview The change code-wise is trivial, I have tested it on an emulator and as expected everything seems to be working correctly. We should do an extended TestFlight testing just in case. To reiterate, this is a iOS-specific change.
53d1e34
to
3ad1269
Compare
Thanks @borisyankov ! Looks great -- merged. |
The
WebView
component is being moved out ofreact-native
.While it is still available from the main package, Its development has stopped and it is being deprecated (and soon to be removed completely)
The very same component is under active development and eagerly accepting PRs at
react-native-webview
.This PR migrates to that package (and as separate commits does few more changes).