Giter VIP home page Giter VIP logo

humbug's Introduction

humbug

A self-contained widget you can add to any iOS project that provides Pivotal Tracker integration and FLEX debugging tools. Include it in beta builds to see consistent bug reports with logs and screen shots from your testers.

Screenshot

Installation

Requires iOS 7 and later

  • clone the repository.
  • cd into the humbug folder and run git submodule init and git submodule update to pull down the dependencies.
  • Drag the 'App' folder into your project.
  • Drag Externals/FLEX/Classes and Externals/MBProgressHUD/MBProgressHUD.h/.m into your project if necessary.
  • Link against libz.dylib (used to compress log files). *initialize the BUGViewController by passing in your pivotal tracker api token, project ID, and optionally a block that returns your logs as a NSData.

######Pivotal Tracker Info Your Pivotal Tracker API Token can be found at the bottom of your Pivotal Tracker 'Profile' page. Your Pivotal Tracker Project ID is the number in the URL for you Tracker project's page (https://www.pivotaltracker.com/n/projects/123456).

######Excluding Humbug From AppStore Builds humbug should only be included in non-AppStore builds as FLEX will cause an AppStore rejection. To exclude the files from your AppStore builds:

  • Go to your project's build settings and click 'Add User-Defined Setting'. Name the settings key EXCLUDED_SOURCE_FILE_NAMES then, for your release configuration, add FLEX* BUG* UIWindow+BUG* as its value.
  • Wrap all Humbug file imports and method calls in a #if DEBUG check:
#ifdef DEBUG
	#import "BUGViewController.h"
	#import "DDFileLogger.h"
#endif

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    #ifdef DEBUG
    [BUGViewController createSharedInstanceWithLogFileData:^NSData *{
        DDFileLogger *fileLogger;
        for (id logger in Flywheel.sharedInstance.loggers) {
            if ([logger isKindOfClass:[DDFileLogger class]]) {
                fileLogger = logger;
            }
        }
        NSData *fileData;
        if ([fileLogger.logFileManager sortedLogFilePaths].count) {
            fileData = [NSData dataWithContentsOfFile:[fileLogger.logFileManager sortedLogFilePaths][0]];
        }
        return fileData;
    } trackerAPIToken:@"your-pivotal-tracker-api-token" trackerProjectID:@"your-project-id"];
    #endif
}

Usage

Once initialized, humbug can be activated out of the box by shaking your device or by calling [BUGViewController showHideDebugViewController]. If you would like to disable the 'shake to reveal humbug' feature, just remove "UIWindow+BUG.m" from your apps' compile sources.

Contributing

Pull requests welcome. Please add tests where appropriate.

Maintainers

Dependencies

  • FLEX - in-app debugging tool from Flipboard
  • MBProgressHUD - The HUD used by everyone

Tests

To run the Cedar tests, select the Specs target and run under the iOS 7.1 simulator.



Copyright (c) 2014 Flywheel Software. This software is licensed under the GPL v2.0 license.

humbug's People

Contributors

medmonds avatar tooluser avatar

Watchers

James Cloos avatar Tomasz Rejdych avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.