소스 검색

Update Getting-Started.md

Ian Ownbey 5 년 전
부모
커밋
9ede100fd0
1개의 변경된 파일20개의 추가작업 그리고 2개의 파일을 삭제
  1. 20
    2
      docs/Getting-Started.md

+ 20
- 2
docs/Getting-Started.md 파일 보기

@@ -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
   }