Mobile apps (iOS and Android)
Docs Mobile iOS and Android · 49 min to read this section

#Mobile apps (iOS and Android)

Kreft apps run on phones in two ways. Both start from the same .kreft code.

1. An installable website (PWA). kreft build --pwa also writes manifest.webmanifest, a service worker sw.js and pwa-register.js. Visitors can add the site to their home screen, and pages they have seen open without a connection. Requests to /api/ are never cached. Put a 512x512 icon.png next to index.html for the home screen icon.

2. A real app with Capacitor. The built site runs inside a native WebView and goes to the App Store or Google Play.

BASH
kreft new my-app --mobile        # or: kreft mobile:init in an existing app
npm install
kreft mobile:build --android --api-url https://api.example.com
kreft mobile:open --android      # Android Studio (--ios: Xcode, needs a Mac)
CommandWhat it does
kreft mobile:init (alias kreft make:mobile)Adds capacitor.config.json, the Capacitor packages, the native plugins, the mobile:* scripts and the phone UI kit
kreft mobile:build [--android] [--ios]Builds the site with a relative base, adds the platform the first time, then runs cap sync. Without a flag it syncs the platforms that exist. (No service worker goes into a phone app: its files are inside the app.)
kreft mobile:run [--android] [--ios] [--target id]The one command to see your app: builds, then installs and starts it on an emulator or phone. With one running Android device it uses that one; with several (or none) Capacitor asks, or pass --target emulator-5554. Run it again after every change
kreft mobile:setupFirst-run setup: key:generate (only when APP_KEY is missing), storage:link and migrate. Safe to run again. mobile:dev runs it for you
kreft mobile:openOpens the native project
kreft mobile:dev [--android] [--ios] [--target id] [--lan] [--no-setup]Runs the first-run setup, starts your dev server and runs the app with live reload: a saved change shows on the phone within a second or two, without building again
kreft mobile:ui [--layout] [--gallery]Adds the phone UI kit to an app
kreft mobile:releaseA signed release: .apk and .aab (Android), .ipa (iOS), .hap and .app (HarmonyOS). See the release guide.
kreft mobile:icons / kreft mobile:splashMakes the app icon and splash screens
kreft mobile:helpLists these commands in the terminal

Building the Android app needs Java 21, 22 or 23 (Capacitor 7 uses Gradle 8.11). An older Java fails with invalid source release: 21, and a newer one (24, 25, 26) fails with Unsupported class file major version. The kreft mobile:* commands pick a fitting Java by themselves: the one Gradle already downloaded, an installed JDK, or the one inside Android Studio (they print Using Java 21 from …). If none is found they say so; install one with brew install --cask temurin@21 (or from adoptium.net), or point to it yourself: export JAVA_HOME="/path/to/jdk-21". Running from Android Studio (kreft mobile:open --android) needs no extra setup. The iOS Simulator needs a full Xcode install, not only the command line tools.

The backend does not run inside the phone. Run it on a server and give the app its address with --api-url (written to .env as PUBLIC_API_URL), then in your code:

JS
Kreftjs.api.setup({ base: Kreftjs.env.PUBLIC_API_URL, token: () => Kreftjs.storage.get('token') })

Use API tokens for sign-in in the app, not cookie sessions.

#Run it on an emulator, a simulator or a phone

Side menu. <edge-side-nav> takes the same colour props as the bars (bg, color, activeColor, indicatorColor, borderColor) and highlights the item for the page you are on. Without colours of its own, the bottom bar shows the active button in the accent colour with a soft tint behind its icon; the layout's dark bars use white on a see-through white pill.

