iOS App
The Antimatter iOS app is a native companion application built with SwiftUI and Swift 6, providing the same full-featured experience as the Android app — live agent monitoring, remote prompting, and workspace browsing — all secured by Ed25519 cryptography and end-to-end encryption.
- Source:
ios/ - Min iOS: iOS 16.0
- Language: Swift 6
- UI Framework: SwiftUI
- Package Manager: Swift Package Manager (SPM)
Architecture
Section titled “Architecture”The iOS app follows a Coordinator + MVVM architecture pattern:
AntimatterApp.swift # App entry point, lifecycleAppCoordinator.swift # Root navigation coordinator├── ConnectCoordinator # Pairing and connection flow├── ChatCoordinator # AI chat and trajectory view├── FilesCoordinator # Workspace file browserPackage Dependencies (SPM)
Section titled “Package Dependencies (SPM)”| Package | Purpose |
|---|
| CryptoKit (system) | Ed25519 signature verification, AES-GCM E2EE decryption |
| Network (system) | URLSession WebSocket client |
| CoreData / SwiftData | Local conversation and artifact persistence |
| LocalAuthentication | Face ID / Touch ID biometric auth gate |
Features
Section titled “Features”AI Chat Interface
Section titled “AI Chat Interface”- Live trajectory streaming — receives
STEPevents from the Gateway and renders them in real-time as thinking blocks, tool calls, and text responses. - Rich Markdown rendering — AI responses rendered with full Markdown support including code syntax highlighting.
- Remote prompting — compose and send text prompts (or image attachments) to the active adapter from anywhere.
- Thinking indicator — animated typing indicator while the agent generates.
Workspace Browser
Section titled “Workspace Browser”- Live file tree — fetches the workspace directory structure via
GET_FILES. - File viewer — syntax-highlighted content viewer for source files.
- File writing — send quick edits on the go via
WRITE_FILE.
Security & Biometric Auth
Section titled “Security & Biometric Auth”The iOS app uses LocalAuthentication to require Face ID or Touch ID before establishing any WebSocket connection:
import LocalAuthentication
func requireBiometricAuth() async throws { let context = LAContext() guard context.canEvaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, error: nil) else { throw AuthError.biometricUnavailable } try await context.evaluatePolicy( .deviceOwnerAuthenticationWithBiometrics, localizedReason: "Verify your identity to connect to your AI agent" )}Ed25519 Cryptographic Handshake
Section titled “Ed25519 Cryptographic Handshake”import CryptoKit
func verifyHandshake(challenge: Data, signature: Data, publicKey: Curve25519.Signing.PublicKey) -> Bool { do { return try publicKey.isValidSignature( Curve25519.Signing.ECDSASignature(rawRepresentation: signature), for: challenge ) } catch { return false }}Building the App
Section titled “Building the App”Prerequisites
Section titled “Prerequisites”- Xcode 16+ (macOS only)
- iOS 16+ simulator or device
- Swift 6 toolchain (bundled with Xcode 16)
Build Steps
Section titled “Build Steps”git clone https://github.com/saifmukhtar/antimatter.gitcd antimatter/iosopen AntimatterApp.xcworkspaceIn Xcode:
- Select your target device or simulator (iPhone, iPad).
- Set your Team in Signing & Capabilities if building for a real device.
- Press ⌘R to build and run.
SPM Package Resolution
Section titled “SPM Package Resolution”Swift Package Manager resolves dependencies automatically when you open the workspace. If packages fail to resolve:
rm -rf ~/Library/Caches/org.swift.swiftpmxcodebuild -resolvePackageDependencies -workspace AntimatterApp.xcworkspace -scheme AntimatterAppScreen Inventory
Section titled “Screen Inventory”| Screen | SwiftUI View | Description |
|---|---|---|
| Connect | ConnectView |
QR scanner + pairing flow + adapter selection |
| Chat | ChatView + ChatBubble |
Trajectory stream + message input |
| Files | FilesView + FileDetailView |
Workspace browser + file viewer |
| Settings | SettingsView | App preferences, connection management |
Tech Stack Summary
Section titled “Tech Stack Summary”| Category | Framework / Library |
|---|---|
| Language | Swift 6 |
| UI | SwiftUI + UIKit (where needed) |
| Navigation | AppCoordinator pattern |
| Networking | URLSession WebSocket (async/await) |
| Cryptography | CryptoKit (Ed25519, AES-GCM) |
| Persistence | SwiftData / CoreData | | Biometrics | LocalAuthentication (Face ID, Touch ID) | | Camera | AVFoundation (QR scanner) |
