Axonpack

Installation

Install the package, add the config plugin, and make a native build.

You need this page once, when you add the package.

npx expo install @axonpack/preview expo-file-system

Requirements

NeedsWhy
Expo SDK 53 or laterThe iOS hook the package uses came with SDK 53
The New ArchitectureThe default from SDK 53. Under the old one the package logs one warning and always loads the base bundle
HermesPreviews are Hermes bytecode, the same as a release build
A native buildThe package has native code, so it does not run in Expo Go. A development or release build both work

The old architecture

Under the old architecture nothing breaks, but nothing switches either. The package logs one warning and the base bundle always loads, so the app still starts.

What each package does

PackageNeeded?What it is for
expoYesThe native module, the config plugin, and expo export:embed for publishing
react, react-nativeYesThe list and the provider
expo-file-systemYesDownloads and keeps previews in the app's documents folder
expo-updatesNoWorks alongside if you use it. See expo-updates

The CLI, preview, comes with the package. It runs from your app's root and uses your app's own expo to build and to compute the fingerprint, so it needs nothing else installed.

Add the config plugin

Add the plugin to app.json (or app.config.js):

{
  "expo": {
    "plugins": [["@axonpack/preview", { "compatibility": "appVersion" }]]
  }
}

At prebuild the plugin bakes three values into the build: the compatibility setting, the build's key, and the app's slug. The app uses the key to ask the bucket only for previews made for it. The slug tells this app's dev preview servers apart from other apps'. Which setting to pick is on Compatibility.

Then make a native build:

npx expo prebuild
npx expo run:ios       # or: npx expo run:android

With EAS Build, the plugin runs during the build as usual.

Without the plugin

A build without the plugin has no key, and the list says so instead of showing anything. If you can't use the plugin, pass the key yourself with the buildKey option. See Reference.

Where to go next

  1. Make a bucket: Storage.
  2. Put the list in the app: App setup.
  3. Publish: Publishing, then CI.

Or do all three in a few minutes against a local server: Quick start.

Next: Quick start

On this page