forked from react-native-camera/react-native-camera
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(windows): updates for RNW 0.63 (react-native-camera#2960)
Build: * Updated huycn.zxingcpp.winrt to v1.1.0, enables ARM64 build on RNW >= 0.61 * Updated ReactNativeCameraCPP.sln with RNW 0.63 dependencies * Added ReactNativeCameraCPP62.sln for building against RNW 0.62 * Cleaned up ReactNativeCameraCPP61.sln for building against RNW 0.61 ReactNativeCamera RNCamera component: * Passing unspecified maxDuration to recordAsync no longer stops recording immediately Documentation: * Updated installation docs for RNW 0.63 auto-linking Closes react-native-camera#2942, react-native-camera#2944
- Loading branch information
1 parent
f4f6352
commit b990a24
Showing
10 changed files
with
1,206 additions
and
947 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,51 @@ | ||
# React Native Camera (Windows) | ||
|
||
React Native Camera is currently maintained for React Native Windows (RNW) >= 0.61. | ||
|
||
There are two implementations of `react-native-camera` in this folder: | ||
|
||
1. _ReactNativeCameraCPP_ is the currently maintained implementation: | ||
1. Use _ReactNativeCameraCPP_ for RNW >= 0.62. | ||
2. Use _ReactNativeCameraCPP61_ for RNW 0.61. | ||
2. _RNCamera_ is a legacy implementation for `[email protected]`. It is no longer maintained. | ||
|
||
## Why all the different versions? | ||
|
||
RNW was originally implemented in C#, where development stopped at version 0.59. _RNCamera_ is the version of React Native Camera written in C# against that (now "legacy") RNW. | ||
|
||
RNW was then rebuilt from scratch in C++, and version 0.61 was the first release to support native community modules. _ReactNativeCameraCPP_ is the version of React Native Camera written in C++ against the current RNW. | ||
|
||
RNW 0.62 brought a variety of build improvements, but now requires both Visual Studio 2019 and a newer Windows SDK. So while the native module APIs are 99% forward-compatible, it's currently necessary to maintain a separate `ReactNativeCameraCPP61.vcxproj` project for RNW 0.61 users. The `ReactNativeCameraCPP.vcxproj` project targets RNW >= 0.62 users. | ||
|
||
# Local Development Setup (RNW >= 0.62) | ||
|
||
In order to work on _ReactNativeCameraCPP_, you'll need to install the [Windows Development Dependencies](https://microsoft.github.io/react-native-windows/docs/rnw-dependencies). | ||
|
||
In addition, `react-native-camera` targets React Native 0.59 and doesn't include React Native Windows as a dependency. So in order to build _ReactNativeCameraCPP_ locally you'll need to temporarily upgrade the development dependencies: | ||
|
||
``` | ||
yarn upgrade react-native@^0.62.2 | ||
yarn add react-native-windows@^0.62.0 --dev | ||
``` | ||
|
||
Now you should be able to open `ReactNativeCameraCPP.sln` in Visual Studio and build the project. | ||
|
||
> _Note:_ In order to test your code changes don't break RNW 0.61, you'll want to do the above steps but targeting RN/RNW 0.61, and using `ReactNativeCameraCPP61.sln`. | ||
# React Native Camera (Windows) | ||
|
||
React Native Camera is currently maintained for React Native Windows (RNW) >= 0.61. | ||
|
||
There are two implementations of `react-native-camera` in this folder: | ||
|
||
1. _ReactNativeCameraCPP_ is the currently maintained implementation: | ||
1. Use _ReactNativeCameraCPP_ for RNW >= 0.62. | ||
2. Use _ReactNativeCameraCPP61_ for RNW 0.61. | ||
2. _RNCamera_ is a legacy implementation for `[email protected]`. It is no longer maintained. | ||
|
||
## Why all the different versions? | ||
|
||
RNW was originally implemented in C#, where development stopped at version 0.59. _RNCamera_ is the version of React Native Camera written in C# against that (now "legacy") RNW. | ||
|
||
RNW was then rebuilt from scratch in C++, and version 0.61 was the first release to support native community modules. _ReactNativeCameraCPP_ is the version of React Native Camera written in C++ against the current RNW. | ||
|
||
RNW 0.62 brought a variety of build improvements, but now requires both Visual Studio 2019 and a newer Windows SDK. So while the native module APIs are 99% forward-compatible, it's currently necessary to maintain a separate `ReactNativeCameraCPP61.vcxproj` project for RNW 0.61 users. The `ReactNativeCameraCPP.vcxproj` project targets RNW >= 0.62 users. | ||
|
||
# Local Development Setup (RNW >= 0.61) | ||
|
||
In order to work on _ReactNativeCameraCPP_, you'll need to install the [Windows Development Dependencies](https://microsoft.github.io/react-native-windows/docs/rnw-dependencies). | ||
|
||
In addition, `react-native-camera` targets React Native 0.59 and doesn't include React Native Windows as a dependency. So in order to build _ReactNativeCameraCPP_ locally you'll need to temporarily upgrade the development dependencies: | ||
|
||
## RNW >= 0.63 | ||
|
||
``` | ||
yarn upgrade react-native@^0.63 | ||
yarn add react-native-windows@^0.63 --dev | ||
``` | ||
|
||
Now you should be able to open `ReactNativeCameraCPP.sln` in Visual Studio and build the project. | ||
|
||
## RNW 0.62 | ||
|
||
``` | ||
yarn upgrade react-native@^0.62 | ||
yarn add react-native-windows@^0.62 --dev | ||
``` | ||
|
||
Now you should be able to open `ReactNativeCameraCPP62.sln` in Visual Studio and build the project. | ||
|
||
## RNW 0.61 | ||
|
||
``` | ||
yarn upgrade react-native@^0.61 | ||
yarn add react-native-windows@^0.61 --dev | ||
``` | ||
|
||
Now you should be able to open `ReactNativeCameraCPP61.sln` in Visual Studio and build the project. |
Oops, something went wrong.