CommunityToolkit / Maui.NativeLibraryInterop

Maui.NativeLibraryInterop is a community-created library of binding samples to help .NET MAUI developers interop with native libraries more easily
MIT License
179 stars 28 forks source link

[Contribution] [iOS] Firebase Crashlytics #8

Closed vhugogarcia closed 6 months ago

vhugogarcia commented 7 months ago

Firebase Crashlytics is a lightweight, realtime crash reporter that helps you track, prioritize, and fix stability issues that erode our app quality.

Progress made: I have been able to create a new XCode project called: MauiFirebaseCrashlytics, then I created the binding and updated the sample application.

I'm facing the following issues:

For the first error, I following these recommendations from our friend @rolfbjarne https://github.com/xamarin/xamarin-macios/issues/19157#issuecomment-1798534439 by adding the <_ExportSymbolsExplicitly>false</_ExportSymbolsExplicitly> without luck.

I committed my changes to a branch on my fork, once I finish the implementation and do some code clean up, I will be happy to create a PR: https://github.com/vhugogarcia/DotNet.Platform.SlimBindings/tree/firebase-crashlytics

@Redth @aritchie do you have any insight about the issues, I'm facing? šŸ˜ƒ

Thanks in advance

aritchie commented 7 months ago

Hi @vhugogarcia - crashlytics has many issues beyond just the binding. .NET stack traces are awful on firebase because it simply wasn't designed for them.

If you choose to continue the binding because it works for you, that's absolutely fine.

There are a few things I see in your native project that don't follow what we're working with. We aren't using the xcframeworks directly. We're using swift package manager which pulls in all the native stuff we need. We also remove anything specific to analytics and linked that in our binding.

vhugogarcia commented 6 months ago

Thanks @aritchie for the feedback! I noticed the XCode project has been merged into a Single project. So, I will update my GitHub fork and start from zero again.

I hope I can get it working soon with slim bindings šŸ˜ŽšŸ‘šŸ».

PavloLukianets commented 3 months ago

@vhugogarcia did u manage to get it working? I did all the slim bindings part in our other separate project with no problems, however after uploading the dSYMS i still see no crashes, nor fatal errors.

.NET stack traces are awful on firebase because it simply wasn't designed for them.

BTW @aritchie what do u recommend as AppCenter crashlytics substitute? All the Azure stuff that Microsoft recommends or something else like Sentry?

aritchie commented 3 months ago

@PavloLukianets use Sentry

vhugogarcia commented 3 months ago

@PavloLukianets a couple of weeks ago I created an article explaining the differences and why it is recommended Sentry. https://dev.to/vhugogarcia/mastering-error-insights-in-net-maui-sentry-vs-firebase-crashlytics-5aj3 I hope you find it useful.

šŸ˜ŽšŸ‘