All open-source packages
ToolingSwift

iOSDevelopmentTools

Inspect your app's network requests, logs and device state in an in-app console, with secrets redacted.

4StarsLatest Release: v2.0.0 · Updated: October 15, 2026
Platforms:iOS 17macOS 14

License: MIT

A dependency-free Swift package for iOS 17+ and macOS 14+ that records the requests an app makes with URLSession, keeps its log messages and collects a device report, and shows all three in a SwiftUI console that opens with a shake, a button or a window. Passwords, tokens, cookies and API keys are replaced before anything is stored, and requests can be shared as cURL commands or HAR files. It is meant for debug and test builds and is written for Swift 6 strict concurrency.

Features

  • One line to record: NetworkCapture.start() records URLSession.shared and every session created afterwards from the default or ephemeral configuration; responses reach the app unchanged
  • Redaction before storage: header, query, form, multipart and JSON values with sensitive names are replaced however the name is spelled; a structured body that cannot be checked is withheld
  • Bounded storage: at most 500 requests and 256 KiB of each body by default, log messages in a ring buffer, uploads over 4 MiB streamed instead of copied
  • Export any request as a shell-safe curl command and any list of requests as an HTTP Archive (HAR 1.2)
  • LogStore keeps leveled, categorized messages and also writes them to the unified logging system; DeviceSnapshot reports version, OS, model, memory footprint, thermal state and debugger status
  • SwiftUI console with Network, Logs and Device tabs, search, filters and share menus; opens on shake (iOS), from a button or in a macOS window
  • 148 Swift Testing tests; requests travel from an app session through the capture to a stub server, and the tests check what the server received, what the app received and what was stored
  • DocC catalog with four articles and the DevToolsDemo example app for iOS and macOS

Quickstart

swift
1@main
2struct MyApp: App {
3 init() {
4 #if DEBUG
5 NetworkCapture.start()
6 #endif
7 }
8 
9 var body: some Scene {
10 WindowGroup {
11 ContentView()
12 #if DEBUG
13 .devToolsConsoleOnShake()
14 #endif
15 }
16 }
17}

Installation

Xcode (File › Add Package Dependencies…)

text
1https://github.com/muhittincamdali/iOSDevelopmentTools.git

Swift Package Manager

swift
1.package(url: "https://github.com/muhittincamdali/iOSDevelopmentTools.git", from: "2.0.0")

Screenshots

The Network tab listing seven real requests from the example app: a failed request to an unknown host, a 503, a 404 and four successful requests with their duration and size
A sign-in request opened in the console: the Authorization header and the password in the JSON body show [REDACTED]
The Logs tab with info, warning and error messages from the example app, each with its category, time and source line
The Device tab showing app version, iOS version, simulated model, memory, app memory, thermal state, Low Power Mode and debugger status

Timeline

  1. Repository opened with network, storage, analytics, debug and utility modules

  2. v1.0.0 tagged: a network client built on Alamofire plus storage, analytics and logging managers in five modules

  3. Simplification: the 1.0.0 modules were removed and replaced with placeholder code

  4. v2.0.0: rebuilt from scratch as an in-app network inspector, log console and device report, with redaction, DocC and an example app

Links

Related Article

Read the article