Skip to content

Instantly share code, notes, and snippets.

@dharavp
Last active July 30, 2018 13:26
Show Gist options
  • Save dharavp/efae578e48e54c1b1bc76cd8cfe18ac9 to your computer and use it in GitHub Desktop.
Save dharavp/efae578e48e54c1b1bc76cd8cfe18ac9 to your computer and use it in GitHub Desktop.
Fabric and Crashlytics setup for iOS
Fabric and Crashlytic setup for iOS:
1) Login on https://www.fabric.io/
2) Install Fabric on Mac
3) Install two framework 1) Fabric.framework 2) Crashlytics.framework
4) Put this two framework in your project folder (below AppDelegate.m file)
5) In Fabric app, Login to your account, choose your app in it. After that follow the steps given in it.
Add a run script and build a phase
Also refer a below link: http://www.runscriptbuildphase.com/?utm_source=desktopapp&utm_medium=setup&utm_campaign=mac
For that follow below steps :
1) Select your main project folder in xCode.
2) select build phase in it.
3) click on add icon and select New run script phase and copy paste this fabric key.
6) Add this code in AppDelegate.m file
#import <Fabric/Fabric.h>
#import <Crashlytics/Crashlytics.h>
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[Fabric with:@[[Crashlytics class]]]; //this one line is added to your didFinishLaunchingWithOptions method
After executing all this given steps build and run your app (run your app in release mode).After running successful, Go to the messages tab. Click on Build and search for generate in which you will get something like that.
( /Users/creolemacmini02/Library/Developer/Xcode/DerivedData/ModTod-geqsycqrslagpfhckdgdmmjezuqr/Build/Products/Release-iphonesimulator/ModTod.app.dSYM)
After that in Finder tap commande(window)+shif+G and paste this path and you will be able to get DYSM file and upload it on fabric.io
For Testing crash report follow below steps(For simulator):
1. Launch simulator
2. Press stop
3. Launch your app and force a crash
4. Relaunch the app from simulator
5. See the crash report in the web dashboard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment