3

I have download the example project and library from this link: Xamarin Firebase but after 2 days of configuration i get this error when i launch the app:

[Firebase/Core][I-COR000022] Firebase Analytics is not available.

I did not find documentation related to this error for Xamarin iOS Firebase Analytics and can not find a solution.

I have reference the same library of the example project, checked the GoogleService-Info.plist and insert it in the project as documentation, called the App.Configure ();.

Nothing to do, does anyone have any idea?

1 Answers1

7

Resolved!

Firebase Analytics requires 3 references to work:

  1. .Core
  2. .Analytics
  3. .IstanceID

Following only the code in the documentation the project at start-up load only .Core skipping the other two, this causes the error.

To work around this problem, I added in AppDelegate:

using Firebase.Analytics;
using Firebase.InstanceID;

and before of App.Configure (); i have add this two line to force the app to load the two assemblies:

Firebase.Analytics.Loader loader1 = new Firebase.Analytics.Loader();
Firebase.InstanceID.Loader loader2 = new Firebase.InstanceID.Loader();

Of course, if you implement other instructions later using these two assemblies, you will not need these two instructions.

  • 1
    Man, you made my day! Thanks a lot! :) Seems quite strange to me that those two assemblies are not loaded automatically during the app' startup. Maybe you need to report your findings Xamarin.Firebase team? – Stanislav Iegorov Dec 20 '17 at 20:15