Overlog is an overlay for iOS apps that allows individual developers and teams to easier test and debug their apps.
Overlog uses ResponseDetective to keep track of HTTP traffic happening inside your host application. Requests, responses and errors are grouped and updated live. You can take a look at their details, including headers and bodies for both request and responses and error details in case one occurs.
Having all this data under your fingertips might greatly improve testing and debugging issues related to network communication.
In order to allow Overlog to inspect HTTP traffic, an additional line of code is required. Please read usage section for more information.
Overlog scans your host app's User Defaults and Keychain Items and displays them to you in a clean key-value way.
Overlog redirects the console output of your app into the visible UI so that you can use logs to get insight of what is happening to the state of your app.
All of the data shown by Overlog can be shared with your team with a single tap of a button.
What makes Overlog special is its stunning and non-intrusive design.
All of the above features can be enabled and disabled by code. You have full control of what Overlog is allowed to display.
To use Overlog in your app, install it, import it, and add the following code just after you set up your key window:
Overlog.shared.attach(to: window)
And... that's it! An Overlog button will appear on screen.
You can enable and disable features by modifying Overlog's configuration:
// Enable only HTTP Traffic feature.
Overlog.shared.configuration.enabledFeatures = [.httpTraffic]
// Enable only User Defaults and Keychain features.
Overlog.shared.configuration.enabledFeatures = [.userDefaults, .keychain]
// Enable all features (default).
Overlog.shared.configuration.enabledFeatures = Overlog.Feature.all
If you want your Keychain items to be inspected, you must let Overlog know what is its service identifier:
// Use custom keychain service identifier.
Overlog.shared.configuration.keychainIdentifier = "com.example.app.keychain-identifier"
// Use default keychain service identifier (default).
Overlog.shared.configuration.keychainIdentifier = nil
You may conditionally enable and disable features based on your target platform:
// Disable all features on simulator.
#if (arch(i386) || arch(x86_64)) && os(iOS)
Overlog.shared.configuration.enabledFeatures = []
#endif
If you find the overlay button too intrusive, but don't want to remove Overlog completely, you may enable toggling it when user shakes the device:
// Enable shake gesture support.
Overlog.shared.configuration.toggleButtonOnShake = true
// Disable shake gesture support (default).
Overlog.shared.configuration.toggleButtonOnShake = false
You may also do hide and show the overlay button programatically:
// Hide the button.
Overlog.shared.isHidden = true
// Show the button (default).
Overlog.shared.isHidden = false
Last, but not least β in order to allow Overlog to inspect HTTP traffic, you must point to a session configuration instance to be inspected:
// Create a configuration.
let configuration = URLSessionConfiguration.default
// Enable HTTP traffic inspection.
Overlog.shared.enableHTTPTrafficDebugging(in: configuration)
// Create and normally use a session.
let session = URLSession(configuration: configuration)
Overlog requires Xcode 9.3 or higher and supports iOS 8.0 or higher.
If you're using Carthage, add the following dependency to your Cartfile
:
github "netguru/Overlog" {version}
If you're using CocoaPods, add the following dependency to your Podfile
:
use_frameworks!
pod 'Overlog', '~> {version}'
If you have ideas of new features that could be supported in Overlog, feel free to create an issue!
Pull Requests from you (yes, you!) are always appreciated β no matter the size. We will respond and provide feedback to all Pull Requests!
Development requires the following tools to be installed:
Assuming the above tools are present, clone the repository and install the project's dependencies using Carthage:
$ carthage bootstrap --platform iOS --cache-builds
After that, open Overlog.xcodeproj
and build the project!
Next minor versions will focus on improving the existing features and fixing bugs. New features might be deferred until the next major version.
The next major version will include support for Swift 5 and might possibly include a couple of big new features. Estimated release date: Fall 2018.
This project is made and maintained with β‘ by Netguru.
Overlog is licensed under the MIT License.