On-device network inspector for iOS. Like browser DevTools, but inside your app.
Pry intercepts all URLSession traffic and gives you a full debugging suite — network monitoring, request/response inspection, structured logging, deeplinks, push notifications and more — without leaving the app or connecting to a Mac.
Zero dependencies, zero configuration. Add one modifier and you are done.
Network Inspector
- Automatic
URLSessioninterception, including third-party SDKs (Alamofire, Kingfisher, Firebase, ...) - Tabbed request detail: Overview (timing, redirects, GraphQL, JWT), Request (headers, body, query params), Response (headers, body, errors)
- GraphQL awareness — detects queries/mutations, shows operation name, variables, and response errors
- Image response preview — renders PNG / JPEG / GIF / WebP inline
- Redirect chain visualization
- Search by URL, method, status, host, GraphQL operation name
- Summary bar with request counts and error/pending indicators
- Group by host — toggle between flat list and domain-grouped view
- Headers with raw/table toggle and vertical key-value layout
- JSON/Raw toggle in body viewer
- FaceID/TouchID/Passcode lock (optional, toggle in Settings)
- Filter sheet with status filters, sort order, host selection, and statistics toggle
- Swipe actions: pin, copy URL, copy cURL, delete
- Pinned requests section at the top of the list
- Share and cURL export from request detail
- Per-host network stats
Console
- Terminal-style log stream with monospace timestamps and colored type labels (ERR, WRN, INF, OK, DBG, NET)
- Tap to expand inline — full message, source location, copy action
- Summary bar with error/warning counts and filter sheet
- Structured logging with types (info, success, warning, error, debug)
- File / function / line metadata captured automatically
- Search and filter
- Mirror to Xcode console (toggle)
App Hub
- Deeplinks monitor with URL builder simulator
- Push Notifications with automatic capture and simulator
- Cookies viewer / editor
- UserDefaults viewer / editor
- Device & App info
- Permissions dashboard
Presentation & Controls
- Floating action button, shake gesture, or both
- FAB position (left / right) and draggable mode
- Error count badge on the FAB
- Embedded mode — use Pry as a tab in your own app
- All preferences persist across launches
dependencies: [
.package(url: "https://github.com/9alvaro0/Pry.git", from: "1.0.0")
]Or in Xcode: File > Add Package Dependencies... and paste the URL.
import SwiftUI
import Pry
@main
struct MyApp: App {
var body: some Scene {
WindowGroup {
ContentView()
.pry()
}
}
}That is it. A floating ladybug button appears on top of your app. Tap it to open the inspector.
For custom configuration:
@State private var store = PryStore()
ContentView()
.pry(store: store)// Floating button (default)
.pry()
// Shake to open
.pry(trigger: .shake)
// Both
.pry(trigger: [.floatingButton, .shake])struct MyView: View {
@Environment(\.pryStore) private var pry
var body: some View {
Button("Sign in") {
pry.log("User tapped sign in", type: .info)
}
}
}Available log types: .info, .success, .warning, .error, .debug.
Deeplinks are captured automatically — Pry installs an .onOpenURL handler on the view you attach .pry() to. No extra code needed.
Push notifications received while the app is running are captured automatically. No extra code needed.
If you do not want a floating button and prefer a dedicated tab:
TabView {
HomeView()
.tabItem { Label("Home", systemImage: "house") }
PryContentView()
.tabItem { Label("Debug", systemImage: "ladybug") }
}
.pryEnvironment(store: store).pryEnvironment(store:) injects the store without adding any UI chrome.
PryStore(
maxNetworkEntries: 200, // default
maxLogEntries: 500, // default
maxDeeplinkEntries: 100,
maxPushEntries: 100
)Blacklist hosts you never want to capture:
store.blacklistedHosts.insert("telemetry.myservice.com")- iOS 18.0+
- Swift 6.0+
- Xcode 16.0+
Pry uses URLProtocol with automatic URLSessionConfiguration injection to intercept every URLSession created by your app (including third-party libraries). No proxy setup, no certificates, no Mac app. Everything runs on-device.
All captured data stays on-device. Nothing is ever sent to external servers.
Sources/Pry/
Public/ API surface (PryStore, modifiers, models)
Internal/ Interceptors, parsers, config (not exposed)
UI/ SwiftUI views organized by feature
PreviewContent/ Mock data for Xcode previews
MIT — see LICENSE.
Alvaro Guerra Freitas — @9alvaro0