Implement WKWebView to replace WebView

Summary:
@public

`UIWebView` has been deprecated and replaced by `WKWebView`. This diff introduces a new component `WKWebView` that simply renders a `WKWebView` on iOS.

This is the first in the stack of many diffs that'll be required to fully replace `UIWebView` with `WKWebView` in the `<WebView/>` React Native component. Eventually, I hope to introduce a prop called `useWebKitImplementation`, which, when true, will force RN to use `WKWebView` instead of `UIWebView` for the `<WebView/>` component.

The only thing that's been implemented so far is the `source` property.

Reviewed By: mmmulani

Differential Revision: D6266100

fbshipit-source-id: 65862e34bd98db7fff0349cf26888afee43a56e4
This commit is contained in:
Ramanpreet Nara
2018-08-16 13:33:53 -07:00
committed by Facebook Github Bot
parent 877212e18c
commit 1442c265da
5 changed files with 148 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
* @providesModule WKWebView
*/
const React = require('React');
const View = require('View');
const Text = require('Text');
module.exports = () => {
return (
<View>
<Text>Android version not implemented.</Text>
</View>
);
};