Documentation
Everything you need to get started with Pry.
Getting Started
Installation
Add Pry via Swift Package Manager:
// Package.swift
dependencies: [
.package(url: "https://github.com/9alvaro0/Pry.git", from: "1.3.0")
]
Or in Xcode: File → Add Package Dependencies
and paste https://github.com/9alvaro0/Pry
Basic Setup
Attach the .pry() modifier to your root view:
import SwiftUI
import Pry
@main
struct MyApp: App {
var body: some Scene {
WindowGroup {
ContentView()
.pry()
}
}
} That's it. A floating action button (ladybug) will appear on top of your app. Tap it to open the inspector.
Custom Store
For more control, create a PryStore instance:
import Pry
let store = PryStore()
// Then use it with the modifier:
ContentView()
.pry(store: store) Console Logging
Log messages directly to the Pry console:
import Pry
Pry.log("User tapped checkout button")
Pry.log("Payment failed", type: .error)
Pry.log("Cache hit", type: .debug)
Pry.log("Order confirmed", type: .success) Requirements
| Platform | iOS 18+ |
| Swift | 6.0+ |
| Xcode | 16.0+ |
| Dependencies | None -- zero external dependencies |
| License | MIT |
Pry Pro Setup PRO
After purchasing Pry Pro, you'll receive access to the private PryPro repository. Replace your Pry dependency with PryPro:
// Package.swift
dependencies: [
.package(url: "https://github.com/9alvaro0/PryPro.git", from: "1.0.0")
]
PryPro includes all Free features plus Pro tooling. Use .pryPro() instead of
.pry() to enable all Pro features.
import PryPro
ContentView()
.pryPro()