forked from airbrake/airbrake-ios
/
INSTALLATION.html
26 lines (22 loc) · 1.3 KB
/
INSTALLATION.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<div id="ios">
<h3>Setting up your iOS project</h3>
<ol>
<li>Download the notifier from <a href="Github">https://github.com/guicocoa/hoptoad-ios</a>.</li>
<li>Drag the Airbrake folder to your project and make sure "Copy Items" and "Create Groups" are selected</li>
<li>Add <code>SystemConfiguration.framework</code> and <code>libxml2.dylib</code> to your project</li>
<li>Add the path `/usr/include/libxml2` to Header Search Paths in your project's build settings under "All Configurations"</li>
</ol>
<h3>Running the notifier</h3>
<p>Import the notifier header file</p>
<pre>#import "ABNotifier.h"</pre>
<p>Call the main notifier method at the very beginning of your <code>application:didFinishLaunchingWithOptions:</code></p>
<pre>
[ABNotifier startNotifierWithAPIKey:@"key"
environmentName:ABNotifierAutomaticEnvironment
useSSL:YES
delegate:self];
</pre>
<h3>Debugging</h3>
<p>To test that the notifier is working inside your application, a simple test method is provided. This method raises an exception, catches it, and reports it as if a real crash happened. Add this code to your `application:didFinishLaunchingWithOptions:` to test the notifier:</p>
<pre>[ABNotifier writeTestNotice];</pre>
</div>