Skip to content

Build from Source

Requirements: Xcode 26+, Rust (rustup), XcodeGen (brew install xcodegen).

终端窗口
# 1. Build the iroh bridge → NohupKit/Vendor/Libiroh.xcframework (slow the first time; missing iOS targets are installed automatically)
./scripts/build-libiroh.sh
# 2. Unit tests
swift test --package-path NohupKit
# 3. Generate the Xcode project
xcodegen
open Nohup.xcodeproj # schemes: NohupMac / NohupiOS
# 4. Package the Mac release (Developer ID signing + notarization + DMG, output in build/release/)
# Without DEVELOPER_ID the build is ad-hoc signed and only runs on this Mac
DEVELOPER_ID="Developer ID Application: Name (TEAMID)" NOTARY_PROFILE=nohup-notary ./scripts/release-mac.sh

Versions are set in project.yml via MARKETING_VERSION / CURRENT_PROJECT_VERSION. When the Mac–iOS protocol version (nohupProtocolVersion) changes, both apps must be updated together.

终端窗口
cd NohupKit
swift run nohup-server --state /tmp/nohup-state.json --loopback # also listen on 127.0.0.1
swift run nohup-cli --host 127.0.0.1 add-project ~/Projects/foo
swift run nohup-cli --host 127.0.0.1 new-worktree ~/Projects/foo feat-x
swift run nohup-cli --host 127.0.0.1 prompt ~/Projects/foo.worktrees/feat-x "list files in this directory"
swift run nohup-cli --host 127.0.0.1 prompt <cwd> "continue" --session <sid>
swift run nohup-cli --host 127.0.0.1 subscribe <runId> <afterSeq> # resume after disconnect
swift run nohup-server --pair # print a pairing link
swift run nohup-cli pair 'nohup://pair?…' my-mac # pair with the link and save it
swift run nohup-cli --mac my-mac info # connect via iroh