Overview:
The react-native-arkit is a React Native binding for iOS ARKit, allowing developers to create ARKit applications using React Native. The library supports features such as debugging mode, AR plane detection, light estimation, and AR world alignment. Users need to follow specific steps for installation on iOS, including adding files to Xcode and setting up project configurations. The library only works on devices with A9 or later processors running iOS 11.
Features:
- React Native ARKit: Allows developers to create ARKit applications in React Native.
- Debug Mode: Shows 3D axis and feature points detected for debugging purposes.
- AR Plane Detection: Supports horizontal, vertical, horizontal-vertical, or no plane detection.
- Light Estimation: Enables ARKit light estimation for a more realistic AR experience.
- AR World Alignment: Supports different coordinate system alignments like gravity, gravity, and heading, or camera orientation.
Installation:
To install react-native-arkit, make sure to use the latest version of Yarn (>=1.x.x) as npm may not work properly. The library requires manual installation steps on iOS, including adding files to Xcode and setting up project configurations. Ensure permissions for camera usage are granted in Info.plist and the default build architecture is set to arm64.
$ yarn add react-native-arkit
For manual installation on iOS:
- Add RCTARKit.xcodeproj and PocketSVG.xcodeproj files to your Xcode project.
- Add libRCTARKit.a and PocketSVG.framework to your project’s Link Binary With Libraries.
- Add PocketSVG.framework to Embedded Binaries.
- Run your project.
Summary:
The react-native-arkit is a helpful library for developers looking to create ARKit applications using React Native. With features like debugging mode, AR plane detection, light estimation, and AR world alignment, developers can build immersive AR experiences for iOS devices. However, users should be aware of the manual installation steps required for iOS and the device compatibility limitations.