'Integrate Crashlytics in visual studio?

I am new at VisualStudio.I am using xamarin for both iOS and Android application.

Now, If i want to integrate Crashlytics in my application then what should i do or how should i do?

Suggestions please.



Solution 1:[1]

There are two easy and widely use option for xamarin Crashlytics:

  1. Hockey App
  2. Firebase

Also if you need within the premises you can write some code.

Solution 2:[2]

You can use Fabric to add Crashlytics to your app.

Drungrin has built a fabulous NuGet package to connect your Xamarin iOS & Android apps to Fabric & Crashlytics (GitHub Link).

Getting it hooked up to your app is a massive hastle because Fabric don't natively support Xamarin however.. (forgive the shameless plug) I have written up a complete guide on implementing it on both platforms, link here. The long and the short of this is:

iOS (you need a mac for this)

  • Create a new native ios app (through xcode) with the same bundle id as your xamarin app & install it using the fabric mac app.
  • Forget about the xcode project (you only need to register the bundle id), add api key from sample to xamarin info.plist
  • add fabric & crashlytics nugets (follow github docs)
  • build your xamarin app for release & then archive for publishing. Open the fabric mac app and you will have your build in archives. Dysms can be automated to upload but for now you can upload them manually

Android

  • Create a new native Android app (using android studio), Make sure build & version numbers are the same as your xamarin app. Let the fabric plugin build & connect the sample to fabric. (once again the app need the same name)

    • Copy the fabric api key from sample to xam app manifest (edit the xml).
    • Give the android app internet permissions (if yours somehow doesnt)
    • Copy the crashlytics.build.properties file (found $ProjectFolder -> app -> build -> intermediates -> assets -> debug) into your xamarin app's resources, set build action to AndroidAsset.
    • Copy the crashlytics build number into string.xml: <string name="com.crashlytics.android.build_id">APP_BUILD_NUMBER</string>
    • add fabric & crashlytics nugets (follow github docs).
    • Archive app & publish apk
    • Drag apk into fabric plugin (android studio).

Solution 3:[3]

As of 2022 and Visual Studio 2019 for MacOS, there is now a NuGet package that handles the Firebase Crashlytics API. If you add the Xamarin.Firebase.IOS.Crashlytics package, and your GoogleService-Info.plist into the project, you can then add the updated Initialization code.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 Axemasta
Solution 3 Ben Butzer