iOS Library Documentation

Installation is easy as pie (and twice as delicious):

1

Download the Super Duper Library

2

Unzip it and drag the "CrittercismSDK" subfolder into your XCode project

3

Add QuartzCore and SystemConfiguration

For iOS 3.x support, weak-link the UIKit framework.

Initialize Crittercism:

  1. Add #import "Crittercism.h" in the top of your appDelegate header file
  2. Add this line of code in your AppDelegate's didFinishLaunchingWithOptions method (make sure you replace "<YOUR_UIVIEWCONTROLLER>" with the view controller that will present the feedback forum). If your view controller is not available in the app delegate, you can pass nil as the mainViewController.
    [Crittercism initWithAppID: @"4ce2d43766d78766a1000013"
        andKey:@"4ce2d43766d78766a1000013pyat0f4l"
        andSecret:@"irv8zk5b4xvrbzuo3pghlck9mh2fdewa"
        andMainViewController:<YOUR_UIVIEWCONTROLLER>];
    If you are not using the support forum, use this code:
    [Crittercism initWithAppID: @"4ce2d43766d78766a1000013"
        andKey:@"4ce2d43766d78766a1000013pyat0f4l"
        andSecret:@"irv8zk5b4xvrbzuo3pghlck9mh2fdewa"];

    Copy and paste the code above for your "Demo App" app. Otherwise, you can find the appID, oAuth key, and oAuth secret in your app settings.

    Notes:
    > If you're not using the support forum, you can pass 'nil' as the mainViewController.
    > If you initialize your view controller elsewhere, you can pass 'nil' here, and then use [Crittercism showCrittercism:myViewController]; later on.

You now have crash reporting integrated!

Display the Support Forum:

The support forum allows users to submit feedback, bug reports, and ask questions.

The easiest way to display the support forum is to present the forum as a modal dialog upon the press of a button. Go to the view controller that will display the support forum, add #import "Crittercism.h" in the top of your header file, and implement a method that will display the forum:

-(IBAction) crittercismPressed:(id) sender {
    [Crittercism showCrittercism];
}

If you want to popup the forum with a different view controller, you can pass in an argument to the "showCrittercism" method like so:

-(IBAction) crittercismPressed:(id) sender {
    [Crittercism showCrittercism:myViewController];
}

To Test Crash Reporting:

If you throw an unhandled exception, it will be automatically sent to the web portal along with some awesome diagnostics.

Try it out! Create a button that throws an exception:

-(IBAction) crashPressed:(id) sender {
    [NSException raise:NSInvalidArgumentException
                format:@"Foo must not be nil"];
}
After the app crashes, go to your crash summary page to view your crashes! Alternatively, you could view your crashes and app loads occur in real time in the overview page.

Note:
If you're using v3.0 or above of the library, app crashes are sent on the NEXT app load. You will ALSO need to disconnect the Xcode GDB debugger in the simulator (as that will capture the app crash). Make sure you watch this video first!

Congratulations! You just added crash reporting and customer support to your iphone app!

Wanna add metadata to your users?

Well you're in luck! Check out our optional methods for more informational goodness!

Confused?

We know nothing is ever perfect (well, maybe except Andrew's 6 pack), so feel free to send us email if anything is confusing, if you have a feature that would make your day, or if you just wanna say hi!