Dark bars. The phone kit starts with a dark top bar and bottom bar (#111827). The strips behind the clock and the gesture bar follow them: backgroundColor in capacitor.config.json, an Android window background that mobile:build and mobile:dev add to styles.xml once, and Kreftjs.native.system.statusBar({ color, style: 'auto' }), which picks light icons on a dark colour. For a light look set bg, color, activeColor, indicatorColor and borderColor in the layout's Appearance block. With a USB cable, mobile:dev reopens the cable tunnel by itself if Android's tooling drops it while installing.

kreft mobile:build only prepares the native project: it builds the site and copies it into android/ or ios/. To see the app, run kreft mobile:run --android (or --ios) inside your app folder: it builds, installs the app on the emulator or phone and starts it. Or open the project yourself in Android Studio or Xcode, or use kreft mobile:dev for live reload.

Android emulator (Mac, Windows, Linux):

  1. Install Android Studio. In Device Manager choose Create Device, pick a Pixel phone and a recent system image, and start it.
  2. In your app folder: kreft mobile:run --android. After each change to your code, run it again.
  3. Prefer Android Studio? kreft mobile:build --android, then kreft mobile:open --android and press the green Run button.

iOS Simulator (Mac only):

  1. Install Xcode from the App Store and open it once to accept the license. Then run sudo xcode-select -s /Applications/Xcode.app/Contents/Developer.
  2. In your app folder: kreft mobile:run --ios. Or kreft mobile:build --ios, then kreft mobile:open --ios; in Xcode choose a simulator (for example an iPhone) at the top and press Run. The first build may ask you to install CocoaPods.

A real phone. Android: turn on Developer options and USB debugging, plug it in, and choose it in Android Studio's device list. iPhone: plug it in, trust the computer, choose it in Xcode and pick a signing team (a free Apple ID works for testing).

Live reload. kreft mobile:dev --android (or --ios) starts your dev server and runs the app on the emulator or phone, so a saved change shows up without building again. It picks the running device by itself and takes the next free port if 8000 is busy, telling the app the right one. It needs the Capacitor tools from npm install.

  • Through the cable (the default for Android). When an Android phone or emulator is connected through adb (USB with USB debugging on, or wireless debugging), mobile:dev runs adb reverse, which makes the phone's localhost:8000 lead to your computer. No Wi-Fi is needed, it works behind any firewall, and the dev server listens on your computer only, not on the network. It removes the tunnel when you stop it.
  • Through the Wi-Fi. For iOS, when no Android device is connected yet, or with --lan, the app uses your computer's address on the Wi-Fi (10.0.2.2 for an emulator), so the phone must be on the same Wi-Fi as the computer, and the dev server is open to that network.

Use a network you trust. In Wi-Fi mode (iOS, --lan, or no Android device connected) the dev server listens on your whole network (--host 0.0.0.0), so anyone on the same Wi-Fi can open it. Do it at home or on a private network, never on a public one, and stop it when you are done. Through the cable (the Android default) it is not open to the network at all.

First-run setup. Before it starts the server, mobile:dev runs kreft mobile:setup (skip it with --no-setup): it creates .env and a new APP_KEY when they are missing (a fresh checkout from git has no .env), links storage for public files, and runs the database migrations. A new database is also seeded, so the test user exists. Every step only does something when it is needed, so running it again is harmless. A good APP_KEY is never replaced (that would log every user out), and the key is never printed.

Where is the backend? The backend runs on your computer or a server, never inside the phone. Give the app the address the phone can reach:

The app runs onAddress of the server on your computer
Android emulatorhttp://10.0.2.2:8000
iOS Simulatorhttp://localhost:8000
A real phone on the same Wi-Fihttp://192.168.x.x:8000 (your computer's address; start the server with kreft dev --host 0.0.0.0)
After you publishhttps://api.your-site.com
BASH
kreft mobile:build --android --api-url http://10.0.2.2:8000

Plain http:// is for testing; a published app should always use https://.

Run a mobile command from any folder. Every kreft mobile:… command (and kreft make:home) takes --app <folder>, which is the same as going into the app first: kreft mobile:dev --android --app ~/projects/my-app.

#Mobile and desktop in one app

kreft new my-app --mobile --electron makes one project for both. Pages use the dashboard layout (layouts/app.kreft) as in a web app, and pages/Home.kreft shows the desktop workspace inside the Electron window and the phone screen everywhere else (the phone one draws its own top bar and bottom bar). With only --mobile, every page uses layouts/mobile.kreft. To use the phone layout in a project that has both, run kreft mobile:ui --layout.

#The animated splash screen

A phone app shows the native splash screen (made by kreft mobile:splash) while the web part loads. The kit adds an animated splash that takes over from it without a flash: your logo moves, the app name fades in, and when the app is on the screen it fades away. It is the <div id="edge-splash"> in index.html. The native splash covers only the first moment (launchAutoHide: false in capacitor.config.json lets the page decide): as soon as the animated one is painted, the native one fades away and the animation plays. Give both the same background colour, so nothing flashes: kreft mobile:splash splash.png --bg "#ffffff" for the native one and --edge-splash-bg for the animated one. The splash is never stuck: it is gone after 8 seconds at the latest.

HTML
<div id="edge-splash" class="edge-splash" data-anim="pulse" data-web="false">…</div>
  • data-anim is pulse (the logo breathes), zoom (it pops in), rise (it slides up) or none.
  • data-web="true" shows it in a browser too; by default a browser skips it.
  • Colours: --edge-splash-bg and --edge-splash-fg in edge.css (they follow dark mode). Change the logo by changing the <img>.
  • From code: Kreftjs.native.splash.set({ minTime: 1500, anim: 'zoom' }) (the animation plays at least minTime milliseconds from when it appears; 900 by default, and 0 means as soon as the app is ready) and Kreftjs.native.splash.hide().
  • People who asked their phone for less motion get a plain fade.

To turn it off, delete the #edge-splash element and set "launchAutoHide": true under plugins.SplashScreen in capacitor.config.json.

#Home pages made for apps

A website's welcome page is not what an app should open on. kreft new my-app --mobile writes a phone home screen (a gradient greeting card with a time-of-day hello and the signed-in user's name, shortcut tiles that animate in one after another, a card that shows the touch events; the top bar and bottom tab bar come from the layout), and kreft new my-app --electron writes a desktop workspace (sidebar, toolbar with search, info cards, shortcuts). With both flags, pages/Home.kreft shows the desktop one inside the Electron window and the phone one everywhere else.

BASH
kreft make:home --mobile      # in an existing project: phone home screen (replaces pages/Home.kreft)
kreft make:home --desktop     # desktop workspace

They are normal files (components/HomeMobile.kreft, components/HomeDesktop.kreft), so change them freely. Preview either in a browser with ?platform=mobile or ?platform=desktop. Links to the dashboard, users and profile appear only when the project has them (not with --no-auth).

#Touch events

HTML
<div @tap={open}>Open</div>
<li @swipeleft={remove($event)} @longpress={select}>Row</li>
<section @swipe={go($event)}>…</section>   <!-- $event.direction: left | right | up | down -->

@tap (moves less than 10px, under 500ms), @longpress (held still for 500ms), @swipe and @swipeleft, @swiperight, @swipeup, @swipedown (40px or more in under 800ms). They use pointer events, so they work with a finger, a pen and a mouse. .once, .prevent and .stop work. A horizontal swipe keeps vertical scrolling working.

The starter ui.css already pads the page for the notch (env(safe-area-inset-*)), removes the tap delay and makes buttons and fields at least 44px high on touch screens. New projects have viewport-fit=cover set by kreft build --pwa.

#The phone UI kit

kreft new my-app --mobile also installs a kit made for phones: 42 components (edge- tags), a native API (Kreftjs.native), a stylesheet (edge.css), a layout whose bars never move, and a page that shows everything live. In an existing app: kreft mobile:ui adds the components, the native API and the stylesheet; kreft mobile:ui --layout also uses the phone layout for every page; kreft mobile:ui --gallery adds the /edge page.

The files are copied into your project (components/edge/, kreftjs-native.js, edge.css, layouts/mobile.kreft), so you can change any of them. Running the command again only adds what is missing; it never overwrites your edits.

#Top bar and bottom bar that never move

layouts/mobile.kreft puts the page between a top bar and a bottom bar. Only the page scrolls: the bars stay exactly where they are, the document itself does not scroll and does not bounce. They keep clear of the notch and the home bar by themselves.

The starting look is the base block at the top of that file: dark bars and a dark side menu. Take the colours out of that block and the bars follow edge.css (light in light mode, dark in dark mode). Any page can change the look, and it goes back to the base on the next page:

HTML
use edge

