# Makima iOS Native iPhone client for [Makima](https://makima.jp) — distributed mesh listening and AI daemon orchestration platform by Soryu LTD. ## Quick start ```bash cd makima/ios make bootstrap # installs xcodegen + xcbeautify make ios-sim-fast # builds and launches iPhone 16 Pro simulator ``` Xcode 16+, iOS 18+ target, Swift 5.10+. No third-party packages. ## First launch 1. Enter a server URL (default `https://makima.jp`). 2. Tap **Open Web Settings** → create an API key on the server. 3. Paste the `mk_…` key back. The app validates via `GET /mesh/daemons` then takes you to Home. Keychain stores the API key per server profile (`kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly`). Change server or sign out any time from Settings. ## What's implemented | Surface | Status | |---|---| | Onboarding (URL + key paste) | ✓ | | Composite Home (Contracts · Daemons · Directives · Listen · Recent Tasks) | ✓ | | Contracts list + detail with tasks | ✓ | | Tasks list + detail with live output | ✓ | | Task output livestream (`/mesh/tasks/subscribe` WebSocket) | ✓ | | Markdown + code-block rendering | ✓ | | Completion Gate card | ✓ | | Directives / Daemons / Listen read-only | ✓ | | Local notifications (task done / failed / blocked, directive question) | ✓ | | `makima://` deep links (task / directive / contract) | ✓ | | Supabase OAuth sign-in | v1.1 | | APNs push notifications | v1.1 (see `services/push-proxy/`) | | Answer directive questions from the app | v1.1 | | Live Listen (mic + transcription) | v1.1 | ## Architecture Pure SwiftUI with `@Observable` stores, `URLSession` for HTTP, `URLSessionWebSocketTask` for the task livestream, SwiftData-free (UserDefaults + Keychain only), zero third-party packages. - `Sources/Makima/Net/` — APIClient, Keychain, ServerProfile + Store, AuthStore, TaskWebSocket, NotificationCenterBridge - `Sources/Makima/Stores/` — HomeStore (+ others as they land) - `Sources/Makima/Features/` — screen-level views grouped by surface - `Sources/Makima/Models/` — Codable types matching Makima's camelCase schema - `Sources/Makima/Design/` — Palette, Typography, reusable components - `Sources/Makima/Markdown/` — MarkdownBlocks, CodeBlockView, CompletionGate(+View) - `Sources/Makima/App/` — entry point, router, AppState ## Auth Uses the custom `x-makima-api-key: mk_…` header on every HTTP request and the WebSocket upgrade (verified against `makima/src/server/auth.rs`). `Authorization: Bearer` is reserved for the Supabase OAuth flow in v1.1. ## Deep links The app registers `makima://` and handles three destinations: - `makima://task/` — Task detail - `makima://contract/` — Contract detail - `makima://directive/` — Directives list (item-level deep link lands with answer support in v1.1) Local notifications fired from WebSocket events include the matching deep link in `userInfo.deepLink`. ## License MIT — see repo-root `LICENSE`. ## Privacy No analytics. No telemetry. No hosted relay. The app talks directly to the Makima server URL you configure. Credentials live in iOS Keychain, scoped per server URL, never leave the device. Full privacy policy: this README.