CMCrashReporter: Technical information

The cocoa-part


Installing the CM-Framework is very simpel!
There are a few steps. You can do it in exactly 3 minutes.
  1. First download the framework
  2. Drag/drop the framework in the 'Frameworks/Other Frameworks' folders.
    Check the copy-option and add the framework. screenshot
  3. Select the application target (in the left side of Xcode) and select from the menu 'Project' -> 'New Build Phase' -> 'New Copy Files Build Phase' screenshot
  4. Set as destination 'Framework' and close the window screenshot
  5. Now drag the framework from the 'Other Frameworks'-folder to the new 'Copy Files' in the Targets -> 'Your Application' screenshot
  6. As check: CMCrashReport should be listed in your new 'Copy Filed' and in the 'Link Binary With Librarys'. screenshot
  7. Go to your class that is a delegation of NSApplication
    • If you don't have this class, you can create a class (recommand) or use another class.
    • Just create a subklasse of NSObject (default) and initiated in the mainMenu.nib
    • Control-click on the Files Owner and drag a line to your AppController (in the Interface Builder) screenshot
    • And just choose 'delegate' screenshot
  8. Next step is to include the framework. Add the follow code at the top in the .h file

    import <CMCrashReporter/CMCrashReporter.h>

  9. Now, just go to the .m and place in a method (by default the applicationDidFinishLaunching).

    -(void)applicationDidFinishLaunching:(NSNotification *)note { [CMCrashReporter check]; }

  10. As last, open your info.plist (localized at Resources-folder in the left side of Xcode) and add a key

    <key>CMSubmitURL</key>
    <string>http://myserver.tld/crashreporter.tld</string>


    But of course with your own server-address.

    <key>CMMaxReports</key>
    <int>5</int>


    This key is optional and is the maxium number of reports that may send to you from this user. (This is use-full if you integrate CMCrashReporter in an existing application, as protection to a flood of crashreports.) If this key is missing, CMCrashReporter will send all the reports.


    Click here for more information about the part on the server

  11. And that's all!

    There is also a video (screencast) available of the installation of the framework on a new Cocoa-project.
    Click here to watch it (Thanks to Blip.tv to host this movie).

    The framework is build for Mac os 10.4 and 10.5 Universal with the 10.4U SDK and is tested on Tiger and Leopard (PPC and Intel).