on ready {
  edge.setTop({ title: 'Cart', center: true, bg: '#111827', color: '#ffffff',
    right: [{ icon: 'search', id: 'search', onTap: () => openSearch() }, { icon: 'bell', badge: 3 }] })
  edge.setBottom({ labels: 'active', indicator: 'line', floating: true, activeColor: '#38bdf8' })
}
edge.setTop({ … })
title, subtitleThe text. Without a title the page's .title('…') from the routes is used.
back'auto' (default: an arrow on pages that are not a bottom button), true or false.
bg, color, heightColours and the height in px (the notch area is added).
center, border, elevated, blurCentre the title, the line under the bar, a shadow, frosted glass.
largeA big title under the bar. It folds into the bar when the page scrolls, and opens again at the top.
loadingA thin moving line under the bar while you work.
left, rightButtons: [{ icon | text | src, label, id, badge, disabled, onTap }]. badge: true is a dot.
showfalse hides the bar. edge.hideBars() and edge.showBars() do both bars.
edge.setBottom({ … })
itemsThe buttons: [{ label, icon | text | src, activeIcon, to, badge, disabled, primary, onTap }]. An item with to opens that page and is active on it. badge: true is a dot. primary: true is a raised round button (the "+" in the middle).
labels'always', 'active' or 'never'.
indicator'pill', 'line' or 'none': what shows the active button. It slides from one button to the next.
bg, color, activeColor, heightColours and height.
border, floating, blur, hapticsThe line above, a rounded floating bar, frosted glass, a small buzz on tap.

edge.reset() goes back to the defaults. The two bars are also ordinary components you can use anywhere: <edge-top-bar title="Cart" back bg="#111" color="#fff"> and <edge-bottom-nav items={tabs} labels="active">, with the same names as props. The top bar also has a below slot for a row under it (a search field, tabs). Colours for the whole app are the variables at the top of edge.css (--edge-top-bg, --edge-bottom-active, --edge-accent, --edge-radius …); they follow your ui.css colours, so dark mode works by itself. See One look for the whole kit.

The side menu is <edge-side-nav k-model="menuOpen"> at the end of the layout. It lists the pages of the bottom bar; give it your own items to change that.

Putting the bars in your own layout:

HTML
<edge-shell>
  <template k-slot:top><edge-top-bar title="Home"></edge-top-bar></template>
  …the page…
  <template k-slot:bottom><edge-bottom-nav items={tabs}></edge-bottom-nav></template>
</edge-shell>

#Components

Every component has a comment at the top of its file listing its props. Values that change come back with k-model (prop modelValue and event update:modelValue), the way k-model on a component works. Open /edge in your app (or run it in a browser) to see and try all of them.

ComponentWhat it is
edge-shellThe frame: top slot, page that scrolls, bottom slot, and an overlay slot.
edge-top-barThe bar at the top: title, back arrow, buttons with badges, colours, a large title that folds away, a loading line.
edge-bottom-navThe row of buttons at the bottom: icons, labels, badges, a sliding indicator, a primary round button.
edge-side-navA drawer from the side with a backdrop (k-model, side, items with sections and dividers, title, subtitle, avatar). Drag it back, tap outside or press Esc to close.
edge-tab-rowTabs in a row that scrolls sideways, with badges and a line that slides (variant: line or pills).
edge-row, edge-columnChildren side by side or one under another (gap, align, justify, wrap, pad).
edge-stackChildren on top of each other (align).
edge-spacer, edge-dividerSpace (flexible or size), a line (label, vertical, inset, space).
edge-scroll-viewA box that scrolls on its own (horizontal, snap, hideBar).
edge-listRows like a settings screen (items, inset, header, footer, dense, or the item slot). A row can have a coloured icon tile (color), a tick (checked) and a danger look.
edge-lazy-gridA grid that draws more items as you scroll (columns or min, step).
edge-virtual-listThousands of equal rows, only the visible ones exist (itemHeight).
edge-carouselCards you swipe sideways with the next one peeking (peek, autoplay).
edge-pagerFull pages you swipe between, with dots (k-model is the page).
edge-textText: size, weight, color, muted, tone, lines (cut with …), mono, upper.
edge-icon66 built-in icons (name), your own picture (src) or a glyph (text); filled; arrows turn around in right-to-left languages.
edge-imageLoads near the screen, keeps its shape, shimmers while it loads (ratio, radius, fit, placeholder).
edge-badgeA small number or a dot (value, dot, max, tone, soft, ring, pulse).
edge-chipA pill: a filter or tag (selected, check, closable, tone, size, disabled).
edge-shapeA coloured shape: circle, rect, rounded, pill, triangle, diamond, hexagon, star.
edge-canvasA drawing surface with a sharp 2D context (@draw, @pointer).
edge-progress-barA progress bar, or a moving one when the amount is unknown (indeterminate); circle makes it a ring; tone.
edge-activity-indicatorA spinner (size, color, thickness).
edge-accordionSections that open and close with a slide (items, single, inset, icon).
edge-buttonA button made for thumbs: variant (filled, tonal, soft, outline, text, danger, success), size, icon, iconEnd, square, badge, full, loading.
edge-button-groupA segmented control: one choice out of a few (options, k-model, size). The picked mark slides.
edge-text-inputA field with label, icon, hint, error, clear button; no zoom on iPhone. Also variant (outline, filled), prefix, suffix, counter, required, loading.
edge-checkbox, edge-toggleA checkbox and a switch (k-model, label, subtitle).
edge-radio-group, edge-selectOne choice out of a few (cards draws each as a box); a dropdown that opens the phone's own picker.
edge-sliderA range slider (min, max, step, showValue, unit, iconStart, iconEnd).
edge-modalA dialog over the page (k-model, title, icon and tone, position, fullscreen, footer slot).
edge-bottom-sheetA panel from the bottom you drag down to close (size: auto, half, full; subtitle, closeButton, footer slot).
edge-menuA small menu from a button (sections, ticks, a second line); it opens upward when there is no room below; sheet opens it as an action sheet.
edge-fabThe round floating button, extended with a label; actions fan out small buttons above it (a speed dial).
edge-pressableAnything pressable with the feeling you choose: @press, @longpress.
edge-gesture-area@tap, @doubletap, @longpress, @swipe, @swipeleft … on an area.
edge-refreshablePull down to refresh (refreshing, @refresh).
edge-web-viewA web page inside the app (http(s) only, sandboxed).

Layout helpers: classes in edge.css such as edge-row, edge-col, edge-center, edge-between, edge-grow, edge-pad, edge-page, edge-card (with edge-card-raised for a shadow), edge-section-title, edge-avatar, edge-skeleton (a grey box that shimmers while the real thing loads), edge-round, edge-muted, edge-ellipsis. Positioning: edge-rel on the parent, then edge-abs or edge-fixed with edge-top, edge-bottom-right, edge-cover and edge-z1 … edge-z3; edge-top-start, edge-bottom-end and friends follow the reading direction; edge-safe-top and edge-safe-bottom pad for the notch and the home bar. Add your own icon with Kreftjs.edgeIcons.add('logo', 'M2 2h20v20H2z') (a 24x24 path).

