Browse Source

Defaults to WKWebView instead of UIWebView

Jamon Holmgren 6 years ago
parent
commit
236e613421
2 changed files with 3 additions and 2 deletions
  1. 2
    2
      README.md
  2. 1
    0
      js/WebView.ios.js

+ 2
- 2
README.md View File

33
   render () {
33
   render () {
34
     return (
34
     return (
35
       <WebView
35
       <WebView
36
-        useWebKit // to use WKWebView -- will be default at some point
37
         src={{uri: "https://infinite.red/react-native"}}
36
         src={{uri: "https://infinite.red/react-native"}}
38
         style={{marginTop: 20}}
37
         style={{marginTop: 20}}
39
       />
38
       />
48
 
47
 
49
 ## Migrate from React Native core WebView to React Native WebView
48
 ## Migrate from React Native core WebView to React Native WebView
50
 
49
 
51
-Simply install React Native WebView and then use it in place of the core WebView. Their APIs are currently identical.
50
+Simply install React Native WebView and then use it in place of the core WebView. Their APIs are currently identical, except that this package defaults `useWebKit={true}` unlike the built-in WebView.
52
 
51
 
53
 ### Contributor Notes
52
 ### Contributor Notes
54
 
53
 
55
 * I've removed all PropTypes for now. Instead, we'll be moving toward Flow or TypeScript at a later date
54
 * I've removed all PropTypes for now. Instead, we'll be moving toward Flow or TypeScript at a later date
55
+* UIWebView is not tested fully and you will encounter some yellow warning boxes. Since it is deprecated, we don't intend to put a lot of time into supporting it, but feel free to submit PRs if you have a special use case. Note that you will need to specify `useWebKit={false}` to use UIWebView
56
 
56
 
57
 ## Maintainers
57
 ## Maintainers
58
 
58
 

+ 1
- 0
js/WebView.ios.js View File

126
   static NavigationType = NavigationType;
126
   static NavigationType = NavigationType;
127
 
127
 
128
   static defaultProps = {
128
   static defaultProps = {
129
+    useWebKit: true,
129
     originWhitelist: WebViewShared.defaultOriginWhitelist,
130
     originWhitelist: WebViewShared.defaultOriginWhitelist,
130
   };
131
   };
131
 
132