iOS
Setup
Starting point is this guide - React Native Section (not expo).
In contrary to Android there is nothing more to do than to follow these instructions.
Microsoft App Center
npm install appcenter appcenter-analytics appcenter-crashes --save-exact
Run pod install
from iOS directory to install CocoaPods dependencies.
Open Xcode
and create a new file with the name AppCenter-Config.plist
with the following content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AppSecret</key>
<string>THE-ID-FROM-APP-CENTER</string>
</dict>
</plist>
Modify the app's AppDelegate.m
file to include code for starting SDK:
Add these lines to import section above the #if DEBUG
:
#import <AppCenterReactNative.h>
#import <AppCenterReactNativeAnalytics.h>
#import <AppCenterReactNativeCrashes.h>
Add these lines to the didFinishLaunchingWithOptions
method:
[AppCenterReactNative register];
[AppCenterReactNativeAnalytics registerWithInitiallyEnabled:true];
[AppCenterReactNativeCrashes registerWithAutomaticProcessing];
Resolve Symbols
Once you generate a crash you will see that some symbols could not be resolved (see Unsymbolicated
tab).
To resolve these copy the UUID you see to your clipboard and execute this command in a terminal in your project:
mdfind "com_apple_xcode_dsym_uuids == ID-IN-YOUR-CLIPBOARD"
, e.g. mdfind "com_apple_xcode_dsym_uuids == A1FCE8A4-E9F4-3A7A-B0FB-01A6B22E7443"
.
This command will point you to the location of the file with this UUID.
E.g. /Users/alexej/Library/Developer/Xcode/DerivedData/InflationCalc-czbuidxmdqkftrcihjfzbahlddxp/Build/Products/Debug-iphonesimulator/InflationCalc.app.dSYM
.
Now you have to compress and upload that file (InflationCalc.app.dSYM
) to App Center.
Afterwards you will see that the crash got resolved correctly.