lody-ios README

The project's README from github.com/Innei/lody-ios. As one markdown file: README.md.

Lody iOS Logo

Lody iOS

Independent iOS Native Client · AI Collaboration & Session Companion for Mobile

Platform Expo SDK 57 React Native 0.86 Swift 6.0 CRDT License: AGPL-3.0-only

Join the TestFlight Beta

https://github.com/user-attachments/assets/0bc0ab48-6f12-44e9-ae13-07af9c6b780d

Lody on iPad and iPhone


[!IMPORTANT] This is a third-party project. Lody iOS is an independent, community-maintained client. It is not affiliated with, endorsed by, or supported by the official Lody team. Report issues in this repository, not upstream.

The project is still under development. It iterates quickly, so APIs, sync behavior, and UI may change without notice, and builds can be unstable or break existing sessions. Evaluate the risk yourself before relying on it.

[!IMPORTANT] 本项目为第三方项目。 Lody iOS 由社区独立维护,与 Lody 官方团队无关,也不代表官方立场;本项目的问题请在本仓库反馈,不要提交给上游。

项目仍在开发中。 迭代速度较快,接口、同步行为与界面可能随时调整,版本可能不稳定甚至破坏已有会话数据,请在评估风险后使用。


TestFlight Beta

Install the current build on your iPhone through TestFlight:

https://testflight.apple.com/join/1rR6Ku8f

Requires iOS 26 or later. Beta builds track main and update automatically; they are pre-release and may be unstable, as described above.


Overview

Lody iOS is an independent open-source client crafted for iPhone, providing a lightweight and secure bridge between remote Lody services and local workspaces.

The project uses a hybrid architecture of React Native + a deeply customized Swift native module (LodyKit). While preserving the rapid iteration advantages of declarative cross-platform UI, critical interactions (infinite chat collection, streaming text rendering, code diff highlighting, file tree, etc.) are built with native Swift and CoreText to deliver an authentic iOS system feel.


How this was built

Lody iOS started as a one-day prototype and became a usable TestFlight client in about a week, driven by coding agents under tight product constraints: iOS only, one native kit module, system UI when React Native cannot meet HIG, and an offscreen WebView for Flock/Loro because official Node/CRDT packages do not bundle in Metro.

The full first-person write-up is Prototype in a Day, Shipped in a Week: Building Lody iOS in Live.

What that week actually looked like:


Features

Authentic Apple HIG Native Experience

High-Performance Native Streaming Chat

Code Diffs & Workspace File Browsing

Agent Conversation Sync in Settings lists supported local projects and agents on your own computers. Refresh their history, select conversations to import, and explicitly confirm any conflict replacement. Imports run in batches and retain partial progress; this is a manual history import, not automatic device-to-device mirroring.

Live Preview & Simulator Streaming

Offscreen WASM CRDT Data Sync Engine

Security First & Hardware Isolation


Architecture

flowchart TB
    subgraph UI ["React Native Presentation Layer (Expo Router)"]
        direction TB
        Nav["Native Stack · Typed Routes"]
        Presentation["definePage / present() Presentation Runtime"]
        Screens["Session Details / File Tree / Diff Viewer / Settings"]
    end

    subgraph NativeKit ["Local Native Module (modules/lody-kit)"]
        direction TB
        LodyKitModule["LodyKit NativeModule Facade"]
        ChatView["LodyChatView (UICollectionView)"]
        Markdown["MarkdownView & Litext (CoreText Glyph Fade-In)"]
        DiffView["Shared DOM Diff + Native Inline Diff"]
        Composer["ChatComposerView (Native Input & Keyboard Avoidance)"]
    end

    subgraph DataEngine ["Offscreen Data Engine (Swift Watchdog)"]
        direction TB
        OffscreenWV["Offscreen WKWebView"]
        Flock["Flock WASM / Loro Streams Incremental Core"]
        Watchdog["Swift Native Watchdog (2s Probing / Hot Restart)"]
        SQLite["Local SQLite View Projection Snapshot"]
    end

    subgraph External ["System & Cloud Communication"]
        Keychain["iOS Keychain Credential Storage"]
        CloudStreams["Remote Lody Cloud Streams / Machine RPC"]
    end

    UI -->|"Invocations & Event Subscriptions"| NativeKit
    NativeKit -->|"State Changes & Dispatches"| DataEngine
    DataEngine -->|"Read-Only Incremental Projections"| UI
    DataEngine -->|"Encrypted Envelope Requests"| CloudStreams
    DataEngine -->|"Snapshot Persistence"| SQLite
    NativeKit -->|"Credential Operations"| Keychain

Directory Structure

