Skip to content

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)

The iOS app follows a Coordinator + MVVM architecture pattern:

AntimatterApp.swift # App entry point, lifecycle
AppCoordinator.swift # Root navigation coordinator
├── ConnectCoordinator # Pairing and connection flow
├── ChatCoordinator # AI chat and trajectory view
├── FilesCoordinator # Workspace file browser
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 |


  • Live trajectory streaming — receives STEP events 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.
  • 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.

The iOS app uses LocalAuthentication to require Face ID or Touch ID before establishing any WebSocket connection:

BiometricAuthManager.swift (simplified)
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"
)
}
CryptoKit Ed25519 verification
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
}
}

  • Xcode 16+ (macOS only)
  • iOS 16+ simulator or device
  • Swift 6 toolchain (bundled with Xcode 16)
Clone and open
git clone https://github.com/saifmukhtar/antimatter.git
cd antimatter/ios
open AntimatterApp.xcworkspace

In Xcode:

  1. Select your target device or simulator (iPhone, iPad).
  2. Set your Team in Signing & Capabilities if building for a real device.
  3. Press ⌘R to build and run.

Swift Package Manager resolves dependencies automatically when you open the workspace. If packages fail to resolve:

Clear package cache
rm -rf ~/Library/Caches/org.swift.swiftpm
xcodebuild -resolvePackageDependencies -workspace AntimatterApp.xcworkspace -scheme AntimatterApp

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 |


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) |


Saif Mukhtar

Saif Mukhtar

Creator & Lead Developer of Antimatter · Android, iOS & Python engineer