#TV apps
#What is planned
| TV system | 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 |
The pages will be the same .kreft files as your website, desktop and phone apps, like every other target in One codebase. Every screen. There is no release date, and nothing here is promised until it ships and is tested.
#What works on a TV today
A TV that has a web browser can open your website. That is a website, not a packaged TV app: it is not in the TV's app store, and Kreft adds nothing for the remote. If you want your site to be usable from a TV browser now, plain web practice helps:
- Use real
<button>and<a>elements for everything that can be pressed, so the TV browser can move between them. - Give them a clear focus style (
:focus-visible), large enough to see from a sofa. - Use large text and wide spacing, and keep the important things away from the edges of the screen.
- Don't hide actions behind hover: a remote has no mouse.
#Follow the progress
New platforms are announced in the changelog and on kreftjs.com. Until a TV target is listed as available there, build for the web, desktop and phones.
#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 |