Browse Source

Update docs

Kai Guo 4 years ago
parent
commit
586d19edbf
2 changed files with 30 additions and 0 deletions
  1. 1
    0
      README.md
  2. 29
    0
      docs/Getting-Started.md

+ 1
- 0
README.md View File

@@ -21,6 +21,7 @@ _This project is maintained for free by these people using both their free time
21 21
 - [x] iOS
22 22
 - [x] Android
23 23
 - [x] macOS
24
+- [x] Windows
24 25
 
25 26
 _Note: Expo support for React Native WebView started with [Expo SDK v33.0.0](https://blog.expo.io/expo-sdk-v33-0-0-is-now-available-52d1c99dfe4c)._
26 27
 

+ 29
- 0
docs/Getting-Started.md View File

@@ -57,6 +57,35 @@ Cocoapod and autolinking is not yet support for react-native macOS but is coming
57 57
 
58 58
 The method is nearly identical to the [manual linking method for iOS](https://facebook.github.io/react-native/docs/linking-libraries-ios#manual-linking) except that you will include the `node_modules/react-native-webview/macos/RNCWebView.xcodeproj` project in your main project and link the `RNCWebView-macOS.a` library. 
59 59
 
60
+### Windows:
61
+
62
+Autolinking is not yet supported for ReactNativeWindows. Make following additions to the given files manually:
63
+
64
+#### **windows/myapp.sln**
65
+
66
+Add the `ReactNativeWebView` project to your solution.
67
+
68
+1. Open the solution in Visual Studio 2019
69
+2. Right-click Solution icon in Solution Explorer > Add > Existing Project
70
+   Select `node_modules\react-native-webview\windows\ReactNativeWebView\ReactNativeWebView.vcxproj`
71
+
72
+#### **windows/myapp/myapp.vcxproj**
73
+
74
+Add a reference to `ReactNativeWebView` to your main application project. From Visual Studio 2019:
75
+
76
+1. Right-click main application project > Add > Reference...
77
+  Check `ReactNativeWebView` from Solution Projects.
78
+
79
+2. Modify files below to add the video package providers to your main application project
80
+
81
+#### **pch.h**
82
+
83
+Add `#include "winrt/ReactNativeWebView.h"`.
84
+
85
+#### **app.cpp**
86
+
87
+Add `PackageProviders().Append(winrt::ReactNativeWebView::ReactPackageProvider());` before `InitializeComponent();`.
88
+
60 89
 ## 3. Import the webview into your component
61 90
 
62 91
 ```js