Latest 0.3.0
Homepage https://github.com/plougy/DebugKit
License MIT
Platforms ios 9.0
Authors

DebugKit

Build Status
CocoaPods Compatible
Platform

DebugKit is a Swift library that provides an assistance tool to debug an iOS app during the development and the tests.

An idea inspired from Vine iOS app accidentally shipped with debug mode.

Features

  • [x] Report Bug via email
  • [x] Screenshots
  • [x] Jump to screen
  • [x] Actions

Requirements

  • iOS 9.0+
  • Xcode 7.3+

Installation

CocoaPods

To install DebugKit with Cocoapods, add the following line to your Podfile:

pod 'DebugKitUI'

You must now set the DEBUG flag in Swift (contrast to Objective-C, it’s not automatic). Go in Build Settings -> Swift Compiler – Custom Flags and add the following content for the Debug line:

-DDEBUG

Usage

After set your first UIWindow in application:didFinishLaunchingWithOptions: in your AppDelage, you can begin using DebugKit by adding this following line:

DebugKitUI.setup("[email protected]")

Configuration button

It’s possible to modify the button to open DebugKitUI by adding a configuration struct. All parameters are optional.

var configuration = DebugKitUIButtonConfiguration()
configuration.position = CGPoint(x: 30.0, y: 100.0)
configuration.color = UIColor.darkGrayColor()
configuration.icon = UIImage(named: "icon.png")
configuration.savePositionEnable = false

DebugKitUI.setup("[email protected]", buttonConfiguration: configuration)

Jump to screen

Add screens to jump in and test faster. You can present them in a modal (.Modal by default) or push them in your current NavigationController (.Push).

DebugKitUI.sharedInstance.screens += [
    DebugKitUIScreen(name: "Example screen", controllerBlock: { () -> UIViewController in
        let controller = UIViewController()
        return controller
    }, mode: .Push)
]

Actions

Add actions or new screens for DebugKitUI class to do anything in your app. You can decide to hide DebugKitUI after an action if you want.

DebugKitUI.sharedInstance.actions += [

    DebugKitUIAction(name: "Add a screen", controllerBlock: { () -> UIViewController in
        let controller = UIViewController()
        return controller
    }),

    DebugKitUIAction(name: "Hello World", block: { () in
        print("Action: Hello World")
    }, dismissUI: true)
]

License

DebugKit is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "DebugKitUI",
    "version": "0.3.0",
    "summary": "Assistance tool to debug an iOS app during the development and the tests",
    "homepage": "https://github.com/plougy/DebugKit",
    "license": "MIT",
    "authors": {
        "Aymeric Gallissot": "[email protected]"
    },
    "source": {
        "git": "https://github.com/plougy/DebugKit.git",
        "tag": "0.3.0"
    },
    "social_media_url": "https://twitter.com/plougy",
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "Sources/**/*"
}

Pin It on Pinterest

Share This