#One look for the whole kit

Every component reads the same variables at the top of edge.css. Change one there and the whole app follows.

VariablesWhat they set
--edge-bg, --edge-fg, --edge-muted, --edge-surface, --edge-card, --edge-raised, --edge-borderThe page, text, quiet text, soft fills, cards, what floats over the page (sheets, dialogs, menus, the drawer), lines. They follow ui.css.
--edge-accent, --edge-danger, --edge-success, --edge-warning and the same with -softThe four colours with a meaning, and the tint behind each.
--edge-text-xs … --edge-text-2xlThe type scale (12 to 34px).
--edge-radius-sm, --edge-radius, --edge-radius-lg, --edge-radius-xlCorners (10, 14, 20 and 28px).
--edge-space-1 … --edge-space-6, --edge-tapSpacing (4 to 32px), and 44px: the smallest thing a finger should have to hit.
--edge-shadow-1, --edge-shadow-2, --edge-shadow-3Shadows: a card, a floating button or bar, a sheet or dialog.
--edge-fast, --edge-normal, --edge-slow, --edge-ease, --edge-springHow long things move, and how.
  • Dark mode: the colours follow ui.css (the system setting, or data-theme="dark" on <html>). edge.css adds the dark values ui.css does not have.
  • Right to left: with <html dir="rtl"> the kit mirrors itself. The drawer opens from the right, the back arrow turns around, badges, switches and sliders change side. side="start" and position="end" follow the reading direction; left and right stay where they are.
  • Less motion: for people who asked their phone for less motion, nothing slides; things just appear.
  • Keyboard and screen readers: a visible focus ring, Esc closes the drawer, sheets, dialogs and menus, the focus moves into them and goes back when they close, and the arrow keys move through tabs, the bottom bar and menus.
  • Touch: there is at least 44px to hit (a small button or a chip gets an unseen margin around it), and everything shows that it is pressed.

#Native features: Kreftjs.native

kreftjs-native.js works in the phone app (through Capacitor plugins that kreft mobile:init adds), in Electron and in a plain browser (with what the browser has), so you can build the whole app in the browser first. Calls return a Promise and give a sensible default instead of failing when something is not available.

AreaCalls
Platformnative.platform() is 'android', 'ios', 'electron', 'tauri' or 'web'; isNative(), isDesktop(), isWeb().
Devicedevice.info() (platform, OS, model, screen), device.id(), device.battery(), device.language().
Hapticshaptics.impact('light' | 'medium' | 'heavy'), haptics.notification('success' | 'warning' | 'error'), haptics.selection(), haptics.vibrate(ms).
Filefile.pick({ accept, multiple }), file.readText(f), file.readDataUrl(f), file.write(path, data), file.read(path), file.list(dir), file.remove(path), file.save(name, data, mime).
Systemsystem.openUrl(url) (http, https, mailto, tel only), system.share({ title, text, url }), system.copy(text), system.paste(), system.network(), system.app(), system.statusBar({ color, style, overlay }), system.keyboard.show() and .hide(), system.hideSplash(), system.exit().
Dialogsdialog.alert(text, { title }), dialog.confirm(text, { ok, cancel, danger }) gives true or false, dialog.prompt(text, { value }) gives the text or null, dialog.actionSheet({ title, options }), dialog.toast(text, { tone, position, duration }).
Safe areasafeArea() gives { top, right, bottom, left } and sets the CSS variables --edge-safe-top … for you.
Positioningposition.get() (latitude, longitude), position.watch(fn) gives a stop function.
Eventson('pause' | 'resume' | 'network' | 'urlOpen' | 'keyboardShow' | 'keyboardHide', fn) gives a stop function.
Back buttonpushBack(fn): the newest handler gets the Android back button first (return false to pass it on); then the page goes back, then the app closes. Modals, sheets and drawers do this by themselves.
Assetsasset('img/logo.png') gives the right address inside the app, whatever the base.
Splash screensplash.set({ minTime, anim }) and splash.hide() control the animated splash screen; it hides itself once the app is ready.

On iPhone, camera, location and photo access need a usage text in ios/App/App/Info.plist (Apple asks for it); on Android the plugins add their permissions.

#App icon and splash screen

BASH
kreft mobile:icons logo.png --bg "#ffffff"                         # a 1024x1024 PNG: every icon size for android/ and ios/
kreft mobile:splash splash.png --bg "#ffffff" --dark-bg "#000000"   # a 2732x2732 PNG, with a dark version

They copy the picture to assets/ and use Capacitor's asset tool (the first run needs the internet). Then build again with kreft mobile:build --android.

#Coming from NativePHP Mobile

NativePHP MobileKreft
Device, File, SystemKreftjs.native.device, .file, .system
Native UI, Edge componentsthe edge- components above
Routing, Middlewarethe router and its guards, as in a web app
Layouts, Nested componentslayouts/mobile.kreft, and components with slots
DialogsKreftjs.native.dialog and edge-modal, edge-bottom-sheet
Safe area, PositioningKreftjs.native.safeArea(), the edge-safe-* and edge-abs classes, Kreftjs.native.position
EventsKreftjs.native.on(…), and component event / send()
App icons, Splash screenskreft mobile:icons, kreft mobile:splash
AssetsKreftjs.native.asset(…)

#Publishing your app to Google Play and the App Store

A release build is the signed file you upload to a store. It is different from the debug app that kreft mobile:run and mobile:dev install. Follow this list from top to bottom for every new version.

#The short way: kreft mobile:release

One command makes the signed files for a store, for each platform:

BASH
kreft mobile:release --android --api-url https://api.your-site.com --create-keystore   # first time: also makes the signing key
kreft mobile:release --android --api-url https://api.your-site.com --bump              # every later release
kreft mobile:release --ios --team ABCDE12345 --api-url https://api.your-site.com       # a Mac with Xcode
kreft mobile:release --harmony --api-url https://api.your-site.com                     # DevEco Studio
kreft mobile:release --api-url https://api.your-site.com                               # every platform that has a folder
kreft mobile:release --android --api-url https://api.your-site.com --dry-run           # show every step, change nothing
PlatformIt makesNeeds
Androidrelease/android/<name>-<version>-<code>.apk (to install or send to testers) and .aab (for Google Play)Android Studio, Java 21 to 23
iOSrelease/ios/<name>.ipa, from an Xcode archiveA Mac with Xcode, and your Apple Team ID (--team, or APPLE_TEAM_ID)
HarmonyOSrelease/harmony/…hap (an app package) and …app (for AppGallery), from hvigorDevEco Studio's command line tools (hvigorw) and a signing configuration

