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?
Resolved!
Firebase Analytics requires 3 references to work:
- .Core
- .Analytics
- .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.
来源:https://stackoverflow.com/questions/46541722/xamarin-ios-firebase-analytics-is-not-available