Publish to the store
You never build, sign or upload a package. The store builds your app from your public source at the commit you name, signs it with the store's key and lists it. Nobody merges a pull request to add an app.
This page follows the store's working tree (ztOS-apprepo), not a pinned commit. The store builds v2 apps only once zrn-sdk's v2 work is committed and pinned as commit_v2 in its sdk.lock. Today that is all zeros, and a v2 build stops with sdk.lock: no SDK v2 pinned yet.
You need no signing key. tools/zrn setup-key copies your ssh key to a phone for tools/zrn run. It has nothing to do with the store.
1. Make it work on the phone
tools/zrn sysroot # one time
tools/zrn -p - setup-key 192.168.7.2 # one time per phone: your ssh key
tools/zrn run 192.168.7.2 path/to/your-app # phone-release build, upload, run
See Build and ship. The phone-release preset links zrnui and zrnapp statically.
2. Let the store build it
The store does not use the presets. On arm64, inside Arch Linux ARM with only the ztOS image's packages, it runs:
cmake -S <app> -B <app>/build/store -G Ninja -DCMAKE_BUILD_TYPE=Release \
-DZRN_SDK_DIR=<zrn-sdk at sdk.lock commit_v2> \
-DZRNUI_BUILD_SHARED=OFF -DZRNAPP_BUILD_SHARED=OFF \
-DZRNUI_BUILD_TESTS=OFF -DZRNAPP_BUILD_TESTS=OFF
cmake --build <app>/build/store
- Take the SDK from
ZRN_SDK_DIR. The examples use a fixed../../zrnapp. A store app does this instead (below). - Put the program at the top of the build folder, named as
[build] targetsays. - Link only what the image has.
ci/check-linkage.pyfails on any librarylddcannot find, and on a sharedlibzrnuiorlibzrnapp. - Download nothing during the build.
set(ZRN_SDK_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../zrn-sdk" CACHE PATH "zrn-sdk checkout")
add_subdirectory(${ZRN_SDK_DIR}/zrnapp ${CMAKE_BINARY_DIR}/zrnapp)
add_executable(notes main.c)
target_link_libraries(notes PRIVATE zrnapp::zrnapp zrnui::zrnui)
3. Write zrnapp.toml
In the app folder. The store reads it at the commit you submit.
[app]
id = "io.github.alice.notes" # never changes
name = "Notes"
version = "1.0.0" # semantic, higher than any listed
summary = "Short notes"
author = "Alice"
licence = "MIT" # an SPDX id
icon = "icon.svg"
categories = ["Utility"]
permissions = ["network"]
data_dirs = ["notes"] # optional: removed on uninstall
[build]
sdk = 2
target = "notes" # default: the id
data = ["data/*.png"] # optional, packed under share/
The id is reverse DNS you control, at least three parts, lower case. zrn- ids are for Zerone Laboratories' own repositories. The app list matches your window by StartupWMClass=<id>, so give the window the same id: { .title = "Notes", .app_id = "io.github.alice.notes" }.
Permissions: network, audio, camera, location, notifications, bluetooth, phone, contacts, messages, background, files.music, files.pictures, files.documents, files.downloads. Ask for what you use, nothing else. Login services are [[service]] tables and need background. Never write systemd units yourself.
4. Raise the version
Each submission needs a version that is not in the store yet. The relay refuses a version it already has. The build stops if zrnapp.toml at the commit names another id or version.
5. Check the package (optional)
Run the store's own build with a ledger entry of your own, from a checkout of ztOS-apprepo. Write /tmp/ledger/io.github.alice.notes.toml:
id = "io.github.alice.notes"
source = "https://github.com/alice/notes"
subdir = ""
[[release]]
version = "1.0.0"
commit = "<the 40-hex SHA>"
status = "approved"
approved_by = "discord:0"
approved_at = "2026-01-01T00:00:00Z"
Then build and look at the package:
STORE_LEDGER=/tmp/ledger ZRN_SDK2=/path/to/zrn-sdk \
python3 tools/store.py build --id io.github.alice.notes --version 1.0.0 --out out \
--source-override "https://github.com/alice/notes=/path/to/your/clone"
python3 client/zrn info out/*.zexec # manifest and files
python3 client/zrn verify out/*.zexec # structure; no signature is expected
The package is built for your CPU (x86_64 on a laptop; the store builds aarch64) and is not signed, so the phone's zrn install refuses it. Test on the phone with tools/zrn run.
6. Submit
- Commit and push to a public GitHub repository.
- On the ztOS Mobile Discord:
/submit-app repo:https://github.com/alice/notes commit:<40-hex SHA> [subdir:app]. The relay checks the repository is public, the commit exists andzrnapp.tomlagrees, then opens a post in #ztos-app-submissions. SDK v1'szrn submitis not in v2. - A moderator reads the source at that commit and presses Accept or Reject.
7. After Accept
- The bot adds an approved
[[release]]toledger/<id>.tomland startspublish.yml. - plan: approved releases with nothing published.
- build, on arm64, with no secrets: your exact commit, zrn-sdk at
sdk.lock, the CMake build, the linkage check. - publish, the only job with the store key: checks each package against the ledger, signs it (
.zexec.minisig), uploads both to the release<id>-<version>, and writes a signedindex.jsonon thestore-indexbranch.
A failed build leaves that release out and fails the run.
8. Updates
Raise version, commit, push, /submit-app the new commit. Moderators see a compare link from your last approved commit. The store never follows a branch.
9. What people see
- The store lists the app from the signed index. A higher listed version shows as an update.
- Install or update checks the signature, the sha256 and the id, version and arch, then puts the package at
~/.local/share/zrn/apps/<id>/<id>.zexecand adds the app to the list. An update never deletes the app's data. - Uninstall asks first, then removes the app, its services and its data, unless
--keep-data. - A revoked release is disabled on phones, with the reason shown.
The full write-up, with file references, is docs/publishing.md in zrn-sdk.
Checked against zrn-sdk commit 71a5ace (SDK v2). Pictures and clips are drawn by zrnui's GLES2 renderer, offscreen, from code that compiled, against the zrn-sdk working tree on top of that commit (it adds the app bar measured on a Windows Phone 8.1 phone and the Segoe WP font lookup), in Segoe WP. Source and proof.