ioscrashlyticstwitter-fabric

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.


Solution

  • Development builds are also DEBUG builds, You are probably meaning Ad-Hoc builds. Since the release and Ad-Hoc build use the same configuration you will not be able to tell them apart.

    You bets option is to create a new configuration for the AppStore. For this configuration add a Preprocessor Macro, Like FABRIC=1

    Then in you build code:

    #ifdef FABRIC
        [Fabric with:@[CrashlyticsKit]];
    #endif