This file provides guidance to AI agents when working with code in this repository.
Wire iOS is a secure messaging app built as a monorepo (wire-ios-mono.xcworkspace). The codebase combines modern Swift Package Manager modules with legacy Carthage/Xcode framework projects. The primary workspace file is wire-ios-mono.xcworkspace.
- Xcode: version specified in
.xcode-version - Carthage: 0.39.1+
- Ruby: version in
.ruby-version, managed viarbenv - Git LFS: required for binary files
Initial setup:
./setup.shTo update or rebuild dependencies, just re-run the setup.sh script when needed.
Open wire-ios-mono.xcworkspace in Xcode and select the Wire-iOS scheme.
All the commands for testing are used via fastlane. This is what the CI executes. See fastlane/README.md for the common commands.
Note that the simulator model and OS version can be read in fastlane/.env
Run security tests from the command line:
xcodebuild test \
-workspace wire-ios-mono.xcworkspace \
-scheme Wire-iOS \
-testPlan SecurityTests \
-destination 'platform=iOS Simulator,name=iPhone 14,OS=26.0.1'Available test plans in wire-ios/Tests/TestPlans/:
AllTests.xctestplanβ all testsUnitTests.xctestplanβ unit tests onlyUITests.xctestplanβ UI tests onlySecurityTests.xctestplanβ security-specific testsGermanLocaleTests.xctestplanβ German locale tests
The same -testPlan flag applies to the WireSyncEngine and WireDataModel schemes.
UI test methods must include a Testiny TC ID suffix, e.g. testLogin_TC_1234.
UITests require a special env, that is filled by 1password command. See wire-ios/WireUITests/README for more information
Both tools are distributed as SPM binary targets in scripts/Package.swift.
./scripts/run-swiftlint.sh # lint
./scripts/run-swiftformat.sh # formatKey rules enforced:
- SwiftLint: TODOs must reference a JIRA ticket β
// TODO: [WPB-123] description - SwiftFormat: max line width 120 chars, 4-space indent, imports sorted (
testable-last) - Every Swift file must begin with the GPL v3 license header (year 2026)
The app is layered. Data flows upward:
UI Layer WireUI (SwiftUI) β WireDesign, WireConversationListUI, WireMainNavigationUI, etc.
β
Domain Layer WireDomain β business logic, use cases, entity models
β
Sync Engine wire-ios-sync-engine β network sync, push notifications, client-side logic
β
Data/Model wire-ios-data-model (Core Data) + WireData (modern SPM layer)
β
Transport/Network wire-ios-transport + wire-ios-request-strategy + WireNetwork
Supporting modules (all SPM packages unless noted):
- WireAuthentication β login flows, SSO
- WireCalling β VoIP via AVS (open-source audio/video signaling)
- WireCoreCrypto β Proteus/MLS end-to-end encryption
- WireMessaging β messaging logic
- WireBackup β import/export
- WireAnalytics β analytics
- WireLogging β structured logging
- WireFoundation β shared utilities and test helpers
- WireDebug β debug-only tooling
Legacy Xcode projects (in their own subdirectories): wire-ios-sync-engine/, wire-ios-data-model/, wire-ios-request-strategy/, wire-ios-transport/, wire-ios-system/, wire-ios-utilities/, wire-ios-testing/, wire-ios-images/, wire-ios-share-engine/, wire-ios-link-preview/, wire-ios-ziphy/, wire-ios-canvas/.
Code generation: Sourcery generates mocks (AutoMockable), SwiftGen generates string/asset accessors. Run via scripts/run-sourcery.sh and scripts/run-swiftgen.sh.
- Commits and PR titles must reference a JIRA issue:
fix: description - WPB-XXXXX- see Conventional Commits - Code review uses conventional comments
- Cherry-picked commits are marked with π
- All colors in UI code must come from
WireDesign.ColorThemeorWireDesign.BaseColorPalette - New UI elements require
accessibilityLabelfor VoiceOver /accessibilityIdentifierfor UI tests - UI elements that display text must use the API that supports dynamic type / large fonts
- Push notifications only work with the App Store-signed build (Apple security restriction)