Developer-first HTTP interception and mocking for iOS.
Capture, inspect, debug, and mock network requests with zero configuration and zero dependencies.
Inspectly is a lightweight HTTP inspector and API stubbing toolkit for iOS.
It automatically captures network traffic, provides a beautiful in-app inspector, and allows you to create and manage mocked API responses directly from live requests.
Built on top of the Foundation networking stack, Inspectly works seamlessly with URLSession, Alamofire, AFNetworking, and any networking layer powered by Foundation.
- Automatic request interception with zero setup
- Zero external dependencies
- In-app inspector UI for Requests, Statistics, Stubs, and Settings
- Request and response inspection including headers, bodies, timing, and metadata
- Rich HTML Rendering — interactive preview for HTML responses
- Smart Content Detection — automatic content-type sniffing when server headers are misleading
- Sensitive Header Masking —
Authorization,Cookie,X-Api-Keyand other sensitive headers are hidden by default with a per-header reveal toggle - Full-Text Search — search across URL, method, host, status code, request body, response body, and error messages
- Search, filter, sort, favorite, pin, and tag captured requests
- Paginated request list with auto-load-more
- Export logs as JSON directly from the app
- Create stubs directly from any captured request in one tap
- Flexible URL Matching — match stubs by
Exact,Contains,Prefix,Suffix, orRegexURL pattern - All requests with matching URLs are automatically marked as stubbed
- Enable, disable, duplicate, group, and manage stubs
- Export stubs as JSON for sharing or version control
- Slow Request Detection — configurable threshold highlights slow requests with visual indicator
- Network Throttling — simulate Edge, 3G, LTE, or custom bandwidth/delay conditions
- Timeline view for DNS, connect, TLS, TTFB, and transfer phases
- cURL export with correct shell escaping for all requests
- Configure max stored requests (100–2500)
- Ignore specific hosts from being captured
- Shake gesture shortcut to open the inspector
- Light / Dark / System theme override
- Auto-prettify JSON responses
- iOS 16.0+
- Swift 5.9+
- Xcode 15+
dependencies: [
.package(url: "https://github.com/balitax/Inspectly.git", from: "1.2.0")
]Then add Inspectly to your target dependencies.
import Inspectly
@main
struct MyApp: App {
init() {
Inspectly.enable()
}
var body: some Scene {
WindowGroup {
ContentView()
}
}
}Inspectly.presentInspector()import Inspectly
@main
struct MyApp: App {
init() {
#if DEBUG
Inspectly.enable()
#endif
}
var body: some Scene {
WindowGroup {
ContentView()
}
}
}import Inspectly
let configuration = Inspectly.Configuration(
isLoggingEnabled: true,
isStubEnabled: true,
ignoredHosts: ["example.com"],
isShakeGestureEnabled: true,
ignoreLocalhost: true
)
Inspectly.enable(with: configuration)| Option | Type | Default | Description |
|---|---|---|---|
isLoggingEnabled |
Bool |
true |
Enable or disable request capture |
isStubEnabled |
Bool |
true |
Enable or disable request stubbing globally |
networkThrottlingPreset |
NetworkThrottlingPreset |
.off |
Simulate network conditions (Edge, 3G, LTE, Custom) |
slowRequestThreshold |
TimeInterval |
1.0 |
Duration (seconds) above which requests are flagged as slow |
maxStoredRequests |
Int |
500 |
Maximum number of requests retained in storage |
ignoredHosts |
[String] |
[] |
Hosts to exclude from capture |
isShakeGestureEnabled |
Bool |
true |
Open the inspector by shaking the device |
ignoreLocalhost |
Bool |
false |
Ignore localhost and 127.0.0.1 |
stubRepository |
StubRepositoryProtocol? |
nil |
Provide a custom stub repository |
Inspectly.enable(isEnabled:with:)Inspectly.disable()Inspectly.presentInspector(rootView:)Inspectly.isEnabledInspectly.container
Inspectly works with:
URLSession- Alamofire
- AFNetworking
- Any networking library built on top of Foundation
No custom interceptor setup is required for common use cases.
| Demo App | Requests | Request Detail |
|---|---|---|
![]() |
![]() |
![]() |
| Statistics | Stubs | Settings |
|---|---|---|
![]() |
![]() |
![]() |
- Enable Inspectly in your app
- Trigger real API calls
- Open the inspector using shake gesture or
Inspectly.presentInspector() - Browse captured requests
- Create a stub from an existing request
- Adjust the mocked response in the Stubs tab
- Re-run the flow with stubs enabled
- iOS 16.0 minimum — dropped iOS 13–15 support
- Liquid glass-inspired floating tab bar for iOS 16–25
- Inspector now presents fullscreen
- Revamped DemoApp with card layout and response console
- Fixed dark mode statistics cards visibility
- Converted
StorageManagertoactor(eliminates Sendable warnings) - Removed all redundant
@availableannotations
- Flexible stub URL matching: Exact, Contains, Prefix, Suffix, Regex
- Batch-mark all matching URL requests as stubbed when a stub is saved
- Clearing all requests now also clears all stubs
- Configurable slow request detection threshold (Settings → Performance)
- Search covers response body, request body, and error messages
- Sensitive header masking with per-header reveal toggle
- Paginated request list with auto-load-more
- Configurable max stored requests (100–2500)
- cURL export with correct shell escaping
- Full UI revamp: Request Detail, Request List, Statistics, Stubs, Settings
- Initial release
Contributions are always welcome.
If you would like to improve the UI, add new features, improve performance, or fix bugs, feel free to open an issue or submit a pull request.
Inspectly is available under the MIT license. See LICENSE for more information.
Made with ❤️ by Agus Cahyono