What every release does, in order: it checks your options before it changes anything, sets the version numbers, builds the site with --api-url and copies it into the app, signs the build, then writes the files to release/<platform>/ and prints each file's size and SHA-256. On Android it also checks the signature of the .apk with apksigner. The release/ folder is added to .gitignore.

OptionWhat it does
--api-url <https://…>The server the app talks to (or PUBLIC_API_URL in .env). A store build must use https and a real address: http://…, localhost, 10.0.2.2 and addresses inside your network are refused (--allow-insecure-api skips this, for a test build).
--no-api-urlThe app needs no server (pages only, no login or database). PUBLIC_API_URL in .env is ignored and no address is built into the app. Use this when .env still holds a test address like http://10.0.2.2:8000 from an emulator build: the release stops on it, and the message says it comes from .env.
--version <1.2.0>The version people see. Default: version in package.json.
--build <number>The build number the stores compare: Android versionCode, the iOS build, the HarmonyOS versionCode.
--bumpAdd 1 to the current build number instead. Every store upload needs a higher number than the last.
--out <folder>Where the files go. Default: release/.
--dry-runShow every step and the exact commands. Writes nothing.
--apk, --aabAndroid: only that format. Default: both.
--create-keystoreAndroid: make the signing key (see below).
--team <ID>, --method <m>iOS: your Apple Team ID, and how to export: app-store (default), ad-hoc, development or enterprise.
--hap, --appHarmonyOS: only that file. Default: both.

#Why --api-url, and do I always need it?

--dry-run isn't required. It's an optional preview that shows the steps and changes nothing. You only add it when you want to look first. A normal release is just:

BASH
kreft mobile:release --android --api-url https://api.your-site.com

--api-url is needed for a release because the backend doesn't run inside the phone. The app holds only your built pages, and those pages have to call a server somewhere. For a store build, Kreft must know the address of that server and bake it into the app. The release command also refuses addresses a phone can't reach, like http://…, localhost or 10.0.2.2, so a test address doesn't get shipped by mistake.

You can avoid typing it:

  • Put it in .env once: PUBLIC_API_URL=https://api.your-site.com. The release command reads it, so you can drop the flag.
  • If your app needs no server (pages only, no login or database), use --no-api-url instead.

For kreft mobile:run and mobile:dev you don't need it. They are for development, and they pick the address for you (the emulator reaches your computer through 10.0.2.2). Only a release needs the real server address.

Android signing. A release build must be signed. --create-keystore makes android/upload-keystore.jks and android/keystore.properties (a random password, readable only by you) once, adds the signing to android/app/build.gradle and puts the key files in android/.gitignore. It never replaces a key that exists. Copy both files somewhere safe outside the project (a password manager or an encrypted drive): without them you can never update the app. If you set the signing up by hand as described below, the command recognises it and leaves your build.gradle as it is.

iOS. The command runs xcodebuild archive for the App scheme in the Release configuration with automatic signing for your team, writes ExportOptions.plist and runs xcodebuild -exportArchive to make the .ipa. Upload an app-store build with Transporter or Xcode's Organizer. You must be signed in to your Apple ID in Xcode (Settings → Accounts) and have the Apple Developer membership.

HarmonyOS. The command runs kreft harmony:build, sets the version in harmony/AppScope/app.json5 and runs hvigor (assembleHap, assembleApp). Signing is set in DevEco Studio (File → Project Structure → Signing Configs, "Automatically generate signature" for a test device, or your AppGallery certificates). Without it the files are made unsigned, and the command says so.

The rest of this guide explains each step by hand, for when you want to do one yourself or the command stops and you need to know why.

#Before the first release

  1. Give the app its real id and name. kreft new gives it the id com.example.<name>, and stores refuse that. In capacitor.config.json set "appId": "com.yourcompany.myapp" (reverse domain, lowercase letters and digits) and "appName" before you run kreft mobile:build for the first time: the id is written into android/ and ios/ when they are created, and it can never change after the app is published. If you must change it later, delete android/ and ios/ (nothing in them is yours unless you edited them) and run kreft mobile:build again.
  2. Icon and splash screen. kreft mobile:icons logo.png and kreft mobile:splash splash.png (see App icon and splash screen).
  3. Point the app at your real server. The backend does not run inside the phone. Build with the address of your server:
    kreft mobile:build --android --api-url https://api.your-site.com

    A store app must use https://, and your server must allow the app in CORS. The address is written to PUBLIC_API_URL in .env. Never ship an address like http://10.0.2.2:8000 (that is the emulator's way to reach your computer).

  4. Developer accounts. Google Play: a one-time fee and identity checks. App Store: the paid Apple Developer Program. Both can take days to approve, so start early.

#Every release: the version number

A store accepts an upload only if its version number is higher than the one before. Android has two numbers, iOS has two as well:

Number the store comparesNumber people see
Android (android/app/build.gradle, defaultConfig)versionCode: a whole number, +1 for every upload, even a rejected oneversionName: for example "1.0.1"
iOS (Xcode, target App, General)Build: a number that grows for each upload of the same versionVersion: for example 1.0.1

Keep package.json's version in step with the number people see.

#Android: a signed bundle

1. Make a keystore, once. The keystore is the key that proves an update comes from you. Run this in android/ and answer the questions:

BASH
cd android
keytool -genkeypair -v -keystore upload-keystore.jks -alias upload -keyalg RSA -keysize 2048 -validity 10000

keytool comes with Java (it is in the Java that Android Studio uses). Choose a strong password and write it down.

2. Keep the secrets out of git. Add these lines to android/.gitignore (the generated file does not ignore keystores):

CODE
*.jks
*.keystore
keystore.properties

3. Tell Gradle about the keystore. Make android/keystore.properties (a file only you have):

CODE
storeFile=../upload-keystore.jks
storePassword=YOUR_PASSWORD
keyAlias=upload
keyPassword=YOUR_PASSWORD

Then edit android/app/build.gradle. At the top, under apply plugin:

