AbsoluteJS

Development

The same bun dev that serves your site runs your app on an Android emulator, an iOS simulator or a phone on your desk. Edits reach the app as fast as they reach the browser.

#bun dev

With a mobile block in absolute.config.ts, bun dev starts a target for every platform in mobile.platforms. The first run sets up what is missing, asking before it installs anything:

1
Install the Android toolchain
If the Android SDK, emulator or Java is missing, bun dev asks: “Android development is not configured. Install the tested toolchain now?” Yes installs checksum-verified tools, API 36, build tools and Java 21.
2
Create the native project
Without a native project yet, it asks “Create the managed Capacitor Android project now?” and generates it. For iOS, run absolute mobile init once first.
3
Prepare iOS
On a Mac it installs a missing iOS Simulator runtime when you agree. On Linux, Windows or WSL it uses your paired Mac.
4
Launch the app
The emulator and simulator start, the app installs, and it opens your entry route from the dev server you are already running.
bun dev
$ bun dev
➜ Local: http://localhost:3000/ ➜ Mobile: http://localhost:3000/__absolute/mobile-preview

Mobile targets start only in an interactive terminal. To run the web server alone:

BASH
bun dev --no-mobile               # web only for this run
ABSOLUTE_NO_MOBILE=1 bun dev      # same, for scripts and CI

#Live reload on device

A release build carries its pages inside the app. In development, the app loads them from your dev server instead, so hot reload works exactly as it does in the browser. Emulators reach the server through adb reverse and the iOS Simulator through loopback. When the session ends, or the next time a crashed session is detected, the native project goes back to its production settings, so a development address never ends up in a store build.

When you changeWhat happens
A page, component, stylesheet or public assetHot update on every target, including the app. No native rebuild.
absolute.config.ts, package.json or the lockfileThe native project is synced and rebuilt automatically.
capacitor.config.ts or files in the native projectThe native project is synced and rebuilt automatically.
An Expo native routeMetro Fast Refresh, as in any Expo app. See Expo.

#Logs and shortcuts

The app’s console output streams into the same terminal as your server, tagged [android] or [ios]. Type these at the bun dev prompt:

d or deviceShows each mobile target, the emulator, simulator or device it is using, and its state.
relaunchCloses and reopens the installed app without restarting the server.
Ctrl-CStops the server and native logs, and puts the native project back to its production settings. Emulators and simulators stay warm for next time.

#Physical devices

Android. Connect the phone with USB debugging allowed, then pass its serial. The dev server listens on your local network so the phone can reach it.

BASH
adb devices                                   # find the serial of the phone
bunx absolute dev --android-device R58N12ABCDE

iOS. Pair the iPhone or iPad in Xcode, turn on Developer Mode, and choose a Development Team with automatic signing in the generated workspace once. Any identifier devicectl accepts works: the UDID, the device name or its serial number. AbsoluteJS builds, installs and launches the app, and later starts skip Xcode when nothing native has changed.

BASH
xcrun devicectl list devices                  # find the device identifier
bunx absolute dev --ios-device "Ada’s iPhone"
HTTPS in development
Set dev.https and the app uses it too; there is no separate native setting. Android trusts the development certificate through a debug-only network setting that is removed when the session ends. The iOS Simulator gets it installed automatically. On a real iPhone, open the one-time link the terminal prints, install the profile, and turn it on under Settings → General → About → Certificate Trust Settings.
TS
import { defineConfig } from '@absolutejs/absolute';

export default defineConfig({
  dev: { https: true },
  mobile: {
    appId: 'com.example.shop',
    appName: 'Shop',
    server: { productionOrigin: 'https://shop.example.com' }
  }
});

#Browser preview

Open the Mobile URL that bun dev prints, /__absolute/mobile-preview, to run your real pages inside an iOS- or Android-shaped frame with no SDK installed. It is more than a resized viewport: @absolutejs/devices and @absolutejs/http behave as they do in the app, and a panel drives the device around them.

