Skip to content

Constants

@symbiote-native/constants wraps expo-constants and keeps its native fields: session ID, status bar height, system fonts, linking URI, execution environment, device name and year class, the platform block and the WebView user agent. Every field is a plain value resolved once, so all five adapters re-export the same Constants object.

OS platform Support
iOS live
Android live
Terminal window
pnpm add @symbiote-native/constants

Scaffolding or extending an app? npx @symbiote-native/cli new --constants (or add --constants) installs and wires it. expo-constants and expo-modules-core come along as pinned dependencies, never install either yourself and never add the expo meta-package.

import { Constants, ExecutionEnvironment } from '@symbiote-native/constants';
const isBare = Constants.executionEnvironment === ExecutionEnvironment.Bare;
const sessionId = Constants.sessionId;
const userAgent = await Constants.getWebViewUserAgentAsync();

The import path is the same on every adapter: @symbiote-native/constants, or the /react, /vue, /svelte, /solid and /angular entries.

  • Where is Constants.expoConfig? Not ported: there is no Expo manifest here, so read build-time values from your own config, inlined by your Babel or Metro setup.
  • Constants.manifest is null. Upstream deprecated it in favor of expoConfig; it is not available here either.
  • Where is installationId? Deprecated upstream. Use @symbiote-native/application’s Android ID on Android and @symbiote-native/secure-store for a stored id on iOS.
  • makeRedirectUri needs a scheme. Pass scheme explicitly, since auto-detection reads expoConfig.

Sources: Expo docs: Constants, expo/expo#44527, Constants manifests and config.