Mobile Overview
| Question | Flag |
|---|---|
| Is it a mobile app? | --mobile / --no-mobile |
| Build and upload store releases on GitHub Actions? | --ci / --no-ci |
--mobile adds Capacitor: the web app, packaged as native Android and iOS apps. The project gets capacitor.config.ts, the mobile:* scripts, @inglorious/capacitor, a native key in package.json and, with Inglorious UI, an app shell where only the page scrolls, a bottom tab bar that becomes a drawer on wider screens, and safe-area spacing.
Prerequisites
Native builds depend on platform tools the CLI doesn't install. If the app doesn't run after scaffolding, one of these is usually missing.
Android
- Android Studio with the Android SDK.
- A JDK that Capacitor supports. JDK 21 works reliably: prefer it over newer versions if Gradle complains.
JAVA_HOMEpointing to the JDK, andANDROID_HOMEto the SDK:
export JAVA_HOME="/path/to/jdk-21"
export ANDROID_HOME="$HOME/Library/Android/sdk"
export PATH="$ANDROID_HOME/platform-tools:$PATH"iOS, on a Mac:
- Xcode, with its iOS platform and simulators.
- An Apple Developer team to sign with.
- On a physical iPhone, Developer Mode on, and the developer certificate trusted under Settings → General → VPN & Device Management.
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -license acceptWithout a Mac, Cloud Builds build and upload the iOS app on GitHub Actions.
First run
Create the native projects once. Each starts with your logo as its icon and splash screen:
pnpm mobile:init:android
pnpm mobile:init:iosThen run the app:
pnpm mobile:android # or pnpm mobile:ios: build, sync and run
pnpm mobile:dev:android # or pnpm mobile:dev:ios: live reload on the deviceCommit android/ and ios/. You won't need to edit them: what the app needs from them is in Native Settings.
What's in this section
- Native Settings: Team ID, permissions, Info.plist, privacy manifest, from
package.json. - Live Reload on a Device: see every save on the phone.
- Icons and Splash Screens: all sizes from one logo.
- Opening Links in the App: Universal Links and App Links.
- Native Features: system bars, back button, swipe back, haptics, keyboard, sensors, share, storage, biometrics, notifications.
- App Updates: live updates and mandatory native updates.
- Releasing to the Stores and Cloud Builds.
- Store Requirements and Store Listing Images.
