W15: Native Phone Apps without a Store
A PWA is like a poster in a shop window: anyone walking past can take a photo, no permission needed. A native app is like a product on the shelves: it can do more, but the shop decides what goes on the shelf, and sometimes you need a stamp before you can even hand it to a friend. This lesson makes that product from your same app, and hands it over without the big shops, as far as Android and Apple allow.
First: Do You Need It?
The stack's answer for phones is the PWA (W13). Use the PWA when it is enough. It usually is.
Go native only when an app needs something a PWA cannot do well, like deeper access to the camera, files or biometrics, or a place in an app store.
Capacitor: a Native Shell Around Your App
The stack's one native way is Capacitor (the successor of Cordova). It wraps your web app in a small native app for Android and iPhone:
- A no-server app (W14) goes inside the shell as files, and works fully offline.
- A server app stays on your computer; the shell opens it over your private Tailscale network, like the workbench does.
Your htmx pages do not change. Building it today means installing Capacitor's tools (they need Node.js), plus Android Studio for Android or Xcode on a Mac for iPhone, and following capacitorjs.com. Expect several gigabytes and a few hours the first time.
Pi Workbench will do this step for you soon: it will check what is installed, download the tools only after your yes, build and sign the Android app, offer it by QR code, and open Xcode on the right screen for an iPhone.
Android: the APK
An Android app is one file, an APK. To install one that is not from a store:
- Open a link to the APK on the phone (over your Tailscale network, or a GitHub release, below) and download it.
- Android asks whether this browser may install unknown apps. Allow it, once.
- Install, and open.
GitHub Releases: a Link for Your Friends
A release is a named version of your repository on GitHub (W12), with files attached. One command creates it:
gh release create v1.0 app.apk
Your friends get a fixed link and a history of versions. A release of a public repository is public: anyone can download it. A private repository's releases need a GitHub login, which a phone's browser rarely has.
Google's Developer Verification
Google now asks developers to verify their identity, including for APKs installed outside the Play Store. It started on 30 September 2026 in Brazil, Indonesia, Singapore and Thailand, and widens to more countries from 2027. On phones where it applies, an app from an unverified developer will not install the normal way. A path to install without verification remains, with more steps and a waiting period, meant for people who know what they are doing. If you share APKs widely, read Google's Android developer verification page.
iPhone: What Apple Allows
Apple's rules, stated plainly:
- Every app outside the App Store must be signed by an Apple developer identity. You need a Mac with Xcode to build and sign it.
- With a free Apple ID, the signature lasts 7 days, on up to 3 devices (and only a few such apps per device). After 7 days the app stops opening until you sign it again from the Mac. Developer Mode must be turned on in the phone's settings (iOS 16 and later).
- With the paid Apple Developer Program (a yearly fee), the signature lasts a year, covers more devices, and you can invite testers through TestFlight.
- Everything else goes through App Store review.
- In the EU, alternative app marketplaces are another route, with their own rules.
You sign in to your Apple ID inside Xcode yourself, never in a chat. For most iPhone apps, the honest advice is the PWA: it installs from Safari, needs no signing, and never expires.
Checked 2026-10-15; these rules change. Check Apple's and Google's own pages before you plan around them.
Choosing
| You want | Use |
|---|---|
| An app on your own phones, and friends' phones | A PWA |
| An Android app with native features, shared by link | Capacitor, an APK, a GitHub release |
| A native iPhone app for yourself | Capacitor and Xcode, re-signed weekly (free) |
| A native iPhone app for others | The paid program and TestFlight, or the App Store |
This Week's Exercise
- List what your app needs on a phone. For each item, find out whether a PWA can do it.
- Read Apple's membership comparison and Google's verification page. Note one rule from each that surprised you.
- Decide: PWA or native, for your app? Write one sentence why.
Key Takeaways
- Use the PWA when it is enough; go native only for something a PWA cannot do
- Capacitor is the stack's one native way: a native shell around the same app
- Android: an APK, "install unknown apps" once, and GitHub releases for a link (public means anyone can download)
- Google's developer verification covers sideloaded APKs, starting 30 September 2026 in four countries; a longer unverified path remains
- iPhone: signed by an Apple developer identity; free Apple ID means 7 days and up to 3 devices; the paid program gives a year and TestFlight