We've always wanted bug reports to be easy. Our users should not have to jump through hoops to tell us what happened on the app. BugReportKit is an attempt to make bug reports easy.
Once BugReportKit is integrated into your app (check the code examples below), all the user needs to do is take a screenshot, point to the bug on the screen by doodling on it, write a small description, and send it away! BugReportKit currently allows you to automatically send bug reports as Github Issues, JIRA Issues, Gitlab Issues, or Emails.
Here's an example of an issue submitted by BugReportKit.
And here is a GIF'ed video --
To run the sample project, clone the repo, and run pod install
from the Example directory first.
BugReportKit is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "BugReportKit"
Github and JIRA do not support uploading images through their APIs. Hence we need a place to upload images publicly and include the link to the Github/JIRA issues. BugReportKit
includes the AWS S3 uploader, but you can easily create your own by implementing the BRKImageUploader
protocol.
You need these additional sub-pod for Github.
pod "BugReportKit"
pod "BugReportKit/GithubReporter"
Then, in your AppDelegate
,
#import <BRK.h>
#import <BugReportKit/BRKGithubReporter.h>
#import <BugReportKit/BRKS3ImageUploader.h>
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
BRKS3ImageUploader* uploader = [[BRKS3ImageUploader alloc] initWithS3AccessKey:S3_ACCESSKEY
secretKey:S3_SECRETKEY
bucketName:S3_BUCKET];
BRKGithubReporter* reporter = [[BRKGithubReporter alloc] initWithGithubUsername:GITHUB_USERNAME
password:GITHUB_PASSWORD
repository:GITHUB_REPO
owner:GITHUB_OWNER
imageUploader:uploader];
[BugReportKit initializeWithReporter:reporter delegate:self];
[BugReportKit setUniqueUserIdentifier:@"[email protected]"]; // (optional) It can be anything that uniquely identifies your user in case you want to contact them
return YES;
}
You need these additional sub-pod for Github.
pod "BugReportKit"
pod "BugReportKit/JIRAReporter"
Then, in your AppDelegate
,
#import <BRK.h>
#import <BugreportKit/BRKJIRAReporter.h>
#import <BugReportKit/BRKS3ImageUploader.h>
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
BRKS3ImageUploader* uploader = [[BRKS3ImageUploader alloc] initWithS3AccessKey:S3_ACCESSKEY
secretKey:S3_SECRETKEY
bucketName:S3_BUCKET];
BRKJIRAReporter* reporter = [[BRKJIRAReporter alloc] initWithJIRABaseURL:JIRA_URL
username:JIRA_USERNAME
password:JIRA_PASSWORD
projectKey:JIRA_PROJECTKEY
imageUploader:uploader];
[BugReportKit initializeWithReporter:reporter delegate:self];
[BugReportKit setUniqueUserIdentifier:@"[email protected]"]; // (optional) It can be anything that uniquely identifies your user in case you want to contact them
return YES;
}
You need these additional sub-pod for Gitlab.
pod "BugReportKit"
pod "BugReportKit/GitlabReporter"
Then, in your AppDelegate
,
#import <BRK.h>
#import <BugReportKit/BRKGitlabReporter.h>
#import <BugReportKit/BRKS3ImageUploader.h>
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
BRKS3ImageUploader* uploader = [[BRKS3ImageUploader alloc] initWithS3AccessKey:S3_ACCESSKEY
secretKey:S3_SECRETKEY
bucketName:S3_BUCKET];
BRKGitlabReporter* reporter = [[BRKGitlabReporter alloc] initWithGitlabUsername:GITLAB_USERNAME
password:GITLAB_PASSWORD
repository:GITLAB_REPO
owner:GITLAB_OWNER
imageUploader:uploader];
[BugReportKit initializeWithReporter:reporter delegate:self];
[BugReportKit setUniqueUserIdentifier:@"[email protected]"]; // (optional) It can be anything that uniquely identifies your user in case you want to contact them
return YES;
}
Note: The dependency used by the Email sub-pod has a huge static library (100+ MB). I would not recommend using emails to report bugs unless you don't have any other options.
You need these additional sub-pod for Github.
pod "BugReportKit"
pod "BugReportKit/EmailReporter"
Then, in your AppDelegate
,
#import <BRK.h>
#import <BugreportKit/BRKEmailReporter.h>
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
BRKEmailReporter* reporter = [[BRKEmailReporter alloc] initWithHostname:EMAIL_HOSTNAME
port:EMAIL_HOSTPORT
username:EMAIL_USERNAME
password:EMAIL_PASSWORD
connectionType:BRKEmailConnectionTypeClear
toAddress:EMAIL_TO];
[BugReportKit setUniqueUserIdentifier:@"[email protected]"]; // (optional) It can be anything that uniquely identifies your user in case you want to contact them
return YES;
}
#pragma mark - BugReportKitDelegate
- (void)bugReportSentSuccessfully {
NSLog(@"Bug Report Was Sent Successfully");
}
- (void)bugReportFailedToSend {
NSLog(@"Bug Report Failed");
}
- (void)bugReportCancelled {
NSLog(@"Bug Report Was Cancelled");
}
Let me know if you like the library, or have any suggestions, let me know. I plan to maintain this library regularly. Any pull requests are welcome!
Rahul Jiresal, [email protected], Website, Twitter
Love this project? Did it save you some time? Wanna buy me a beer and say thanks?
BugReportKit is available under the MIT license. See the LICENSE file for more info.