Native client for iPhone, iPad and Mac. One SwiftUI app target, bundle ID
app.ivynote (one App Store record, universal purchase).
The server, web client, and the protocol this client implements live in the
ivynote repository. The source of truth for the API and sync
protocol is ivynote/client/docs/client-development-guide.md; this
repository does not keep a copy. Server changes that affect clients get an
issue here.
| Server API | /api/v1, tested against ivynote dev (2026-11) |
| Platforms | iOS / iPadOS 17+, macOS 14+ |
| Language | Swift 6, strict concurrency |
project.yml XcodeGen spec; Ivynote.xcodeproj is generated, not committed
Config.xcconfig shared settings; includes your git-ignored Local.xcconfig
App/ SwiftUI app (iOS + macOS)
App/Editor/ built note editor page (generated by EditorWeb/build.sh, committed)
EditorWeb/ sources of that page: the bridge and the native frame
IvynoteKit/ Swift package with no UI: API client, session, Keychain,
local SQLite store, sync engine (HLC, outbox, push/pull, SSE)
IvynoteKit holds everything that can be tested without a simulator. UI code stays thin.
- Dates (guide 9.4):
@明天 9点completion, date chips and the picker come with the editor page; the iPhone format bar and the note menu have 日期与提醒. - Agenda (library menu → 日程,
AgendaView): open dated to-dos across the library, check them off, open a note at its task. - Reminders (
Reminders.swift,Tasksin IvynoteKit): local notifications for the next 48 reminders, set again a moment after any change; permission is asked the first time there is something to remind of. - Password-protected notes (guide 8.4): the editor page shows the lock panel, asks for the password and seals every edit; the app only ever stores and syncs the sealed body. Note menu: 设置密码 / 更改密码 / 移除密码 / 立即锁定. Protected notes are found by title only, cannot be shared, and take no part in the agenda or reminders.
brew install xcodegen
cp Local.xcconfig.example Local.xcconfig # set DEVELOPMENT_TEAM to your Team ID
make openmake test runs the IvynoteKit tests. make test-live SERVER=http://127.0.0.1:18080
also runs an account lifecycle test against a real server: it registers a
throwaway account, so use a disposable data directory, e.g. in ivynote/server:
IVY_MASTER_KEYS='k1:cUA297OzjWn7QmBrON/J1bDRS2v9NQJQUMTHFsS8Mwk=' go run . serve -data-dir /tmp/ivy-apple -http 127.0.0.1:18080Notes are edited with the web client's own editor (ivynote/client/packages/editor:
CodeMirror 6 with live preview, tables, mermaid, wiki links) in a WKWebView, so
both clients render Markdown the same way. EditorWeb/build.sh bundles it with
esbuild and compiles the web's styles (ui/app.css, the styles of
Editor.svelte) with Tailwind, using the tools installed in ivynote:
(cd ../ivynote && npm install) # once
EditorWeb/build.sh # after changing EditorWeb/ or pulling ivynoteThe page is served from the app bundle under ivyapp://editor/; attachments
(ivy://res/<id>) load from ivyapp://editor/res/<id>, which the app fetches
with the account's token and caches on disk (files not uploaded yet are read
from the library's folder). Pasted and dropped files come back to Swift, which
uploads them and inserts the reference; backlinks are listed below the body. Swift talks to the page through
window.ivy (see EditorWeb/main.ts); the page reports edits, link taps and
focus back.
Debug builds accept -ivyOpenNote <title> to open a note at launch:
xcrun simctl launch booted app.ivynote -ivyOpenNote "Some title"- Self-hosted: the user enters the server address; nothing is hard-coded.
Plain
httpis accepted only on the local network (ATSNSAllowsLocalNetworking) and shows a warning unless it is this device. - Bearer token only, no cookies; the token and cached user live in the
Keychain (
AfterFirstUnlockThisDeviceOnly). - Session restore: open with the cached account, refresh with
GET /me; only 401/403 end the session, network errors and 5xx mean offline. - Never log tokens, passwords or note content.
- The admin console is not rebuilt here; admins get a link to
{server}/admin. - Interface language (guide §界面语言): 简体中文 and English, every string
from
IvynoteKit/Strings.swift(one protocol, so a missing translation does not compile; views read it asL, other code asL10n.s). Order: the signed-in account'sUser.language, then the choice made on this device (remembered), then the system (first supported language, else English). Pickers sit in the library menu, the libraries list and the account sheet; choosing while signed in sendsPATCH /me {language}("follow the system" clears it; offline it is kept and sent later). Sign-up sends the language in use. Dates follow the interface language (LanguageSettings).
- Branch / PR CI (
.github/workflows/ci.yml):- Pull requests and pushes to
main,dev,release, andrelease/**runIvynoteKitunit tests, editor asset checks, macOS Debug, and iOS Simulator Debug builds. - Pushes to
main,dev,release, andrelease/**additionally archive and verify the Universal macOS.dmgand unsigned iOS Device.ipa.
- Pull requests and pushes to
- Tag Release (
.github/workflows/release.yml):- Push a
vX.Y.Ztag (e.g.git tag v0.2.0 && git push origin v0.2.0). Tags with a suffix (v0.2.0-beta.1) are published as pre-releases. - Runs
IvynoteKittests in parallel with Universal macOS (arm64+x86_64).dmgand iOS.ipabuilds; publishes the GitHub Release (withSHA256SUMS.txtand auto-grouped changelog via.github/release.yml) only after every check succeeds. - Works out of the box without signing secrets (ad-hoc macOS
.dmg+ unsigned iOS.ipa). Configure optional repository secrets to enable Developer ID signing/notarization and signed iOS export:- macOS signing:
APPLE_TEAM_ID,MACOS_SIGN_P12_BASE64,MACOS_SIGN_P12_PASSWORD - macOS notarization:
APPLE_NOTARY_KEY_BASE64,APPLE_NOTARY_KEY_ID,APPLE_NOTARY_ISSUER_ID - iOS signing:
APPLE_TEAM_ID,IOS_SIGN_P12_BASE64,IOS_SIGN_P12_PASSWORD,IOS_PROVISION_PROFILE_BASE64(and optional variableIOS_EXPORT_METHOD, defaultrelease-testing) - Website refresh:
SITE_ADMIN_TOKEN
- macOS signing:
- Push a
Connect, sign in, sign up, session restoreLocal store (SQLite) and sync engine: HLC, outbox, push/pull, SSE (guide ch. 6)SyncEngineis a port of the web client'spackages/core/src/sync/engine.ts; keep the two in step when the protocol changes.Library tree, note list, editor with live preview (the web's CodeMirror),tags editing; next: faster list for large librariesAttachments, offline upload queue(guide ch. 7): photos, camera, files, paste and drop; offline files wait underlocal-ids in the library'suploads/folder and are uploaded before each push- Search,
[[wiki links]],backlinks(computed locally,Links) History, sharing, media library; next: settings