Issue
I have trouble getting Crashlytics to work on iOS in my Xamarin Forms app. This is not duplicity of existing questions. Here is what I've tried:
- Following all existing SO tickets. These are obsolete because they mention the use of old Firebase implementations or the interim version that still used Fabric libraries. None of this works anymore, the current Firebase SDK only uses itself, there's not Fabric anymore.
- Following official guide from Google.
- I did add
Xamarin.Firebase.iOS.Crashlyticsv4.6.2 to my iOS project. - I do call
Firebase.Core.App.Configure();in myAppDelegateclass. Also, Firebase Analytics works. - I have downloaded the up-to-date GoogleServices.plist file.
- I did click the "Enable" button on the Crashlytics page in the Firebase console.
- I did implement a crash on my home screen as per their instructions.
- During build, I do use Release configuration. This is my TeamCity command:
<redacted>.sln "/t:iOS\<redacted>_iOS:rebuild" /p:Configuration="Release" ... - dsym is uploaded during build (TeamCity dump):
Successfully submitted symbols for architecture arm64 with UUID f9d1c2a3followed bySuccessfully uploaded Crashlytics symbols - I run the app, it crashes successfully.
- I run the app again, it also crashes successfully.
- No Crashlytics appear, ever.
I have also tried crashing the app on button press - in case there's not enought time to send pending Crashlytics reports between crashes. Leaving the app running before crashing it manually makes no difference, still no crashlytics in the Firebase console.
I am deploying the app from TeamCity to AppCenter, where I download it from my iPhone. This means I run the release build without debug, straight from the phone.
What am I missing?
Solution
For anyone also wondering, the issue with iOS build was caused by missing method call. It isn't written anywhere and dotnet repo has incomplete sample code. The usually mentioned configuration call is this:
Firebase.Core.App.Configure();
But that alone doesn't send the crashlytics, it just turns on their collection. Upon launch, following is necessary:
Firebase.Crashlytics.Crashlytics.SharedInstance.SendUnsentReports();
Now crashlytics show up as expected for iOS builds.
Answered By - masiton
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.