Browse Source

Update Getting-Started.md

Ian Ownbey 5 years ago
parent
commit
9ede100fd0
1 changed files with 20 additions and 2 deletions
  1. 20
    2
      docs/Getting-Started.md

+ 20
- 2
docs/Getting-Started.md View File

@@ -12,10 +12,28 @@ $ yarn add react-native-webview
12 12
 
13 13
 React Native modules that include native Objective-C, Swift, Java, or Kotlin code have to be "linked" so that the compiler knows to include them in the app.
14 14
 
15
+```
16
+$ react-native link react-native-webview
17
+```
18
+
19
+iOS:
20
+
21
+If using cocoapods in the `ios/` directory run
22
+
23
+```
24
+$ pod install
25
+```
26
+
27
+Android - react-native-webview version <6:
15 28
 This module does not require any extra step after running the link command 🎉
29
+
30
+Android - react-native-webview version >=6.X.X:
31
+Please make sure AndroidX is enabled in your project by editting `android/gradle.properties` and adding 2 lines:
32
+
16 33
 ```
17 34
 $ react-native link react-native-webview
18 35
 ```
36
+
19 37
 For Android manual installation, please refer to [this article](https://engineering.brigad.co/demystifying-react-native-modules-linking-964399ec731b) where you can find detailed step on how to link any react-native project.
20 38
 
21 39
 For iOS, while you can manually link the old way using [react-native own tutorial](https://facebook.github.io/react-native/docs/linking-libraries-ios), we find it easier to use cocoapods.
@@ -33,8 +51,8 @@ class MyWeb extends Component {
33 51
   render() {
34 52
     return (
35 53
       <WebView
36
-        source={{uri: 'https://infinite.red'}}
37
-        style={{marginTop: 20}}
54
+        source={{ uri: 'https://infinite.red' }}
55
+        style={{ marginTop: 20 }}
38 56
       />
39 57
     );
40 58
   }