This example application shows off our Terrain component for now. Stay tuned more to come!
You will need to create a tokens.json
file that will contain your Mapbox access token
and Viro API key
{
"mapbox": <mapbox access token>,
"viro": <viro api key>
}
add this file to the top level of the example project. Once this file is in place all you should need to do is run on devices that support ARCore and ARKit. This does not work in the simulator
Starting from directory react-native-mapbox-ar
npm i or yarn install
cd RNMapboxARDemo
npm i or yarn install
# iOS only
cd ios
pod install
In a new tab run
npm start
It's always best to open up the project first in Android Studio
adb reverse tcp:8081 tcp:8081
react-native run-android --variant=gvrRelease
- Before we can run on our iOS device you must add your signing team in Xcode
-
Open up
RNMapboxARDemo.xcworkspace
-
Make sure your ARKit supported device is connected to Xcode then switch your build device to your connected device
- Now run from Xcode