Saturday, 16 January 2016
0 comments

BugshotKit: iOS in-app Bug For Developers And Testers

iOS in-app Bug

BugshotKit: iOS in-app Bug For Developers And Testers


Marco Arment, made this app for developers to annotate screenshots. And he released an open-source embeddable version for iOS developers. It is made for development and ad-hoc beta testing. It is a iOS in-app bug reporting for developers and testers, with annotated screenshots and the console log.


Developing his own podcast app “Overcast,” Marco decided to open source an embeddable version that can be used for beta tester bug reports.

“I’m starting the Overcast beta soon, and I wanted an easy way for my testers to report (non-crash) bugs and provide UI feedback. I also wanted a way to remind myself of UI or feature ideas easily, and I’ve occasionally needed to view the error console on the device when tracking down difficult bugs. BugshotKit addresses all of these: it’s an embeddable Bugshot annotation interface and console logger, invoked anywhere in your app by an otherwise unused gesture (e.g. a two-finger swipe up, a three-finger double-tap, pulling out from the right screen edge, etc.), that lets you or your testers quickly email you with helpful details, screenshots, and diagnostic information.”

It perform the gesture according to your choice- shake, two-finger swipe-up, three-finger double-tap, swipe from right screen edge, etc. — from anywhere in the app, and the Bugshot report window slides up.



Automatically it takes a screenshots of your mobile screen and contains a live NSLog() console log with no dependencies.While tapping the Bugshot screen will appear having a draw bold orange arrows and boxes to annotate, or blur out sensitive information. And once you click on the green check marks it omit the screenshot.

To Prevent accidentally from shipping your app with BugshotKit, I've included a helpful private API call that should cause immediate validation failure upon submitting. If you somehow ship it anyway, it will attempt to detect App Store builds at runtime and disable itself.

Installation:

The easiest way to be sure you're not going to build BugshotKit into your App Store builds is to link to it just in your Debug and Ad-Hoc builds. To do that:

1. Build a static library from the BugshotKit Xcode project.
2. Put that library, and the header files that come with it, somewhere in your project folder.
3. Make sure your app build settings' Library Search Paths and Header Search Paths include the path to where you put these.
4. Add -lBugshotKit to the Other Linker Flags setting, but only for the Debug and Ad-Hoc builds.
5. Use a conditional macro (e.g. "#if defined(DEBUG) || defined(ADHOC)"..."#endif") around the BugshotKit import and the invocation, below.

Usage:

Simply invoke [BugshotKit enableWithNumberOfTouches:...] from 
your application:didFinishLaunchingWithOptions::

#import "BugshotKit.h"

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    [BugshotKit enableWithNumberOfTouches:1 performingGestures:BSKInvocationGestureSwipeUp feedbackEmailAddress:@"[email protected]"];
}

That's it, really. Console tracking begins immediately, and on the next run-loop pass, it'll look for a UIWindow with arootViewController and attach its gesture handlers (if any).
Bugshot can also be shown when the user shakes the device, by using BSKWindow in place of UIWindow in your application delegate:

self.window = [[BSKWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

If you don't want to use gesture triggers, you can invoke it manually (from a button, maybe):

[BugshotKit show];
BugshotKit's emails include an info.json file containing basic info in JSON:
{
  "appName" : "TestBugshotKit",
  "appVersion" : "1.0",
  "systemVersion" : "7.1",
  "deviceModel" : "iPhone6,1"
}

To add custom keys to this, set a block with [BugshotKit setExtraInfoBlock:] that returns an NSDictionary, and they'll be merged in.
To customize the email subject, set a block with [BugshotKit setEmailSubjectBlock:]. It receives the full dictionary as a parameter, with any keys you added with the extra info block, so you can do something like:

[BugshotKit setExtraInfoBlock:^NSDictionary *{
    return @{
        @"userID" : @(1),
        @"colorScheme" : @"dark"
    };
}];

[BugshotKit setEmailSubjectBlock:^NSString *(NSDictionary *info) {
    return [NSString stringWithFormat:@"Bug report from version %@, user %@", info[@"appVersion"], info[@"userID"]];
}];

Here is the video of evolution of BugshotKit:

Watch Video:


Download

Source: github

0 comments:

Post a Comment

 
Toggle Footer
Top