zoontek / react-native-permissions

An unified permissions API for React Native on iOS, Android and Windows.
MIT License
4.11k stars 837 forks source link

fix(windows): use Microsoft.Windows.CppWinRT version provided by RNW #860

Closed tido64 closed 8 months ago

tido64 commented 8 months ago

Summary

react-native-windows uses Microsoft.Windows.CppWinRT 2.0.210312.4 starting with 0.65. From 0.68 on, the version is decided by RNW itself so we no longer need to check whether the NuGet packages are missing.

Test Plan

What's required for testing (prerequisites)?

An app using react-native-windows 0.68 or higher

What are the steps to test it (after prerequisites)?

I couldn't get the example app to build at all. Instead, I added react-native-permissions to RNTA:

git clone https://github.com/microsoft/react-native-test-app.git
cd react-native-test-app
yarn
cd example
yarn add react-native-permissions

# Manually apply the changes to node_modules/react-native-permissions/windows/RNPermissions/RNPermissions.vcxproj

yarn install-windows-test-app --use-nuget
yarn windows

Compatibility

OS Implemented
iOS
Android
Windows

Checklist

tido64 commented 8 months ago

cc @CedricGuillemet @kelset @TatianaKapos