react-native-camera/windows
Jon Thysell b990a2465c
feat(windows): updates for RNW 0.63 (#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 #2942, #2944
2020-09-01 22:24:04 -03:00
..
ReactNativeCameraCPP feat(windows): updates for RNW 0.63 (#2960) 2020-09-01 22:24:04 -03:00
ReactNativeCameraCPP61 feat(windows): updates for RNW 0.63 (#2960) 2020-09-01 22:24:04 -03:00
RNCamera Add Cpp/WinRT camera module support for React Native Windows 2020-03-03 10:41:00 -08:00
.clang-format feat(windows): updated for react-native-windows 0.62 (#2882) 2020-07-17 11:59:20 -03:00
.gitignore feat(windows): updated for react-native-windows 0.62 (#2882) 2020-07-17 11:59:20 -03:00
.npmignore Adds react-native-windows UWP support (#862) 2018-12-03 13:50:37 -02:00
ReactNativeCameraCPP61.sln feat(windows): updates for RNW 0.63 (#2960) 2020-09-01 22:24:04 -03:00
ReactNativeCameraCPP62.sln feat(windows): updates for RNW 0.63 (#2960) 2020-09-01 22:24:04 -03:00
ReactNativeCameraCPP.sln feat(windows): updates for RNW 0.63 (#2960) 2020-09-01 22:24:04 -03:00
README.md feat(windows): updates for RNW 0.63 (#2960) 2020-09-01 22:24:04 -03:00
RNCamera.sln Adds react-native-windows UWP support (#862) 2018-12-03 13:50:37 -02:00

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 react-native-windows@0.59.0-legacy.2. 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.

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.