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