Latest 1.1.0
License MIT
Platforms ios 10.0
Dependencies StanwoodCore, Toast-Swift

StanwoodCore framework

[Swift Version]()
[iOS 10+]() Maintainability

Debugging and testing iOS applications can be quite a long task due to the nature of Software Development. StanwoodDebugger tool provides reach information on Analytics, Errors, Logging, Networking, and UITesting to simplify this process.

[Demo StanwoodDebugger]()

Table of contents


Tal Zion [email protected]


pod 'StanwoodDebugger', :configurations => ['Debug'] # Make sure to only use StanwoodDebugger for development only.


import StanwoodDebugger

class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?

    #if DEBUG
    lazy var debugger: StanwoodDebugger = StanwoodDebugger()

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {

        #if DEBUG
        debugger.isEnabled = true

Other options

debugger.enabledServices: [Service] = [.logs, .errors] /// The services you would like to enable. Default is se to `allCases`
debugger.tintColor = .red /// Change the tint color
debugger.errorCodesExceptions = [4097] /// Add error code exceptions
debugger.isEnabled = true
debugger.isShakeEnabled = true // Defaults to `true`. When this is `true`, shaking the device will enable/disable the Debugger

Adding logs


Option 1.

Set up your tracking payload:

public func payload() -> [String:String] {

    var payload: [String:String] = ["eventName": eventName]

    if let itemId = itemId {
        payload["itemId"] = itemId

    if let category = category {
        payload["category"] = category

    if let contentType = contentType {
        payload["contentType"] = contentType

    if let screenName = screenName {
        payload["screenName"] = screenName

    let dateFormatter = DateFormatter()
    dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZ"

    payload["createdAt"] = dateFormatter.string(from: Date())

    return payload

Post it to:

func post(_ payload: [String:String]) {
    let notificationCentre = NotificationCenter.default
    let notification = Notification.init(name: Notification.Name(rawValue: "io.stanwood.debugger.didReceiveAnalyticsItem"), object: nil, userInfo: payload)
Option 2.

Use StanwoodAnalytics as your tracking framework

analyticsBuilder = analyticsBuilder.setDebuggerNotifications(enabled: true)


StanwoodDebugger works by default with URLSessiosn.shared and request are beeing logged for free. You can also register a custom condiguration:

let configuration = URLSessionConfiguration.waitsForConnectivity

debugger.regsiter(custom: configuration)

/// Use with URLSession || any networking libraries such as Alamofire and Moya
let session = URLSession(configuration: configuration)



StanwoodDebugger will log NSError by default. To add log exceptions:

debugger.errorCodesExceptions = [4097] /// Add error code exceptions


StanwoodDebugger will log print && debugPrint by default.


  1. Create a new Bridging-Header file and add -DEBUG suffix


  1. Import StanwoodDebugger
@import StanwoodDebugger;

Note: Make sure to add any other imported libraries from your main header file

  1. Set Bridging-Header-DEBUG.h in the relevant configurations in the build settings.



StanwoodDebugger will log Signal and NSException crashes by default.


StanwoodDebugger is under MIT licence. See the LICENSE file for more info.


A brief summary of each StanwoodDebugger release can be found in the CHANGELOG.

Latest podspec

    "name": "StanwoodDebugger",
    "version": "1.1.0",
    "summary": "Stanwood debugger provide live view debugging",
    "description": "Live debugger for:n    1. Analyticsn    2. Crashesn    3. Logsn    4. Networkingn    5. Errors",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "stanwood": "[email protected]"
    "source": {
        "git": "",
        "tag": "1.1.0"
    "swift_version": "4.2",
    "platforms": {
        "ios": "10.0"
    "source_files": [
    "resource_bundles": {
        "StanwoodDebugger": [
    "dependencies": {
        "StanwoodCore": [
            "~> 1.4.1"
        "Toast-Swift": [
            "~> 4.0.1"

Pin It on Pinterest

Share This