A drop-in component for reporting bugs using Trello
Objective-C Ruby
Latest commit 0faf64d Aug 25, 2013 @rauluranga improve documentation.
Permalink
Failed to load latest commit information.
Source reborn. Aug 23, 2013
Trak.xcodeproj
Trak reborn. Aug 23, 2013
TrakTests reborn. Aug 23, 2013
.gitattributes
.gitignore reborn. Aug 23, 2013
Podfile reborn. Aug 23, 2013
Podfile.lock
README.markdown improve documentation. Aug 25, 2013

README.markdown

Trak

A drop-in component for reporting bugs using Trello API.

Features

  • Captures a screenshot of the current state of your app. (this will be included as an attachment in to your Trello card)
  • Hand drawing over the screenshot.
  • Apply multiples labels (based on Trello labels colors)
  • Add description.

Trak Trak Trak Trak

** for now only supports iPhone in portrait mode.*

Watch it in action! https://vimeo.com/72994059

Installation

With CocoaPods

coming soon.

Manual installation

I´m in the middle of the process for creating the podspec file, meanwhile you need to drag & drop the ./Source folder into your project, then create a podfile adding the following dependencies:

pod 'Mantle', '~> 1.2'
pod 'MLScreenshot', '~> 1.0.3'
pod 'RUCanvasView', :git => 'https://github.com/rauluranga/RUCanvasView'
pod 'MBProgressHUD', :git => 'https://github.com/rauluranga/MBProgressHUD.git', :commit => '95baad6af9712c1cd77e97f9d5c174072082227f'
pod 'AFOAuth1Client', :git => 'https://github.com/rauluranga/AFOAuth1Client.git', :commit => '7e4e3fcb451bf4719aad947bc2883b00c30d682a'
pod 'RNBlurModalView', :git => 'https://github.com/rauluranga/RNBlurModalView.git', :commit => '535c68289f0917bbbbefa16e87e08de171b15618'

finally run pod install.

Implementation

Trak depends on AFOAuth1Client so you need to register your application to launch from a custom URL scheme, and use that with the path /success as your callback URL. The callback for the custom URL scheme should send a notification, which will complete the OAuth transaction.

once you have that, copy the following code:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    .
    .
    .    
    NSDictionary *defaults = @{kTrelloConsumerKey:@"YOUR_CONSUMER_KEY",
                                kTrelloConsumerSecret:@"YOUR_CONSUMER_SECRET",
                                kTrelloDefaultBordName:@"My Project Board",
                                kTellokDefaultListName:@"Bugs",
                                kOAuthCallBackURL:@"trak://success",
                                kDefaultServiceName:@"My Custom App Service Name" };

    [[Trak sharedInstance] setupWithDictionary:defaults];

    return YES;
}

You can get your CONSUMER_KEY & CONSUMER_SECRET from Trello API

to respond to the custom URL scheme on iOS copy the following code:

- (BOOL)application:(UIApplication *)application
            openURL:(NSURL *)url
  sourceApplication:(NSString *)sourceApplication
         annotation:(id)annotation
{

    [[Trak sharedInstance] applicationLaunchOptionsWithURL:url];

    return YES;
}

Presenting Trak via Gesture

You can present the Trak prompt via a three-finger-SwipeDown with the following code:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    .
    .
    .  
    [[Trak sharedInstance] installGestureOnWindow:self.window];
    return YES;
}

DIY Presentation

You can call -presentIssueViewControllerOnViewController to show Trak prompt after a specific event.

- (IBAction)show:(UIButton *)sender {
    [[Trak sharedInstance] presentTrakViewControllerOnViewController:self];
}