lody-ios/
├── apps/
│   └── mobile/
│       ├── src/
│       │   ├── app/                 # Expo Router routes (typed routes) and the Stack declaration
│       │   ├── screens/             # *Screen pages defined with definePage
│       │   ├── features/            # Domain logic (sessions, diff, licenses)
│       │   ├── cloud/               # Cloud protocol (auth, catalog, send, kv, settings)
│       │   ├── models/              # Shared data shapes
│       │   ├── ui/                  # Shared React Native base components
│       │   ├── hooks/               # Screen bindings (session nav, page runtime, process sheet)
│       │   └── lib/                 # Infrastructure (presentation, i18n, theme)
│       ├── modules/
│       │   └── lody-kit/            # First-party local native Swift module (LodyKit)
│       │       ├── ios/             # Swift / UIKit / CoreText native code
│       │       ├── data-runtime/    # Offscreen data runtime RPC and adapter scripts
│       │       ├── decoder/         # Flock decoder bundled into the offscreen WebView
│       │       ├── src/             # Typed native component interfaces for React Native
│       │       └── verification/    # Deterministic Swift behavior checks
│       ├── verification/            # Offline UI/native baselines and Simulator tooling
│       ├── tests/                   # Node test-runner suites
│       ├── locales/                 # en / zh-Hans catalogs (projected into xcstrings)
│       ├── plugins/                 # Local Expo config plugins (MarkdownView, locales)
│       ├── scripts/                 # native:assets, license generation, locale checks
│       └── package.json
├── packages/
│   └── dom-webview/                 # Vendored Expo DOM WebView (MIT) hosting the shared diff view
├── docs/                            # Architecture design, specs, and evolution docs
├── package.json                     # Monorepo root configuration
└── pnpm-workspace.yaml

Development & Build

Prerequisites

Getting Started

  1. Clone the repository and install JavaScript dependencies:

    git clone https://github.com/Innei/lody-ios.git
    cd lody-ios
    pnpm install
    
  2. Install the CocoaPods toolchain (into apps/mobile/vendor/bundle):

    cd apps/mobile
    bundle install
    cd ../..
    
  3. Generate the native project and launch simulator:

    pnpm ios
    

    [!TIP] This project uses cocoapods-spm to integrate SPM static library dependencies. pnpm ios runs native:assets, generates the native project, and executes bundle exec pod install to fetch dependencies and link symbols. After building native code once, run pnpm start directly when modifying only JavaScript to connect to the hot reload server.

  4. Update native assets:

    If you modify runtime assets in modules/lody-kit/data-runtime/ or modules/lody-kit/decoder/, run:

    pnpm --filter @lody-ios/mobile native:assets
    

Quality Checks & Testing

pnpm check            # TypeScript, locale catalogs, generated license notices, Prettier
pnpm test             # Node test suites, Simulator tooling tests, vendored DOM WebView tests
pnpm bundle           # Verify iOS Hermes JavaScript production bundle integrity
pnpm licenses:build   # Regenerate the in-app notices after dependency changes

Offline UI Verification

UI baselines run without login, user credentials, cloud access, or a connected machine: EXPO_PUBLIC_UI_VERIFY=1 injects deterministic data at the Auth/Catalog boundary, and every case starts from the development-only Debug page.

pnpm verify:simulator --name '<current verify>' -- <command>   # Lease a Lody * Verify Simulator
pnpm verify:native                                             # Swift behavior checks
pnpm verify:ui --app /absolute/path/to/Lody.app                # Offline UI baselines
pnpm verify:ui --suite core --embedded --app /absolute/path/to/Lody.app  # PR core paths, Release app

The runner captures screenshots for visual states and video for temporal behavior; missing scenes and timeouts fail the run. See apps/mobile/verification/ui/README.md for the case inventory and Simulator leasing rules.

Releases

Pushing to main runs .github/workflows/ship.yml. A push always archives a TestFlight build through .github/workflows/release.yml; a manual dispatch publishes an OTA update to the configured expo-updates server when the Expo fingerprint matches the published baseline, and falls back to TestFlight when it changes. Native runtime assets are regenerated before either route. Join the beta at https://testflight.apple.com/join/1rR6Ku8f.


License

Lody iOS is released under the GNU Affero General Public License v3.0 (AGPL-3.0-only). You may use, modify, and distribute it, including commercially, provided that derivative works and network-served modifications stay under the same license and their source stays available to users.

Bundled third-party libraries and assets keep their own licenses. The full list and license texts are available in the app under Settings → Open Source Licenses. The notices are generated from the production dependency closure by pnpm licenses:build and verified in CI by pnpm check.


Acknowledgements

Lody iOS is made possible thanks to these open-source projects and creators:

lody-ios (Innei/lody-ios)

Searching Database…

What is this?Lody iOS is an independent, community-maintained iOS client for Lody, providing native chat, session management, and coding-agent collaboration on iPhone.
Is this the official Lody app, or a separate project?It is unofficial — a third-party, community-built app, not affiliated with or supported by the official Lody team; built with React Native plus native Swift/CoreText modules.
How do I install it on my iPhone?Join the TestFlight beta — the README provides a public invite link so you can install the current build directly from TestFlight.
Is this stable enough to rely on for real work?No — the README warns it iterates quickly, so APIs, sync behavior and UI can change without notice, builds can be unstable, and updates may even break existing chat sessions.
What is Lody itself?From the README, Lody is a chat-based platform organized around sessions and coding-agent collaboration; this app is an independent native iPhone client that talks to it, since Lody itself isn't described in detail in this repository.
How does data stay in sync across devices?It uses Loro, a high-performance CRDT, for state synchronization, as credited in the acknowledgements section of the README.
Can I test the UI without logging in or using a real device?Yes — offline UI verification injects deterministic data at the Auth/Catalog boundary and runs from a development-only Debug page, so baselines work without login, credentials, or cloud access.
What powers the native chat rendering?The message view draws on FlowDown for its design, and renders Markdown through Litext (a CoreText rich-text engine) and MarkdownView for typography.
Creator
Innei
Size
44.7 MB
Stars
519
Updated
CommitOct 17
Age
1mo
Commits · 90 Days