Latest 0.6.0
Homepage https://github.com/plougy/AssistanceKit
License MIT
Platforms ios 9.0
Authors

Build Status
CocoaPods Compatible
Platform

AssistanceKit 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 AssistanceKit with Cocoapods, add the following line to your Podfile:

pod 'AssistanceKit'

# Enable DEBUG flag in Swift
post_install do |installer|
    installer.pods_project.targets.each do |target|
        if target.name == 'AssistanceKit'
            target.build_configurations.each do |config|
                if config.name == 'Debug'
                    config.build_settings['OTHER_SWIFT_FLAGS'] = '-DDEBUG'
                end
            end
        end
    end
end

Usage

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

AssistanceKitUI.setup("[email protected]")

Configuration button

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

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

AssistanceKitUI.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).

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

Actions

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

AssistanceKitUI.sharedInstance.actions += [

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

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

License

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

Latest podspec

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

Pin It on Pinterest

Share This