Xamarin iOS - Firebase Analytics is not available

半城伤御伤魂 提交于 2019-12-06 03:53:55

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!