PlatformSwitch between iOS and Android, with each platform’s safe areas.
Route or deep linkOpen any route directly, or deliver it the way a tapped deep link would.
NetworkWi-Fi, cellular or offline. Offline rejects your app’s requests while hot reload keeps working.
LifecycleSend active, inactive and background transitions.
Back and keyboardPress Android Back and show or hide the keyboard.
PermissionsSet camera, location and notification permissions to granted, denied or prompt.

Use it for fast work on app behavior, and an emulator, simulator or device for anything the operating system does itself:

FeatureBrowser previewEmulator or device
Your pages with hot reload
Platform, network, lifecycle, Back and keyboard
Camera, location and notification permissions
Native rendering and WebView differences
Sign-in through the system browser
Keychain and Keystore storage
Push delivery
Background tasks and the app being closed by the OS
Needs an SDKNoYes

#iOS from Linux or Windows

Xcode only runs on macOS, so AbsoluteJS uses a Mac you own as the iOS build host while you keep working on Linux, Windows, WSL or another Mac. Your editor, Bun and the dev server stay on your computer. The app in the Mac’s simulator reaches your dev server through an SSH tunnel, so hot reload works without copying anything for page edits. Set up the Mac once:

1
Xcode
Install full Xcode, accept its license and add an iOS Simulator runtime.
2
Bun
Install Bun. ~/.bun/bin/bun is found even when SSH sessions do not put it on PATH.
3
Remote Login
Turn on Remote Login in System Settings → General → Sharing, and allow public-key login and TCP forwarding.
4
Devices (optional)
For a real iPhone or iPad, pair it in Xcode, turn on Developer Mode, keep it on the Mac’s network, and set the Development Team once in the generated workspace.

Check that you can SSH in with a key, then pair. Pairing confirms the Mac has macOS, Bun and Xcode, and stores only connection details, in ~/.absolutejs/mobile/remote-macs.json. The last Mac you paired is the default; ABSOLUTE_IOS_REMOTE=<name> picks another.

BASH
ssh builder@my-mac.local                      # accept the host key once
bunx absolute mobile pair mac studio builder@my-mac.local

# Another SSH port or workspace on the Mac
bunx absolute mobile pair mac studio builder@my-mac.local \
  --port 2222 \
  --workspace /Users/builder/AbsoluteJS

From then on bun dev uses the Mac for iOS automatically, and --ios-device works for a phone on the Mac’s network. A Capacitor app needs its iOS project first (absolute mobile init); Expo generates its own.

What
Sent to the MacYour project, as an atomic snapshot, plus a checksum-verified AbsoluteJS agent
Never sent.git, node_modules, build output, .absolutejs state, environment files, signing keys and profiles, Android keystores
Kept on the Mac between runsnode_modules, Xcode DerivedData and the installed app, so later starts are fast
Stays on your computerThe dev server, hot reload, logs and the development certificate’s private key
BASH
bunx absolute mobile remotes                  # list paired Macs
bunx absolute mobile remotes inspect studio   # disk use, caches, active builds
bunx absolute mobile doctor ios --remote studio
bunx absolute mobile remotes clean studio --yes
bunx absolute mobile unpair mac studio

Unpairing removes only the local profile, never files on the Mac. The same Mac signs and uploads iOS releases; see Release.

#Checking your setup

mobile doctor checks the tools each platform needs and says what is missing; --fix installs it. Against a paired Mac it only reports, since the Mac is yours to configure.

BASH
bunx absolute mobile doctor                   # every platform
bunx absolute mobile doctor android --fix     # install the SDK, emulator and Java 21
bunx absolute mobile doctor ios --fix         # on a Mac: install a missing simulator runtime

mobile inspect reports how AbsoluteJS sees your project: app identity, platforms, the device features found in your code and the plugins they need, whether the native projects exist, and whether the packaged pages are complete. It changes nothing, so it is safe in CI; --require-bundle fails when the packaged pages are missing or out of date.

BASH
bunx absolute mobile inspect
bunx absolute mobile inspect --json --require-bundle