GROOVY
def keystoreProperties = new Properties()
def keystoreFile = rootProject.file('keystore.properties')
if (keystoreFile.exists()) {
    keystoreFile.withInputStream { keystoreProperties.load(it) }
}

and inside android { … }, before buildTypes, add signingConfigs, and use it in the release build type:

GROOVY
    signingConfigs {
        release {
            if (keystoreFile.exists()) {
                storeFile file(keystoreProperties['storeFile'])
                storePassword keystoreProperties['storePassword']
                keyAlias keystoreProperties['keyAlias']
                keyPassword keystoreProperties['keyPassword']
            }
        }
    }
    buildTypes {
        release {
            signingConfig signingConfigs.release
            minifyEnabled false
            // …the lines that were already there
        }
    }

storeFile is read from the android/app folder, which is why the path starts with ../.

4. Build. First build the site and copy it into the app (this also puts the Java that Gradle needs in android/gradle.properties), then ask Gradle for the release files:

BASH
kreft mobile:build --android --api-url https://api.your-site.com
cd android
./gradlew bundleRelease assembleRelease      # on Windows: gradlew.bat

You get two files:

FileFor
android/app/build/outputs/bundle/release/app-release.aabGoogle Play. Upload this one.
android/app/build/outputs/apk/release/app-release.apkInstalling on a phone yourself, or sending it to a tester.

Android Studio can make the same files: kreft mobile:open --android, then Build → Generate Signed App Bundle / APK. Check that the file is signed and has the right id and version:

BASH
$ANDROID_HOME/build-tools/<version>/apksigner verify --print-certs android/app/build/outputs/apk/release/app-release.apk
$ANDROID_HOME/build-tools/<version>/aapt2 dump badging android/app/build/outputs/apk/release/app-release.apk | head -1

5. Try the release build on a real phone before you upload. A release app behaves differently from the debug one (it talks to your real server, and it is signed). With the phone plugged in and USB debugging on:

BASH
adb install -r android/app/build/outputs/apk/release/app-release.apk

-r replaces an installed copy with the same signature. If a debug copy from kreft mobile:run is there, uninstall it first: the signatures differ.

6. Upload to Google Play. In the Play Console create the app, then Testing → Internal testing → Create new release, accept Play App Signing and upload the .aab. Fill in the store page, the Content rating, the Data safety form and the privacy policy link. Test with the internal track first; promote the same release to Production when it is good. New personal developer accounts may have to run a closed test with a minimum number of testers for some days before production is allowed; check Google's current rule in the Console.

#iPhone: archive and upload (a Mac with Xcode)

  1. kreft mobile:build --ios --api-url https://api.your-site.com, then kreft mobile:open --ios.
  2. In Xcode, select the App target, Signing & Capabilities: tick Automatically manage signing and choose your Team. The Bundle Identifier must be your appId.
  3. Set Version and Build (see above). Add a text for every permission the app asks for (camera, location, photos…) to ios/App/App/Info.plist, for example NSCameraUsageDescription; Apple rejects an app that asks without explaining.
  4. Choose the device Any iOS Device (arm64), then Product → Archive.
  5. In the Organizer window, Distribute App → App Store Connect → Upload.
  6. In App Store Connect create the app with the same bundle id, wait for the build to finish processing, and test it with TestFlight (yourself first, then testers). Then fill in the store page (screenshots for the required device sizes, description, privacy answers), pick the build, and Submit for Review.

#Checklist before every upload

  • [ ] The app opens and works on a real phone, using the release file, against your real https:// server.
  • [ ] The id is not com.example…, and the version number is higher than the last upload.
  • [ ] .env has no test keys; PUBLIC_API_URL is your production address.
  • [ ] Only the permissions you use are asked for (check android/app/src/main/AndroidManifest.xml and Info.plist).
  • [ ] A privacy policy page exists at a public address, and the stores' privacy forms say what the app collects.
  • [ ] The keystore and its passwords are backed up outside the project and are not in git.
  • [ ] You have the store texts and screenshots ready (phone sizes at least; tablets if you support them).

#Updating a published app

Change the pages, run kreft mobile:build --android --api-url … again, raise versionCode and versionName (Android) or Build and Version (iOS), build the release file as above, and upload it as a new release. Reviews usually take from some hours to a few days. Only the files inside the app change when you upload; users get them through the store's normal update.

#Release problems

ProblemFix
android/keystore.properties or android/upload-keystore.jks already existsYou passed --create-keystore a second time. It never replaces your key (a lost key means you can never update the app). For later releases drop --create-keystore and add --bump: kreft mobile:release --android --api-url https://… --bump. Keep the key files you already have.
Version code 2 has already been used (Play)Raise versionCode in android/app/build.gradle and build again.
You uploaded an APK that is not signed / signed with the wrong keyThe release build type must have signingConfig signingConfigs.release, and keystore.properties must exist. After the first upload, always use the same keystore.
Keystore was tampered with, or password was incorrectA wrong storePassword or keyPassword in keystore.properties.
SDK location not foundInstall Android Studio and set ANDROID_HOME (macOS: ~/Library/Android/sdk), or write sdk.dir=… in android/local.properties.
Unsupported class file major version / invalid source release: 21Gradle runs on the wrong Java. Run kreft mobile:build --android first: it writes a fitting Java (21 to 23) to android/gradle.properties.
The app opens but shows no dataThe build still points at a test server. Build again with --api-url https://… and check that your server allows the app in CORS.
adb install says INSTALL_FAILED_UPDATE_INCOMPATIBLEA copy signed with another key is installed (for example the debug app). Uninstall it: adb uninstall com.yourcompany.myapp.
Play rejects the app for the target API levelRaise targetSdkVersion (in android/variables.gradle) to what the Console asks, update Capacitor's packages (kreft update), and build again.
Apple: Missing Purpose String in Info.plistAdd the NS…UsageDescription text for that permission and upload a new build.
Apple: No account for team / signing failsAdd your Apple ID in Xcode → Settings → Accounts, then choose the team again.

#Writing your own edge components

