This module features a C# implementation supporting react-native-windows 0.62 and a C++ implementation supporting all versions since react-native-windows 0.61.
You can either use autolinking on react-native-windows 0.63 and later with the C++ implementation or manually link the module on earlier releases or when using C# version.
The C++ implementation is based on C# implementation by Tero Paananen.
RNSensitiveInfoCPP supports autolinking. Just call: npm i react-native-sensitive-info --save
npm install react-native-sensitive-info --save
- Open your solution in Visual Studio 2019 (eg.
windows\yourapp.sln
) - Right-click Solution icon in Solution Explorer > Add > Existing Project...
- Add
node_modules\react-native-sensitive-info\windows\RNSensitiveInfoCPP\RNSensitiveInfoCPP.vcxproj
- Right-click main application project > Add > Reference...
- Select
RNSensitiveInfoCPP
in Solution Projects - In app
pch.h
add#include "winrt/RNSensitiveInfoCPP.h"
- In
App.cpp
addPackageProviders().Append(winrt::RNSensitiveInfoCPP::ReactPackageProvider());
beforeInitializeComponent();
Do the same steps as for 0.62, but use node_modules\RNSensitiveInfoCPP\windows\RNSensitiveInfoCPP61\RNSensitiveInfoCPP.vcxproj
in step 4.
If you want to contribute to this module Windows implementation, first you must install the Windows Development Dependencies.
You must temporarily install the react-native-windows
package. Versions of react-native-windows
and react-native
must match, e.g. if the module uses [email protected]
, install npm i react-native-windows@^0.62 --dev
.
Now, you will be able to open corresponding RNSensitiveInfoCPP...sln
file, e.g. RNSensitiveInfoCPP62.sln
for [email protected]
.