
npx create-expo-app@latest my-quest-app cd my-quest-app
npm install expo-horizon-core npx expo install expo-dev-client
expo-horizon-core plugin to app.json:{
"expo": {
"orientation": "default",
"plugins": [
[
"expo-horizon-core",
{
"horizonAppId": "YOUR_HORIZON_APP_ID",
"defaultWidth": "1024dp",
"defaultHeight": "640dp",
"supportedDevices": "quest2|questpro|quest3|quest3s|vrglasses",
"disableVrHeadtracking": false,
"allowBackup": false
}
]
]
}
}
YOUR_HORIZON_APP_ID in the configuration above with this value.npx expo prebuild --clean
expo-horizon-core creates separate quest and mobile build variants. Add scripts for each target to package.json:{
"scripts": {
"android": "expo run:android --variant mobileDebug",
"quest": "expo run:android --variant questDebug",
"android:release": "expo run:android --variant mobileRelease",
"quest:release": "expo run:android --variant questRelease"
}
}
quest variants for Meta VR devices and the mobile variants for other Android devices.npm run quest
Optional: OS version targetingIf you build natively, you can optionally declare minimum and target Meta VR OS SDK versions with theuses-metavr-sdkelement, described in Meta VR OS SDK versioning. Theprebuildcommand rewrites the generatedandroid/app/src/quest/AndroidManifest.xml, so direct edits to it do not persist. To keep manifest changes across runs ofprebuild, apply them with an Expo config plugin.
expo-horizon-core, native modules, and Horizon OS features.isHorizonDevice() from expo-horizon-core to select a Horizon OS integration or a mobile fallback.| Mobile integration | Use on Meta Horizon OS |
|---|---|
expo-location | expo-horizon-location |
expo-notifications | expo-horizon-notifications |
Google Play Billing | expo-iap with Horizon support enabled |
Other Google Mobile Services | Use the recommended alternatives in Unsupported dependencies |