Skip to content

Painlessly create GitHub issues in your iOS projects

License

Notifications You must be signed in to change notification settings

flippinjoe/IssueKit

 
 

Repository files navigation

Imgur IssueKit

A drop-in component for creating GitHub issues for your app. You should only include this code in debug builds, as it can contain sensitive information like API keys.

Screenshot

Setup

Get an API access token from your GitHub settings:

Access token image

If you want image uploads, create an 'anonymous' Imgur application and note its client ID.

Client ID image

Finally, IssueKit requires CocoaPods. Add it to your Podfile:

pod 'IssueKit'

Run pod install and you're off!

Usage

Setup ISKIssueManager in application:didFinishLaunchingWithOptions:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    // Reponame must be in '<username>/<reponame>' format.
    [[ISKIssueManager defaultManager] setupWithReponame:@"usepropeller/IssueKit" andAccessToken:@"YOUR_GITHUB_ACCESS_TOKEN"];

    // If you have an Imgur client ID
    [[ISKIssueManager defaultManager] setupImageUploadsWithClientID:@"YOUR_IMGUR_CLIENT_ID"];

    return YES;
}

With these settings, IssueKit will create an issue with an 'IssueKit' label on the repo you specified.

Presenting via Gesture

You can present the IssueKit prompt via a three-finger-double-tap anywhere on the window at anytime in your app. This may not work for perfectly for all apps, as some views and configurations swallow gestures or will have performance impacts.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    // after installation
    [[ISKIssueManager defaultManager] installGestureOnWindow: self.window];
    
    // ...
}

DIY Presentation

You can call -presentIssueViewControllerOnViewController when you want to show the IssueKit prompt after a specific event.

- (IBAction)showIssueViewController:(id)sender {
    [[ISKIssueManager defaultManager] presentIssueViewControllerOnViewController:self];
}

Contact

Mert Dümenci @mertdumenci

About

Painlessly create GitHub issues in your iOS projects

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 97.5%
  • Ruby 2.5%