The components in components/edge/ are plain .kreft files, so copy one and change it. The ones that came with the kit follow a few rules, because each one was a real bug once. A test in the framework checks them for every kit component:

  • Props for what people customize, CSS variables for the look. Colours come from the --edge-* variables in edge.css; a prop such as bg only sets a variable on the root.
  • Put data-edge on every <button>, <input>, <select> and <textarea>. The starter ui.css styles all of them (height, border, hover colour); data-edge switches that off so your own CSS decides.
  • Do not name a class like one in ui.css (btn, field, label, card, muted, badge, danger, lead): the global rule leaks into your component.
  • k-ref needs state, not let: state box = null, then k-ref="box".
  • Do not write class="a {x}" and :class on the same element; the static part is lost. Build one text with derive cls = 'a ' + x and use class={cls}.
  • Scoped CSS cannot reach slotted children (and > :deep(*) compiles to broken CSS). Set what you need on box.children from on ready and a MutationObserver, as edge-stack and edge-pager do.
  • No style="…" in the view (a strict Content-Security-Policy blocks it): bind :style="vars".
  • Use $router.go(path) to navigate (there is no push), k-elif (not k-else-if), and give the component a comment at the top that lists its props.

#Mobile troubleshooting

What you seeWhy, and what to do
invalid source release: 21Gradle runs on a Java older than 21. kreft mobile:build, mobile:run and mobile:dev fix this for good: they write org.gradle.java.home=… into android/gradle.properties, so Gradle uses a fitting Java from any terminal and from Android Studio (they never change a line you wrote there). In an app made before that, run kreft mobile:build --android once, or add the line yourself.
Unsupported class file major version 69 (or 68, 70)Gradle runs on a Java newer than 23. Use Java 21 (see above).
The phone shows "Webpage not available" (net::ERR_CONNECTION_…)The phone cannot reach your computer: its Wi-Fi is off or it is on another network (mobile data cannot reach an address like 192.168.x.x). Plug it in with the USB cable and turn on USB debugging: kreft mobile:dev then goes through the cable and needs no Wi-Fi. Otherwise put the phone on the same Wi-Fi as the computer.
A white screen and the error ReferenceError: Kreftjs is not definedkreftjs.js did not start, almost always because the browser inside the phone is too old to read it. Update Android System WebView and Chrome in the Play Store (Settings → Apps → Android System WebView shows its version) and reload. The dev error box lists every error and the first one is the cause (a SyntaxError in kreftjs.js means an old browser). In an app made with an older kreft, refresh its runtime with kreft update --core. A built app shows "This app could not start…" on the screen instead of a blank page.
This folder is not a Kreft appYou ran a mobile: command outside an app, for example in the folder of the framework itself (a new terminal tab often starts there). Go into your app first, cd my-app, or add --app /path/to/my-app to the command. The command changes nothing when it refuses.
Capacitor is not installed. Run: npm installRun npm install in the app.
The simulator needs a full Xcode installInstall Xcode, then sudo xcode-select -s /Applications/Xcode.app/Contents/Developer.
Nothing opens after kreft mobile:buildIt only prepares the project. Run kreft mobile:open --android and press Run, or use kreft mobile:dev.
The page loads but data and sign-in failThe app is calling an address the phone cannot reach. Build with --api-url and read the table in Run it on an emulator, a simulator or a phone.
Content sits under the status barAndroid 15 and newer draw apps edge to edge. capacitor.config.json from kreft mobile:init has android.adjustMarginsForEdgeToEdge: "force"; add it to an older config.
kreft mobile:dev says a port is busyIt uses the next free one and tells the app (Port 8000 is busy: using 8001), so there is nothing to do.
kreft mobile:icons failsThe tool downloads itself the first time and needs the internet. The picture must be a PNG (1024x1024 for icons, 2732x2732 for the splash screen).
kreft --version shows an old numberThe kreft command is the globally installed one. Update it: npm install -g kreftjs@latest (or the tag you published).

#Mobile: what to know

  • The app is your web app in the phone's WebView. It is not a second, native renderer, so very heavy animation or huge lists need care (use edge-virtual-list and edge-lazy-grid).
  • A phone needs a reasonably current browser engine, and Android System WebView is updated through the Play Store. The framework's own files use no syntax newer than Chrome 64 (a test checks it; ?. and ?? are avoided on purpose) and add small stand-ins for a few helpers old engines lack, but some features (such as the ago pipe) use newer browser features, so keep Android System WebView up to date.
  • The backend never runs inside the phone. Use --api-url, API tokens for sign-in (not cookie sessions) and CORS on your server for the app.
  • Android builds work on Mac, Windows and Linux. iOS builds need a Mac with Xcode.
  • Camera, location and photo library on iPhone need a usage text in ios/App/App/Info.plist.
  • The framework's own checks run in the Android emulator: debug builds, the native plugins, the animated splash screen, kreft mobile:run, and live reload with kreft mobile:dev (a saved edit shows in the running app within seconds). iOS has not been run in a simulator by those checks, and store builds are not made.

#HarmonyOS apps

Huawei phones and tablets running HarmonyOS NEXT cannot install Android apps, and Capacitor does not target them. So Kreft makes a small native project in ArkTS (the HarmonyOS language) whose only page is a full-screen web view. It loads your built site from the app's own files, so the pages are the same .kreft files and the app opens without a network.

#What you need

You needWhy
DevEco StudioIt brings the HarmonyOS SDK, the emulator and the tools that build and sign the app.
A Huawei developer accountOnly to sign the app for a real phone. The emulator needs none.

#Start

BASH
kreft new my-app --harmony      # a new project with HarmonyOS included
cd my-app
kreft harmony:build --api-url https://your-server.example
kreft harmony:open              # opens harmony/ in DevEco Studio; press Run

For a project you already have, run kreft harmony:init (alias kreft make:harmony). It writes a harmony/ folder and never overwrites a file that exists.

