@layers/amba-expo
v3.0.3
Published
amba SDK for Expo apps — config plugin wrapping @layers/amba-react-native (pure-JS HTTP client).
Downloads
1,556
Readme
@layers/amba-expo
Amba is the agent-native backend-as-a-service for mobile and web apps. This package is the Expo config plugin and a re-export of @layers/amba-react-native. Use it if you're on Expo (managed or bare workflow).
What's new in 2.0.0
Tracks @layers/[email protected] — pure-JS HTTP client, smaller bundles, no native runtime dependency. The public API is unchanged; no code changes required when upgrading from 1.x.
Install
npx expo install @layers/amba-expo @react-native-async-storage/async-storageConfigure the plugin
// app.json
{
"expo": {
"plugins": [
[
"@layers/amba-expo",
{
"apiKey": "amba_pk_…",
"scheme": "myapp",
"googleIosClientId": "…"
}
]
]
}
}Then rebuild your native projects (npx expo prebuild or EAS Build).
First call
import { Amba } from "@layers/amba-expo";
await Amba.configure({ apiKey: "amba_pk_…" });
await Amba.auth.signInAnonymously();
await Amba.events.track("app_opened");Amba is the same singleton exported by @layers/amba-react-native — see that package for the full surface.
Docs
Full reference: https://docs.amba.dev/sdk/expo.
License
MIT
