<commit_before>Bugsnag Notifier for Cocoa
==========================

The Bugsnag Notifier for Cocoa gives you instant notification of exceptions thrown from your Cocoa applications.
The notifier hooks into `NSSetUncaughtExceptionHandler`, which means any uncaught exceptions will trigger a notification to be sent to your Bugsnag project. Bugsnag will also monitor for fatal signals sent to your application, for example a Segmentation Fault.

[Bugsnag](http://bugsnag.com) captures errors in real-time from your web, mobile and desktop applications, helping you to understand and resolve them as fast as possible. [Create a free account](http://bugsnag.com) to start capturing exceptions from your applications.


Installation & Setup
--------------------

###CocoaPods (Recommended)

[Cocoapods](http://cocoapods.org/) is a library management system for iOS/OSX which allows you to manage your libraries, detail your dependencies and handle updates nicely. It is the recommended way of installing the Bugsnag Cocoa library.

-   Add Bugsnag to your Podfile

    ```ruby
    pod 'Bugsnag', :git => "<EMAIL>:bugsnag/bugsnag-cocoa.git"
    ```

-   Install Bugsnag

    ```bash
    pod install
    ```

-   Import the `Bugsnag.h` file into your application delegate.

    ```objective-c
    #import "Bugsnag.h"
    ```

-   In your application:didFinishLaunchingWithOptions: method, register with bugsnag by calling,

    ```objective-c
    [Bugsnag startBugsnagWithApiKey:@"your-api-key-goes-here"];
    ```

###Without Cocoapods

-   Add Bugsnag to your project

-   Import the `Bugsnag.h` file into your application delegate.

    ```objective-c
    #import "Bugsnag.h"
    ```

-   In your application:didFinishLaunchingWithOptions: method, register with bugsnag by calling,

    ```objective-c
    [Bugsnag startBugsnagWithApiKey:@"your-api-key-goes-here"];
    ```

-   Add the SystemConfiguration Framework

    Click your project, click on your main target, then navigate to "Build Phases", select "Link Binary with Libraries" and click on the "+" button. Then add SystemConfiguration.framework.

-   Add a build phase to upload the symbolication information to Bugsnag

    From the same "Build Phases" screen, click the plus in the bottom right of the screen labelled "Add Build Phase", then select "Add Run Script". Then expand the newly added "Run Script" section, and set the shell to `/usr/bin/env ruby` and copy the following script into the text box,

    ```ruby
    if ENV["DEBUG_INFORMATION_FORMAT"] != "dwarf-with-dsym"
      exit
    end

    fork do
      Process.setsid
      STDIN.reopen("/dev/null")
      STDOUT.reopen("/dev/null", "a")
      STDERR.reopen("/dev/null", "a")

      require 'shellwords'

      Dir["#{ENV["DWARF_DSYM_FOLDER_PATH"]}/#{ENV["DWARF_DSYM_FILE_NAME"]}/Contents/Resources/DWARF/*"].each do |dsym|<commit_msg>Documentation formatting and small copy changes<commit_after>Bugsnag Notifier for Cocoa
==========================

The Bugsnag Notifier for Cocoa gives you instant notification of exceptions thrown from your *iOS* or *OSX* applications.
The notifier hooks into `NSSetUncaughtExceptionHandler`, which means any uncaught exceptions will trigger a notification to be sent to your Bugsnag dashboard. Bugsnag will also monitor for fatal signals sent to your application, for example, Segmentation Faults.

[Bugsnag](https://bugsnag.com) captures errors in real-time from your web, mobile and desktop applications, helping you to understand and resolve them as fast as possible. [Create a free account](https://bugsnag.com) to start capturing exceptions from your applications.


Installation & Setup
--------------------

###Using CocoaPods (Recommended)

[Cocoapods](http://cocoapods.org/) is a library management system for iOS/OSX which allows you to manage your libraries, detail your dependencies and handle updates nicely. It is the recommended way of installing the Bugsnag Cocoa library.

-   Add Bugsnag to your `Podfile`

    ```ruby
    pod 'Bugsnag', :git => "<EMAIL>:bugsnag/bugsnag-cocoa.git"
    ```

-   Install Bugsnag

    ```bash
    pod install
    ```

-   Import the `Bugsnag.h` file into your application delegate.

    ```objective-c
    #import "Bugsnag.h"
    ```

-   In your `application:didFinishLaunchingWithOptions:` method, initialize Bugsnag by calling,

    ```objective-c
    [Bugsnag startBugsnagWithApiKey:@"your-api-key-goes-here"];
    ```

###Without Cocoapods

-   Add Bugsnag to your project

-   Import the `Bugsnag.h` file into your application delegate.

    ```objective-c
    #import "Bugsnag.h"
    ```

-   In your `application:didFinishLaunchingWithOptions:` method, register with bugsnag by calling,

    ```objective-c
    [Bugsnag startBugsnagWithApiKey:@"your-api-key-goes-here"];
    ```

-   Add the SystemConfiguration Framework

    Click your project, click on your main target, then navigate to "Build Phases", select "Link Binary with Libraries" and click on the "+" button. Then add SystemConfiguration.framework.

-   Add a build phase to upload the symbolication information to Bugsnag

    From the same "Build Phases" screen, click the plus in the bottom right of the screen labelled "Add Build Phase", then select "Add Run Script". Then expand the newly added "Run Script" section, and set the shell to `/usr/bin/env ruby` and copy the following script into the text box,

    ```ruby
    if ENV["DEBUG_INFORMATION_FORMAT"] != "dwarf-with-dsym"
      exit
    end

    fork do
      Process.setsid
      STDIN.reopen("/dev/null")
      STDOUT.reopen("/dev/null", "a")
      STDERR.reopen("/dev/null", "a")

      require 'shellwords'

      Dir["#{ENV["DWARF_DSYM_FOLDER_PATH"]}/#{ENV["DWARF_DSYM_FILE_NAME"]}/Contents/Resources/DWARF/*"].each do |dsym|
{'fraction_non_alphanumeric': 0.108898891966759, 'fraction_numerical': 0.0, 'mean_word_length': 3.7625721352019785, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2666021', 'n_tokens_mistral': 1756, 'n_tokens_neox': 1639, 'n_words': 615}