Expo SDK
Expo SDK quickstart for @layers/amba-expo — config plugin, Apple/Google sign-in, push integration, and prebuild workflow. Builds on @layers/amba-react-native.
@layers/amba-expo is the Expo wrapper around @layers/amba-react-native. It re-exports the same Amba singleton, and adds an Expo config plugin that wires up the native config the SDK needs (push entitlements, URL schemes, Associated Domains, Android intent filters) at prebuild time.
Use this SDK if you're on the Expo managed workflow or building with EAS Build. For bare React Native apps without Expo modules, use @layers/amba-react-native directly.
1. Install
Expo will pick the version of each peer that matches your SDK version.
2. Add the config plugin to app.json
The plugin accepts these options:
scheme— adds aCFBundleURLTypesentry on iOS somyapp://...deep-links route into the app, and anintent-filteron the Android main activity for the same scheme.googleIosClientId— appends a reverse-DNS-edCFBundleURLTypesentry so the Google sign-in redirect lands back in the app.apiKeyandbaseUrl— accepted in the plugin options for symmetry withAmba.configure(...); runtime config is the canonical source.
For Universal Links / APS Environment / UIBackgroundModes / Google Web client wiring, configure them directly in app.json's ios.associatedDomains / ios.entitlements / android.permissions and the corresponding native config blocks.
Re-run npx expo prebuild --clean after changing plugin properties.
3. Configure the SDK at runtime
The plugin only handles native config — runtime initialization still happens via Amba.configure({ apiKey }). Keep EXPO_PUBLIC_AMBA_API_KEY=amb_dev_ck_XXXX in your env so the same value reaches both prebuild and runtime.
For EAS Build, set the same env in your eas.json:
4. Sign in with Apple
The plugin wires the entitlement; the runtime call uses expo-apple-authentication:
5. Sign in with Google
The plugin's googleIosClientId and googleWebClientId properties keep the client IDs consistent between prebuild and runtime — set them once in app.json and reference them at runtime via env vars.
6. Push integration
Call this after a successful sign-in or after the user explicitly opts in.
APNs entitlement wiring isn't in the plugin today (see § 2). Until it lands, add the APS Environment entitlement and
UIBackgroundModes: ["remote-notification"]toios.entitlements/ios.infoPlistinapp.jsonmanually —expo prebuildwill pick them up from the config rather than from the plugin.
7. Deep links
The plugin maps your scheme (e.g. myapp) into both ios/Info.plist and android/app/src/main/AndroidManifest.xml. amba's deep-link API delivers links to your app:
To list deep links registered with amba server-side, query the deep-links module via the client SDK reference.
EAS Build env
For EAS Build to receive the API key + Google OAuth IDs at build time:
Use the dev key for development builds and the production key for the production profile.
Common pitfalls
- Forgot to re-prebuild after plugin changes — running
npx expo prebuild --cleanafter editingapp.jsonis mandatory. Otherwise the entitlements / Info.plist won't reflect the new config and push registration fails silently. - APNs key mismatch — the APNs auth key uploaded to amba (console → push) must match the bundle ID set in
app.json'sios.bundleIdentifier. If they drift, push token registration returns 200 but server-side delivery 404s. - Google OAuth client IDs across environments — each EAS build profile needs its own client ID matching the bundle ID for that profile. Reusing the dev client ID in production builds fails with
invalid_client. - Plugin pinned to wrong amba SDK version — when bumping
@layers/amba-expo, runnpx expo install --checkto align peer versions, then re-prebuild.
See also
- React Native SDK — the runtime layer this package wraps.
- Push notifications — campaign API, scheduling, fan-out.
- Client API reference — HTTP endpoint reference for every namespace.
- Code samples — same operations side-by-side with the other 7 SDKs.