/iblai-build
Build and run your ibl.ai app on desktop and mobile using Tauri v2. Covers
iOS, Android, macOS/Linux desktop, and Surface tablet builds.
Before adding build support or running a dev build,
stop all running dev
servers (
,
, etc.) to avoid port conflicts. Kill any
process on port 3000 before proceeding.
When the user asks to add iOS or Android build support, automatically start
the emulator/simulator after initialization -- just like you would start
after adding auth. Run
to find the
available device name, then start the dev build with that device.
Do NOT guess device names. Always run
first and use
a device name from the output.
Prerequisites (All Platforms)
- Tauri support added to your project:
bash
iblai add builds
pnpm install
- Rust toolchain installed via rustup
How Dev Builds Work
All platforms (desktop and mobile) use a static
export. The CLI
runs the frontend build automatically before starting the Tauri dev server --
there is no separate
or
. The Tauri WebView loads
the static files from
on all platforms.
Mobile Safe Area
The generated CSS includes
padding: env(safe-area-inset-*)
on
and
the layout sets
. This prevents content from overlapping
with the iOS status bar / notch and Android status bar. If you see content
behind the status bar, verify:
- (or ) has
padding-top: env(safe-area-inset-top)
on body
- metadata includes
viewport: "width=device-width, initial-scale=1, viewport-fit=cover"
App Icons
Generate platform-ready icons from your logo (works for all platforms):
bash
iblai builds iconography path/to/logo.png
This creates all required sizes in
.
List Available Devices
iOS
Build and run on iOS Simulator and real devices.
iOS Prerequisites
- macOS (iOS builds require Xcode)
- Xcode installed from the Mac App Store (includes iOS SDK + Simulator)
- Xcode Command Line Tools:
- Rust iOS targets:
bash
rustup target add aarch64-apple-ios aarch64-apple-ios-sim
Initialize iOS Project
Run this once after adding Tauri support:
This generates
with the Xcode project, Swift bridge
code, and iOS configuration.
If you get a Rust target error, make sure both targets are installed:
rustup target add aarch64-apple-ios aarch64-apple-ios-sim
Run on iOS Simulator
First, find available simulators:
Then start the dev build with a device from the output:
bash
iblai builds ios dev --device "<device name from iblai builds device>"
Or without specifying a device (uses the default simulator):
This starts the Next.js dev server, compiles Rust for
,
and launches the app in the iOS Simulator. The first build takes
several minutes; subsequent builds are fast.
Troubleshooting Simulator
- "No available iOS simulators": Open Xcode > Settings > Platforms > download an iOS runtime
- Build fails with "linking" errors: Verify Xcode path with . If incorrect, the user should run
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
themselves (requires elevated privileges -- confirm with the user before suggesting this)
- Simulator won't launch: Try
xcrun simctl shutdown all
then retry
Run on Physical iOS Device
Connect your iPhone via USB, then:
bash
iblai builds ios dev --device
Requirements for Physical Devices
- Apple Developer account (free or paid)
- Device registered in your Apple Developer portal
- Development provisioning profile configured in Xcode
To set up signing:
- Open
src-tauri/gen/apple/<app>.xcodeproj
in Xcode
- Select the target > Signing & Capabilities
- Set your Team and Bundle Identifier
- Xcode auto-manages provisioning profiles
Free developer accounts can run on up to 3 devices for 7 days.
A paid Apple Developer Program ($99/year) removes this restriction.
Build Release .ipa
Local Build
Or:
The .ipa file is generated at
src-tauri/gen/apple/build/
(or use
find src-tauri/gen/apple -name "*.ipa"
to locate it).
App Store Build (CI)
Generate the GitHub Actions workflow:
bash
iblai builds ci-workflow --ios
This creates
.github/workflows/tauri-build-ios.yml
which sets up the
full pipeline and uploads the .ipa as a build artifact.
Required GitHub Secrets for iOS CI
| Secret | Description |
|---|
| Base64-encoded App Store Connect API key (.p8 file) |
| Key ID from App Store Connect > Users and Access > Keys |
| Issuer ID from App Store Connect > Users and Access > Keys |
To encode your .p8 key:
bash
base64 -i AuthKey_XXXXXXXXXX.p8 | pbcopy
Android
Build and run on Android emulators and real devices.
Android Prerequisites
- Android Studio with SDK and NDK installed
- Android SDK (API level 24+)
- Rust Android targets:
bash
rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
Initialize Android Project
bash
iblai builds android init
This generates
with the Gradle project.
Run on Android Emulator
First, find available emulators:
Then start the dev build:
Or:
Run on Physical Android Device
Connect your device via USB with USB debugging enabled, then:
bash
iblai builds android dev --device
Build Release APK
bash
iblai builds android build
Or:
Android CI
bash
iblai builds ci-workflow --android
macOS (Desktop)
macOS Prerequisites
- Xcode Command Line Tools:
Run in Dev Mode
Or:
Build Release .dmg / .app
Or:
macOS CI
bash
iblai builds ci-workflow --mac
Surface
Build for Microsoft Surface tablets running Windows.
Surface Prerequisites
- Visual Studio Build Tools with C++ workload
- WebView2 runtime (included on Windows 11, downloadable for Windows 10)
Run in Dev Mode
Build Release .msi / .exe
The installer targets are configured in
src-tauri/tauri.conf.json
under
(includes
and
by default).
Surface CI
bash
iblai builds ci-workflow --windows
Linux (Desktop)
Linux Prerequisites
- System dependencies (Debian/Ubuntu):
bash
sudo apt install libwebkit2gtk-4.1-dev build-essential libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
Run in Dev Mode
Build Release .deb / .AppImage
Linux CI
bash
iblai builds ci-workflow --linux
All Platforms CI
Generate CI workflows for all platforms at once:
bash
iblai builds ci-workflow --all
Summary of Commands
| Task | Command |
|---|
| Add Tauri support | |
| Generate app icons | iblai builds iconography logo.png
|
| List available devices | |
| iOS | |
| Initialize iOS project | |
| Run on iOS Simulator | |
| Run on specific simulator | iblai builds ios dev --device "<name>"
|
| Run on physical iPhone | iblai builds ios dev --device
|
| Build release .ipa | |
| iOS CI workflow | iblai builds ci-workflow --ios
|
| Android | |
| Initialize Android project | iblai builds android init
|
| Run on Android emulator | |
| Run on physical Android | iblai builds android dev --device
|
| Build release APK | iblai builds android build
|
| Android CI workflow | iblai builds ci-workflow --android
|
| Desktop | |
| Run desktop dev mode | |
| Build desktop release | |
| macOS CI workflow | iblai builds ci-workflow --mac
|
| Surface CI workflow | iblai builds ci-workflow --windows
|
| Linux CI workflow | iblai builds ci-workflow --linux
|
| All CI workflows | iblai builds ci-workflow --all
|
Reference
- iblai-app-cli -- CLI source and templates
- -- full list of build commands