Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable Crashlytics for iOS during development?

Is there any way to disable crash reporting for Ad-Hoc builds? I only want crash reporting for release builds.

I know I can use following code but it only work debug builds.

#if DEBUG == 0
    [Fabric with:@[CrashlyticsKit]];
#endif

Im using Fabric 1.1.3

Edit: I don't want to disable Fabric at all, I just need automatic configurations for Ad-Hoc and Release builds.

like image 364
Zee Avatar asked Apr 17 '15 07:04

Zee


2 Answers

To disable firebase crashlytics for debug mode in swift:

    #if DEBUG
        Crashlytics.crashlytics().setCrashlyticsCollectionEnabled(false)
    #endif
like image 156
Umair Ali Avatar answered Sep 19 '22 12:09

Umair Ali


If you use Swift, this woud work:

#if !DEBUG
    Fabric.with([Crashlytics.self])
#endif
like image 38
Andrey Gordeev Avatar answered Sep 19 '22 12:09

Andrey Gordeev