Development guide
This page helps contributors understand the Trace codebase and workflow.
Repository layout
Trace: iOS app target (UI + capture management)TraceVPN: Network Extension packet tunnelTraceWidget/TraceWidgetExtension: WidgetKit and Live Activity- SwiftPM modules:
TraceCoreTraceNetworkingTraceSecurityTraceProxyTraceCompressionTracePacketTraceFeaturesTraceUI
Core flows
- Capture lifecycle:
TraceFeatures/VPN/VPNManagercontrols the tunnel. - Proxy server:
TraceProxyhosts the MITM proxy at127.0.0.1:8888. - Storage:
TraceCore/Storage/AppGroupStorageowns shared data and config.
App Group storage
The app and extensions share data via the App Group container. If unavailable (e.g., simulator), Trace falls back to local storage and logs a warning.
Local development workflow
- Run the app target and the VPN extension on a physical device.
- Use a clean session when testing new capture changes.
- Clear App Group data if you need a fresh start.
Logging
Trace uses structured logging categories for storage, VPN, export, and networking events. Check the console during development for diagnostic events.
Where to start contributing
- UI work:
TraceUIcomponents and Network inspector screens. - Capture pipeline:
TraceVPNandTraceProxy. - Storage and models:
TraceCoredata structures and persistence.
Testing notes
- Packet tunnel features require a physical device.
- Widget and Live Activity builds require entitlements and valid signing.