---
title: "Firebase Crashlytics, builds and you"
description: "Firebase Crashlytics, builds and you"
published: "2019-03-29"
last_updated: "2019-03-29"
authors:
  - "Shobhit Chugh (Product Manager)"
categories:
  - "Crashlytics"
  - "Android"
  - "iOS"
canonical_url: "https://firebase.blog/posts/2019/03/crashlytics-versions"
---

# Firebase Crashlytics, builds and you

*Published March 29, 2019 by Shobhit Chugh (Product Manager)*

---
In Firebase Crashlytics, you can view crashes and non-fatals by versions. Several of our customers take advantage of this filtering, especially to focus on their latest releases.

![uzs99reod92](https://firebasestorage.googleapis.com/v0/b/first-class-blog.appspot.com/o/blog-assets%2F2019%2F03%2Fcrashlytics-versions%2Foptimized%2Fuzs99reod92.jpg?alt=media)

![fk762jgljeu](https://firebasestorage.googleapis.com/v0/b/first-class-blog.appspot.com/o/blog-assets%2F2019%2F03%2Fcrashlytics-versions%2Foptimized%2Ffk762jgljeu.jpg?alt=media)

But sometimes too many versions can be a bad thing. Firebase Crashlytics - by default - shows you the last 100 versions we have seen. If you have a lot of debug versions created by developers, and by continuous Integration and deployment pipeline, you might soon start to not see the versions that really matter e.g., production builds.

So how do you make sure that this does not happen? Disabling Crash reporting initialization for debug builds is the simplest way of achieving this. Let's explore how to do this on iOS and Android.

### iOS 
For iOS apps, first check if you are manually initializing Crashlytics (this happens for Fabric apps that were linked to a Firebase app).

_If you use Swift_, search for the line `Fabric.with([Crashlytics.self])` in AppDelegate.swift. If this line is present, then you are manually initializing Crashlytics, otherwise you are using automatic initialization.

_If you use ObjectiveC_, search for the line `[Fabric with:@[[Crashlytics class]]];` in AppDelegate.m. If this line is present, then you are manually initializing Crashlytics, otherwise you are using automatic initialization.

### Apps with Manual initialization
For apps that are using manual initialization, you can just not initialize Crashlytics for DEBUG versions.

_For Swift_

```swift
#if !DEBUG 
Fabric.with([Crashlytics.self]) 
#endif
```

_For ObjectiveC_

```js
#if !DEBUG 
[Fabric with:@[[Crashlytics class]]]; 
#endif
```

### Apps that are auto initialized
Firebase Crashlytics apps are automatically initialized by Firebase. You can turn off automatic collection with a new key to your `Info.plist` file:

*   Key: `firebase_crashlytics_collection_enabled`
*   Value: `no`

Then you can initialize it as shown in the examples above for Swift and ObjectiveC

### Android 
For Android apps, first check if you are manually initializing Crashlytics (this happens for Fabric apps that were linked to a Firebase app). Search for `Fabric.with` in your project. If this line is present, then you are manually initializing Crashlytics. Otherwise, Crashlytics is being automatically initialized through Firebase.

### Apps with Manual initialization
To disable Crashlytics in debug builds, you can make use of the `BuildConfig.DEBUG` flag. Edit the Fabric.with statement you found previously, adding a check for the DEBUG flag:.

```java
if (!BuildConfig.DEBUG) { 
  Fabric.with(this, new Crashlytics()); 
}
```

### Apps that are auto initialized
Turn off Crashlytics initialization in your debug builds by creating a `debug` folder in your `src` directory and creating an AndroidManifest.xml with this snippet:

```xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
  
  <application>
  
    <meta-data
  
        android:name="firebase_crashlytics_collection_enabled"
  
        android:value="no" />
  
  </application>
  
</manifest>
```

This snippet will be merged into the manifest of all of your debug variants, and will disable Crashlytics in those builds. If you'd prefer finer-grained control, you can use this approach for [any variants](https://developer.android.com/studio/build/build-variants#sourcesets) you'd like to exclude.
