0

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.

Emon
  • 452
  • 3
  • 11
  • 21
  • 1
    Question is too broad and do search internet for answers before posting. – Vinay P Jul 16 '18 at 10:48
  • if it is reference url then it will also ok for me..because i am confuse about default fabric package of visual studio and manually adding library. – Emon Jul 16 '18 at 11:34

3 Answers3

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.

Ronak Shetiya
  • 960
  • 6
  • 27
1

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).
Axemasta
  • 763
  • 1
  • 9
  • 24
  • Thank you very much for your answer.Just need one more help.After uploading DSYM file to fabric i am facing https://stackoverflow.com/questions/46514830/crashlytics-asks-for-dsyms-with-uuids-that-dont-match-my-app same problem but different is that i am making the dsym file from the archives folder of the application. – Emon Jul 18 '18 at 11:15
  • 1
    @Emon I came across this issue, I ended up finding every dsym on my local machine and uploading them. Fabric worked out which were which and it was sorted. Apparently the iOS dsyms can be uploaded automatically, you need to follow the instructions in here (run a bash script to call the fabric upload symbols program): https://forums.xamarin.com/discussion/84635/could-you-provide-the-details-of-how-to-setup-crashlytics-in-xamarin-android-and-ios I couldn't get it to work, the bash script failed, but maybe it works for you! – Axemasta Jul 18 '18 at 12:01
0

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.

Ben Butzer
  • 915
  • 10
  • 24