Fabric.io implementation (AppDelegate)

I am trying to inject Fabric into my application. The problem is that the application does not work correctly, and I do not know what code to place in my AppDelegate. I cannot find any information on the Internet about what I should implement there. Can someone give me a hint what functions should I implement in my AppDelegate?

Fabric screenshot

+8
ios objective-c iphone
source share
3 answers

Assuming you used the build script to configure Fabric, it will place the corresponding consumerKey and consumerSecret in your info.plist project.

You can initialize Fabric using this method:

Swift

 Fabric.with(Twitter(), Crashlytics()) // Add whichever Kits you are using 

ObjectiveC

 [Fabric with:@[[Twitter sharedInstance]]] // Add whichever Kits you are using 

Double check that your plist contains an entry for Fabric and adds this line of code to your application:didFinishingLaunchWithOptions: method.

https://dev.twitter.com/twitter-kit/ios/configure

+5
source share

Do you want to use Crashlytics with Objective-C?

In AppDelegate.m:

At the top of the source file

 #import "Fabric/Fabric.h" #import "Crashlytics/Crashlytics.h" 

and in application:didFinishLaunchingWithOptions:

 [Fabric with:@[CrashlyticsKit]]; 
+2
source share

For quick code, the missing code is:

 import Fabric import Crashlytics func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool { Fabric.with([Crashlytics()]) //... your initialization code return true } 
+1
source share

All Articles