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.

Not live for v2 apps yet

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
  1. Take the SDK from ZRN_SDK_DIR. The examples use a fixed ../../zrnapp. A store app does this instead (below).
  2. Put the program at the top of the build folder, named as [build] target says.
  3. Link only what the image has. ci/check-linkage.py fails on any library ldd cannot find, and on a shared libzrnui or libzrnapp.
  4. 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

  1. Commit and push to a public GitHub repository.
  2. 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 and zrnapp.toml agrees, then opens a post in #ztos-app-submissions. SDK v1's zrn submit is not in v2.
  3. A moderator reads the source at that commit and presses Accept or Reject.

7. After Accept

  1. The bot adds an approved [[release]] to ledger/<id>.toml and starts publish.yml.
  2. plan: approved releases with nothing published.
  3. build, on arm64, with no secrets: your exact commit, zrn-sdk at sdk.lock, the CMake build, the linkage check.
  4. 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 signed index.json on the store-index branch.

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 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.