Wormholy Requirements
masterTo use Wormholy, ensure your environment meets the following criteria:
- iOS 16.0+ (For older versions, use version 1.7.x)
- Xcode 15+
- Swift 5
repository·master·Indexed 25 days ago
https://github.com/pmusolino/wormholyAn iOS debugging tool for inspecting network traffic (requests, responses, and headers) via a shake gesture. It works with NSURLSession, Alamofire, and AFNetworking without requiring SSL certificate handling. Supports iOS 16.0+ (or 1.7.x for older versions), Xcode 15+, and Swift 5.
To use Wormholy, ensure your environment meets the following criteria:
Wormholy can be integrated using CocoaPods or Swift Package Manager. It is highly recommended to install it only in Debug mode and remove it before production.
To install via CocoaPods specifically for Debug configurations, add the following to your Podfile:
pod 'Wormholy', :configurations => ['Debug']You can customize Wormholy's behavior using several static properties on the Wormholy class:
Wormholy.ignoredHosts: An array of host suffixes to exclude from logging (e.g., ["example.com"] ignores example.com and api.example.com).Wormholy.limit: The maximum number of logs to retain in memory.Wormholy.defaultFilter: A string used to set the initial filter in the search box (e.g., "status:500").Wormholy.shakeEnabled: A boolean to enable or disable the shake gesture to trigger the UI.Wormholy.setEnabled(_:): Enables or disables global tracking for all NSURLSession traffic.func configureWormholy() {
Wormholy.ignoredHosts = ["example.com", "analytics.internal"]
Wormholy.limit = 200
Wormholy.defaultFilter = "status:500"
Wormholy.shakeEnabled = true
// Global tracking for URLSession traffic.
Wormholy.setEnabled(true)
}If you have disabled the shake gesture (via Wormholy.shakeEnabled = false or the environment variable WORMHOLY_SHAKE_ENABLED = NO), you can trigger the Wormholy interface manually by posting the wormholy_fire notification via NotificationCenter.
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "wormholy_fire"), object: nil)Wormholy automatically hooks URLSessionConfiguration.default and URLSessionConfiguration.ephemeral. To explicitly override behavior for a specific configuration instance, use Wormholy.setEnabled(_:sessionConfiguration:) before creating the URLSession.
let configuration = URLSessionConfiguration.ephemeral
Wormholy.setEnabled(false, sessionConfiguration: configuration)
let session = URLSession(configuration: configuration)