#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.
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)| Command | What 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:setup | First-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:open | Opens 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:release | A signed release: .apk and .aab (Android), .ipa (iOS), .hap and .app (HarmonyOS). See the release guide. |
kreft mobile:icons / kreft mobile:splash | Makes the app icon and splash screens |
kreft mobile:help | Lists 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:
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):
- Install Android Studio. In Device Manager choose Create Device, pick a Pixel phone and a recent system image, and start it.
- In your app folder:
kreft mobile:run --android. After each change to your code, run it again. - Prefer Android Studio?
kreft mobile:build --android, thenkreft mobile:open --androidand press the green Run button.
iOS Simulator (Mac only):
- 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. - In your app folder:
kreft mobile:run --ios. Orkreft mobile:build --ios, thenkreft 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:devrunsadb reverse, which makes the phone'slocalhost:8000lead 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.2for 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 on | Address of the server on your computer |
|---|---|
| Android emulator | http://10.0.2.2:8000 |
| iOS Simulator | http://localhost:8000 |
| A real phone on the same Wi-Fi | http://192.168.x.x:8000 (your computer's address; start the server with kreft dev --host 0.0.0.0) |
| After you publish | https://api.your-site.com |
kreft mobile:build --android --api-url http://10.0.2.2:8000Plain 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.
<div id="edge-splash" class="edge-splash" data-anim="pulse" data-web="false">…</div>data-animispulse(the logo breathes),zoom(it pops in),rise(it slides up) ornone.data-web="true"shows it in a browser too; by default a browser skips it.- Colours:
--edge-splash-bgand--edge-splash-fginedge.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 leastminTimemilliseconds from when it appears; 900 by default, and0means as soon as the app is ready) andKreftjs.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.
kreft make:home --mobile # in an existing project: phone home screen (replaces pages/Home.kreft)
kreft make:home --desktop # desktop workspaceThey 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
<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:
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, subtitle | The 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, height | Colours and the height in px (the notch area is added). |
center, border, elevated, blur | Centre the title, the line under the bar, a shadow, frosted glass. |
large | A big title under the bar. It folds into the bar when the page scrolls, and opens again at the top. |
loading | A thin moving line under the bar while you work. |
left, right | Buttons: [{ icon | text | src, label, id, badge, disabled, onTap }]. badge: true is a dot. |
show | false hides the bar. edge.hideBars() and edge.showBars() do both bars. |
edge.setBottom({ … }) | |
|---|---|
items | The 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, height | Colours and height. |
border, floating, blur, haptics | The 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:
<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.
| Component | What it is |
|---|---|
edge-shell | The frame: top slot, page that scrolls, bottom slot, and an overlay slot. |
edge-top-bar | The bar at the top: title, back arrow, buttons with badges, colours, a large title that folds away, a loading line. |
edge-bottom-nav | The row of buttons at the bottom: icons, labels, badges, a sliding indicator, a primary round button. |
edge-side-nav | A 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-row | Tabs in a row that scrolls sideways, with badges and a line that slides (variant: line or pills). |
edge-row, edge-column | Children side by side or one under another (gap, align, justify, wrap, pad). |
edge-stack | Children on top of each other (align). |
edge-spacer, edge-divider | Space (flexible or size), a line (label, vertical, inset, space). |
edge-scroll-view | A box that scrolls on its own (horizontal, snap, hideBar). |
edge-list | Rows 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-grid | A grid that draws more items as you scroll (columns or min, step). |
edge-virtual-list | Thousands of equal rows, only the visible ones exist (itemHeight). |
edge-carousel | Cards you swipe sideways with the next one peeking (peek, autoplay). |
edge-pager | Full pages you swipe between, with dots (k-model is the page). |
edge-text | Text: size, weight, color, muted, tone, lines (cut with …), mono, upper. |
edge-icon | 66 built-in icons (name), your own picture (src) or a glyph (text); filled; arrows turn around in right-to-left languages. |
edge-image | Loads near the screen, keeps its shape, shimmers while it loads (ratio, radius, fit, placeholder). |
edge-badge | A small number or a dot (value, dot, max, tone, soft, ring, pulse). |
edge-chip | A pill: a filter or tag (selected, check, closable, tone, size, disabled). |
edge-shape | A coloured shape: circle, rect, rounded, pill, triangle, diamond, hexagon, star. |
edge-canvas | A drawing surface with a sharp 2D context (@draw, @pointer). |
edge-progress-bar | A progress bar, or a moving one when the amount is unknown (indeterminate); circle makes it a ring; tone. |
edge-activity-indicator | A spinner (size, color, thickness). |
edge-accordion | Sections that open and close with a slide (items, single, inset, icon). |
edge-button | A button made for thumbs: variant (filled, tonal, soft, outline, text, danger, success), size, icon, iconEnd, square, badge, full, loading. |
edge-button-group | A segmented control: one choice out of a few (options, k-model, size). The picked mark slides. |
edge-text-input | A field with label, icon, hint, error, clear button; no zoom on iPhone. Also variant (outline, filled), prefix, suffix, counter, required, loading. |
edge-checkbox, edge-toggle | A checkbox and a switch (k-model, label, subtitle). |
edge-radio-group, edge-select | One choice out of a few (cards draws each as a box); a dropdown that opens the phone's own picker. |
edge-slider | A range slider (min, max, step, showValue, unit, iconStart, iconEnd). |
edge-modal | A dialog over the page (k-model, title, icon and tone, position, fullscreen, footer slot). |
edge-bottom-sheet | A panel from the bottom you drag down to close (size: auto, half, full; subtitle, closeButton, footer slot). |
edge-menu | A 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-fab | The round floating button, extended with a label; actions fan out small buttons above it (a speed dial). |
edge-pressable | Anything pressable with the feeling you choose: @press, @longpress. |
edge-gesture-area | @tap, @doubletap, @longpress, @swipe, @swipeleft … on an area. |
edge-refreshable | Pull down to refresh (refreshing, @refresh). |
edge-web-view | A 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.
| Variables | What they set |
|---|---|
--edge-bg, --edge-fg, --edge-muted, --edge-surface, --edge-card, --edge-raised, --edge-border | The 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 -soft | The four colours with a meaning, and the tint behind each. |
--edge-text-xs … --edge-text-2xl | The type scale (12 to 34px). |
--edge-radius-sm, --edge-radius, --edge-radius-lg, --edge-radius-xl | Corners (10, 14, 20 and 28px). |
--edge-space-1 … --edge-space-6, --edge-tap | Spacing (4 to 32px), and 44px: the smallest thing a finger should have to hit. |
--edge-shadow-1, --edge-shadow-2, --edge-shadow-3 | Shadows: a card, a floating button or bar, a sheet or dialog. |
--edge-fast, --edge-normal, --edge-slow, --edge-ease, --edge-spring | How long things move, and how. |
- Dark mode: the colours follow
ui.css(the system setting, ordata-theme="dark"on<html>).edge.cssadds the dark valuesui.cssdoes 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"andposition="end"follow the reading direction;leftandrightstay 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.
| Area | Calls |
|---|---|
| Platform | native.platform() is 'android', 'ios', 'electron', 'tauri' or 'web'; isNative(), isDesktop(), isWeb(). |
| Device | device.info() (platform, OS, model, screen), device.id(), device.battery(), device.language(). |
| Haptics | haptics.impact('light' | 'medium' | 'heavy'), haptics.notification('success' | 'warning' | 'error'), haptics.selection(), haptics.vibrate(ms). |
| File | file.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). |
| System | system.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(). |
| Dialogs | dialog.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 area | safeArea() gives { top, right, bottom, left } and sets the CSS variables --edge-safe-top … for you. |
| Positioning | position.get() (latitude, longitude), position.watch(fn) gives a stop function. |
| Events | on('pause' | 'resume' | 'network' | 'urlOpen' | 'keyboardShow' | 'keyboardHide', fn) gives a stop function. |
| Back button | pushBack(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. |
| Assets | asset('img/logo.png') gives the right address inside the app, whatever the base. |
| Splash screen | splash.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
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 versionThey 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 Mobile | Kreft |
|---|---|
| Device, File, System | Kreftjs.native.device, .file, .system |
| Native UI, Edge components | the edge- components above |
| Routing, Middleware | the router and its guards, as in a web app |
| Layouts, Nested components | layouts/mobile.kreft, and components with slots |
| Dialogs | Kreftjs.native.dialog and edge-modal, edge-bottom-sheet |
| Safe area, Positioning | Kreftjs.native.safeArea(), the edge-safe-* and edge-abs classes, Kreftjs.native.position |
| Events | Kreftjs.native.on(…), and component event / send() |
| App icons, Splash screens | kreft mobile:icons, kreft mobile:splash |
| Assets | Kreftjs.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:
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| Platform | It makes | Needs |
|---|---|---|
| Android | release/android/<name>-<version>-<code>.apk (to install or send to testers) and .aab (for Google Play) | Android Studio, Java 21 to 23 |
| iOS | release/ios/<name>.ipa, from an Xcode archive | A Mac with Xcode, and your Apple Team ID (--team, or APPLE_TEAM_ID) |
| HarmonyOS | release/harmony/…hap (an app package) and …app (for AppGallery), from hvigor | DevEco 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.
| Option | What 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-url | The 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. |
--bump | Add 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-run | Show every step and the exact commands. Writes nothing. |
--apk, --aab | Android: only that format. Default: both. |
--create-keystore | Android: 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, --app | HarmonyOS: 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:
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
.envonce: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-urlinstead.
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
- Give the app its real id and name.
kreft newgives it the idcom.example.<name>, and stores refuse that. Incapacitor.config.jsonset"appId": "com.yourcompany.myapp"(reverse domain, lowercase letters and digits) and"appName"before you runkreft mobile:buildfor the first time: the id is written intoandroid/andios/when they are created, and it can never change after the app is published. If you must change it later, deleteandroid/andios/(nothing in them is yours unless you edited them) and runkreft mobile:buildagain. - Icon and splash screen.
kreft mobile:icons logo.pngandkreft mobile:splash splash.png(see App icon and splash screen). - 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.comA store app must use
https://, and your server must allow the app in CORS. The address is written toPUBLIC_API_URLin.env. Never ship an address likehttp://10.0.2.2:8000(that is the emulator's way to reach your computer). - 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 compares | Number people see | |
|---|---|---|
Android (android/app/build.gradle, defaultConfig) | versionCode: a whole number, +1 for every upload, even a rejected one | versionName: for example "1.0.1" |
| iOS (Xcode, target App, General) | Build: a number that grows for each upload of the same version | Version: 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:
cd android
keytool -genkeypair -v -keystore upload-keystore.jks -alias upload -keyalg RSA -keysize 2048 -validity 10000keytool 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):
*.jks
*.keystore
keystore.properties3. Tell Gradle about the keystore. Make android/keystore.properties (a file only you have):
storeFile=../upload-keystore.jks
storePassword=YOUR_PASSWORD
keyAlias=upload
keyPassword=YOUR_PASSWORDThen edit android/app/build.gradle. At the top, under apply plugin:
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:
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:
kreft mobile:build --android --api-url https://api.your-site.com
cd android
./gradlew bundleRelease assembleRelease # on Windows: gradlew.batYou get two files:
| File | For |
|---|---|
android/app/build/outputs/bundle/release/app-release.aab | Google Play. Upload this one. |
android/app/build/outputs/apk/release/app-release.apk | Installing 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:
$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 -15. 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:
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)
kreft mobile:build --ios --api-url https://api.your-site.com, thenkreft mobile:open --ios.- In Xcode, select the App target, Signing & Capabilities: tick Automatically manage signing and choose your Team. The Bundle Identifier must be your
appId. - 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 exampleNSCameraUsageDescription; Apple rejects an app that asks without explaining. - Choose the device Any iOS Device (arm64), then Product → Archive.
- In the Organizer window, Distribute App → App Store Connect → Upload.
- 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. - [ ]
.envhas no test keys;PUBLIC_API_URLis your production address. - [ ] Only the permissions you use are asked for (check
android/app/src/main/AndroidManifest.xmlandInfo.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
| Problem | Fix |
|---|---|
android/keystore.properties or android/upload-keystore.jks already exists | You 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 key | The 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 incorrect | A wrong storePassword or keyPassword in keystore.properties. |
SDK location not found | Install 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: 21 | Gradle 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 data | The 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_INCOMPATIBLE | A 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 level | Raise 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.plist | Add the NS…UsageDescription text for that permission and upload a new build. |
Apple: No account for team / signing fails | Add 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 inedge.css; a prop such asbgonly sets a variable on the root. - Put
data-edgeon every<button>,<input>,<select>and<textarea>. The starterui.cssstyles all of them (height, border, hover colour);data-edgeswitches 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-refneedsstate, notlet:state box = null, thenk-ref="box".- Do not write
class="a {x}"and:classon the same element; the static part is lost. Build one text withderive cls = 'a ' + xand useclass={cls}. - Scoped CSS cannot reach slotted children (and
> :deep(*)compiles to broken CSS). Set what you need onbox.childrenfromon readyand aMutationObserver, asedge-stackandedge-pagerdo. - No
style="…"in the view (a strict Content-Security-Policy blocks it): bind:style="vars". - Use
$router.go(path)to navigate (there is nopush),k-elif(notk-else-if), and give the component a comment at the top that lists its props.
#Mobile troubleshooting
| What you see | Why, and what to do |
|---|---|
invalid source release: 21 | Gradle 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 defined | kreftjs.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 app | You 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 install | Run npm install in the app. |
| The simulator needs a full Xcode install | Install Xcode, then sudo xcode-select -s /Applications/Xcode.app/Contents/Developer. |
Nothing opens after kreft mobile:build | It 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 fail | The 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 bar | Android 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 busy | It uses the next free one and tells the app (Port 8000 is busy: using 8001), so there is nothing to do. |
kreft mobile:icons fails | The 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 number | The 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-listandedge-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 theagopipe) 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 withkreft 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 need | Why |
|---|---|
| DevEco Studio | It brings the HarmonyOS SDK, the emulator and the tools that build and sign the app. |
| A Huawei developer account | Only to sign the app for a real phone. The emulator needs none. |
#Start
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 RunFor 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.
| Command | What it does |
|---|---|
kreft harmony:build | Runs 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:open | Opens harmony/ in DevEco Studio. |
kreft harmony:init | Adds HarmonyOS to an existing project. |
kreft harmony:help | Prerequisites, 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
| File | What it is |
|---|---|
harmony/entry/src/main/ets/pages/Index.ets | The web view. Change its settings here. |
harmony/entry/src/main/module.json5 | Device types and permissions (INTERNET is on). |
harmony/AppScope/app.json5 | Bundle 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
| Problem | Fix |
|---|---|
| A white screen in the app | Run kreft harmony:build again and check that rawfile/index.html exists. |
| Pages show "not found" after a click | The router must use mode: 'hash' inside the app (see the note above; harmony:init adds it unless you set a mode). |
| API calls fail | Build with --api-url https://…. A phone cannot reach localhost on your computer. |
hvigor was not found | Use kreft harmony:open and run from DevEco Studio instead of --hap. |
| The phone refuses to install the app | The 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
| Target | Shell | Add it | Run it | Package it | Status |
|---|---|---|---|---|---|
| Web application | the browser | kreft new my-app | kreft dev | kreft build | Tested |
| macOS (Electron) | Electron | kreft add electron | kreft electron:dev | kreft electron:build --mac | Tested |
| Linux (Electron) | Electron | kreft add electron | kreft electron:dev | kreft electron:build --linux | Not tested here |
| Windows (Electron) | Electron | kreft add electron | kreft electron:dev | kreft electron:build --win | Not tested here |
| macOS (Tauri) | Tauri | kreft add tauri | kreft tauri:dev | kreft tauri:build | Tested |
| Linux (Tauri) | Tauri | kreft add tauri | kreft tauri:dev | kreft tauri:build | Not tested here |
| Windows (Tauri) | Tauri | kreft add tauri | kreft tauri:dev | kreft tauri:build | Not tested here |
| iOS | Capacitor | kreft new my-app --mobile | kreft mobile:run --ios | kreft mobile:release --ios | Not tested here |
| Android | Capacitor | kreft new my-app --mobile | kreft mobile:run --android | kreft mobile:release --android | Tested |
| HarmonyOS | ArkTS web view | kreft new my-app --harmony | kreft harmony:open (DevEco Studio) | kreft mobile:release --harmony | Not tested here |
| Android TV, tvOS, webOS, Tizen | Coming 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 only | The web. Nothing to add. |
| A desktop app, and I want the page to look the same on every system | Electron. 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 Rust | Tauri. It uses the system's web view. Installers are a few megabytes. Needs Rust. |
| An app in Google Play | Android. |
| An app in the App Store | iOS. Needs a Mac with Xcode and a paid Apple Developer account. |
| An app for Huawei phones and tablets | HarmonyOS. 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
| Target | You need installed |
|---|---|
| Web | Node.js 22.5 or newer |
| Electron | Node.js (Electron and electron-builder come with kreft add electron) |
| Tauri | Node.js and Rust; on Linux the WebKitGTK libraries; on Windows the Visual Studio C++ build tools |
| Android | Android Studio and a Java from 21 to 23 |
| iOS | A Mac with Xcode |
| HarmonyOS | DevEco 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:initsets that up so the website keeps its normal addresses. - The native bridge differs. Electron gives pages
window.kreftDesktop; Tauri giveswindow.__TAURI__; the phone apps giveKreftjs.native(camera, files, share, haptics…). Write the page once and ask which one it is running in:
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 TauriHarmonyOS 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:
| Target | Plan |
|---|---|
| Android TV | The Android app, with a remote-control (D-pad) focus ring and a TV layout kit |
| Apple tvOS | A tvOS shell around the same pages |
| LG webOS | A packaged web app for LG TVs |
| Samsung Tizen | A 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 app | kreft add electron, kreft add tauri, or kreft add electron tauri |
| Check the desktop settings | kreft electron:config, kreft tauri:config |
| Run a desktop app | kreft electron:dev, kreft tauri:dev |
| Make desktop installers | kreft electron:build [--mac] [--win] [--linux], kreft tauri:build |
| Add phone support | kreft new my-app --mobile, or kreft mobile:init |
| Run on a phone or emulator | kreft mobile:run --android, kreft mobile:run --ios, kreft mobile:dev |
| Add HarmonyOS | kreft new my-app --harmony, or kreft harmony:init |
| Build and open HarmonyOS | kreft harmony:build --api-url https://…, kreft harmony:open |
| Release a phone app | kreft mobile:release --android, --ios, --harmony; the steps are in Publishing your app to Google Play and the App Store |