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
 - [x] iOS
21
 - [x] iOS
22
 - [x] Android
22
 - [x] Android
23
 - [x] macOS
23
 - [x] macOS
24
+- [x] Windows
24
 
25
 
25
 _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
 _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
 
57
 
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. 
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
 ## 3. Import the webview into your component
89
 ## 3. Import the webview into your component
61
 
90
 
62
 ```js
91
 ```js