Latest | 0.5.0 |
---|---|
Homepage | https://github.com/johnsonandjohnson/Guppy |
License | Apache v2.0 |
Platforms | ios 10.0 |
Authors |
Do you want to know what’s tedious? Debugging network requests and responses if you don’t have the right tools. Guppy is a logging tool focused on HTTP requests that can be easily plugged into any iOS application. Guppy will intercept and log each network request sent from the app. You can access any Guppy log and share it with the rest of you team effortlessly.
Usage
While in the simulator you can use: ^ + ⌘ + z
to bring up Guppy or shake your phone.
You can dig deep into the details of your network logs and share them with your team or yourself.
Example
To run the example project, clone the repo, and run pod install
from the Example directory first.
URLSession
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
Guppy.registerURLProtocol()
return true
}
}
URLSession with Custom Protocols
class Session: URLSession {
init() {
let configuration = URLSessionConfiguration.default
configuration.urlCache = nil
configuration.protocolClasses = [MyCustomProtocol, Guppy.getSniffURLProtocol()]
super.init(configuration: configuration)
}
}
Alamofire
class SessionManager: Alamofire.SessionManager {
init() {
let configuration = URLSessionConfiguration.default
configuration.urlCache = nil
configuration.protocolClasses = [Guppy.getSniffURLProtocol()]
super.init(configuration: configuration)
}
}
Requirements
Xcode 10.2+
iOS 11.0+
Installation
pod 'Guppy'
License
Guppy is released under the Apache 2.0 license. See LICENSE for details.
Latest podspec
{ "name": "Guppy", "version": "0.5.0", "summary": "Guppy is a friendly fish that sniffs out all network request.", "homepage": "https://github.com/johnsonandjohnson/Guppy", "license": { "type": "Apache v2.0" }, "authors": { "Diego Urquiza": "[email protected]" }, "platforms": { "ios": "10.0" }, "swift_versions": "5.0", "source": { "git": "https://github.com/johnsonandjohnson/guppy.git", "tag": "0.5.0" }, "source_files": "Guppy/Sources/**/*.swift", "resources": "Guppy/Sources/**/*.xcassets", "ios": { "resources": "Guppy/Sources/**/*.{storyboard,xib}" } }
Thu, 16 May 2019 10:13:04 +0000