-
Notifications
You must be signed in to change notification settings - Fork 8
Step 3: Configuring the iOS project (if needed)
Ioannis Kokkinidis edited this page Oct 20, 2016
·
11 revisions
-
Install the official iOS Bugsnag sdk into your app according to their iOS instructions.
I chose the
Cocoapodsway meaning I just created a podfile in my projects iOS dir, addedpod 'Bugsnag'in the podfile, and ranpod install. -
In your
AppDelegate.mfile, add the following code changes:
a. Import our RNBugsnag library within your AppDelegate.m file:
// Add just ONE of the following lines:
#import "RNBugsnag.h" // if installed by using Cocoapods
@implementation AppDelegate
// ... other codeb. Initialize RNBugsnag inside of didFinishLaunchingWithOptions:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// ... other code
[RNBugsnag init]; //initialize it
return YES;
}c. Add your BUSNAG Api Key inside the Info.Plist file like so:
Add a new entry with a key of: `BUGSNAG_API_KEY` and a value of your Bugsnag API KEY (You can find that within [https://app.bugsnag.com/settings/\<WHATEVER_YOUR_PROJECT_NAME>/projects](https://bugsnag.com/settings/)).
Opening the `Info.Plist` with a text editor your addition should look like this:
```
<key>BUGSNAG_API_KEY</key>
<string>whatever_your_api_key_is</string>
```
Of course you only replace the string and not the key. But you already knew that I guess.
Example: Your key should go here.