Syntax
Arguments
os
Platform to run on. Optional.androidora- Run on Androidiosori- Run on iOS (macOS only)
udid
The device/simulator UDID to run on. Optional. If not specified, the default device will be used or you’ll be prompted to select one.Options
—ios
Target iOS platform (shorthand foros=ios).
—android
Target Android platform (shorthand foros=android).
—build=TYPE
Build type. Default:debug
debug- Debug build with developer toolsrelease- Release build (optimized, signed)bundle- Android App Bundle (AAB) for Play Store
—watch, -W
Enable hot reloading during development. File changes will automatically sync to the running app.—start-url=PATH
Set the initial URL/path to load when the app starts.NATIVEPHP_START_URL in your .env file.
—no-tty
Disable TTY mode for non-interactive environments (CI/CD).Examples
Run on Android with hot reload
Run on iOS simulator
Run release build on specific Android device
Run with custom start URL
Quick Android run with shorthand
What it does
- Validates configuration: Checks that
NATIVEPHP_APP_IDis set - Prepares build: Copies PHP application to native project
- Compiles assets: Runs Vite/Mix build process
- Builds native app: Compiles Android (Gradle) or iOS (Xcode) project
- Installs app: Deploys to connected device or simulator
- Launches app: Starts the application on the device
Hot reload with —watch
When using the--watch flag:
- Requires Watchman: Install from https://facebook.github.io/watchman/
- Monitors changes: Watches your Laravel application files
- Auto-syncs: Pushes changes to the running app without rebuilding
- Fast iteration: See changes in seconds instead of minutes
Platform notes
Android- Requires Android SDK and emulator or physical device
- Supports WSL on Windows (via adb connection)
- First build may take several minutes
- Only available on macOS
- Requires Xcode and iOS Simulator or physical device
- Physical devices require Apple Developer account
See also
- native:watch - Hot reload for running apps
- native:package - Build production-ready packages
- native:build-ios - iOS-specific build command