CommandWhat it does
kreft harmony:buildRuns kreft build --base ./, then copies dist/ into harmony/entry/src/main/resources/rawfile/. --api-url sets the server the app talks to (written to .env). --hap also runs hvigor to make the .hap file (needs DevEco Studio's command line tools).
kreft harmony:openOpens harmony/ in DevEco Studio.
kreft harmony:initAdds HarmonyOS to an existing project.
kreft harmony:helpPrerequisites, files and options.

Run harmony:build again after every change to your pages. The backend does not run inside the phone, so the app needs --api-url (or a PUBLIC_API_URL in .env) to reach your server.

#The files

FileWhat it is
harmony/entry/src/main/ets/pages/Index.etsThe web view. Change its settings here.
harmony/entry/src/main/module.json5Device types and permissions (INTERNET is on).
harmony/AppScope/app.json5Bundle name (com.kreftjs.<name>), version and icon.
harmony/entry/src/main/resources/rawfile/Your site, written by harmony:build. It is not committed.

#HarmonyOS troubleshooting

ProblemFix
A white screen in the appRun kreft harmony:build again and check that rawfile/index.html exists.
Pages show "not found" after a clickThe router must use mode: 'hash' inside the app (see the note above; harmony:init adds it unless you set a mode).
API calls failBuild with --api-url https://…. A phone cannot reach localhost on your computer.
hvigor was not foundUse kreft harmony:open and run from DevEco Studio instead of --hap.
The phone refuses to install the appThe app must be signed in DevEco Studio (File > Project Structure > Signing Configs).

#One codebase. Every screen.

One codebase, every screen. A single Kreft project runs as a web application, a desktop app for macOS, Linux and Windows (with Electron or Tauri), and a phone or tablet app for iOS, Android and HarmonyOS. TV apps are coming soon and are not available yet. The pages are the same .kreft files everywhere; each target only adds a native shell around them.

#Where a Kreft app runs

TargetShellAdd itRun itPackage itStatus
Web applicationthe browserkreft new my-appkreft devkreft buildTested
macOS (Electron)Electronkreft add electronkreft electron:devkreft electron:build --macTested
Linux (Electron)Electronkreft add electronkreft electron:devkreft electron:build --linuxNot tested here
Windows (Electron)Electronkreft add electronkreft electron:devkreft electron:build --winNot tested here
macOS (Tauri)Taurikreft add taurikreft tauri:devkreft tauri:buildTested
Linux (Tauri)Taurikreft add taurikreft tauri:devkreft tauri:buildNot tested here
Windows (Tauri)Taurikreft add taurikreft tauri:devkreft tauri:buildNot tested here
iOSCapacitorkreft new my-app --mobilekreft mobile:run --ioskreft mobile:release --iosNot tested here
AndroidCapacitorkreft new my-app --mobilekreft mobile:run --androidkreft mobile:release --androidTested
HarmonyOSArkTS web viewkreft new my-app --harmonykreft harmony:open (DevEco Studio)kreft mobile:release --harmonyNot tested here
Android TV, tvOS, webOS, TizenComing soon

What the status means. Tested means Kreft's own tests ran it for real: the Electron and Tauri apps were started on macOS and checked (menu, DevTools, window, security, production builds), and an Android app was run on the emulator and built as a signed release. Not tested here means the same code is meant to run on that system, but Kreft has not run it there: build it on that system and check it before you ship. Coming soon means planned and not available.

#Which one do I choose?

I want…Choose
A website onlyThe web. Nothing to add.
A desktop app, and I want the page to look the same on every systemElectron. It ships its own Chromium. Needs only Node.js. Installers are about 100 MB.
A desktop app with a small installer, and I can use RustTauri. It uses the system's web view. Installers are a few megabytes. Needs Rust.
An app in Google PlayAndroid.
An app in the App StoreiOS. Needs a Mac with Xcode and a paid Apple Developer account.
An app for Huawei phones and tabletsHarmonyOS. Needs DevEco Studio.

Both desktop runtimes can live in one project (kreft add electron tauri), and a project can have desktop and phone targets together (kreft new my-app --mobile --electron). They share your pages. See Desktop configuration for the settings file each one reads.

#What each target needs

TargetYou need installed
WebNode.js 22.5 or newer
ElectronNode.js (Electron and electron-builder come with kreft add electron)
TauriNode.js and Rust; on Linux the WebKitGTK libraries; on Windows the Visual Studio C++ build tools
AndroidAndroid Studio and a Java from 21 to 23
iOSA Mac with Xcode
HarmonyOSDevEco Studio (and a Huawei developer account to sign for a real device)

Build a desktop installer on the system it is for: a macOS installer needs a Mac, a Windows installer is best built on Windows, a Linux one on Linux.

#What is different on each target

  • The backend does not run inside an app. A desktop or phone app holds your built pages. Point the API client at a server you host (for phones, build with --api-url https://…). See Desktop apps with Electron and Mobile apps.
  • The address style. A packaged app loads its pages from files, so the router uses mode: 'hash' there; harmony:init sets that up so the website keeps its normal addresses.
  • The native bridge differs. Electron gives pages window.kreftDesktop; Tauri gives window.__TAURI__; the phone apps give Kreftjs.native (camera, files, share, haptics…). Write the page once and ask which one it is running in:
JS
if (Kreftjs.isElectron) {            // an Electron window
  kreftDesktop.notify('Saved', 'Your note was saved.')
} else if (Kreftjs.isTauri) {        // a Tauri window
  window.__TAURI__.event.emit('saved')
} else if (Kreftjs.native.isNative()) {  // an iOS or Android app
  Kreftjs.native.system.share({ text: 'Hello' })
}

Kreftjs.native.platform()    // 'ios' | 'android' | 'electron' | 'tauri' | 'web'
Kreftjs.native.isDesktop()   // true in Electron and Tauri

HarmonyOS apps run your pages in a web view, so they behave as the web there; use feature checks ('share' in navigator) for anything that depends on the device.

#TV apps (coming soon)

TV apps are planned and not available yet. Kreft has no TV packaging and no remote-control navigation today. What is planned:

TargetPlan
Android TVThe Android app, with a remote-control (D-pad) focus ring and a TV layout kit
Apple tvOSA tvOS shell around the same pages
LG webOSA packaged web app for LG TVs
Samsung TizenA packaged web app for Samsung TVs

There is no release date, and nothing here is promised until it ships and is tested. Until then, a TV that has a web browser can open your website; that is not a packaged TV app and has no focus handling for a remote.

#Platform commands at a glance

I want to…Command
Add Electron or Tauri to an appkreft add electron, kreft add tauri, or kreft add electron tauri
Check the desktop settingskreft electron:config, kreft tauri:config
Run a desktop appkreft electron:dev, kreft tauri:dev
Make desktop installerskreft electron:build [--mac] [--win] [--linux], kreft tauri:build
Add phone supportkreft new my-app --mobile, or kreft mobile:init
Run on a phone or emulatorkreft mobile:run --android, kreft mobile:run --ios, kreft mobile:dev
Add HarmonyOSkreft new my-app --harmony, or kreft harmony:init
Build and open HarmonyOSkreft harmony:build --api-url https://…, kreft harmony:open
Release a phone appkreft mobile:release --android, --ios, --harmony; the steps are in Publishing your app to Google Play and the App Store