xamarinxamarin.iosfirebase-mlkit

How to fix "Native linking failed..." errors when installing Xamarin.Firebase.iOS.MLKit in Xamarin.Ios


I have created a new Xamarin Forms (v3.6) project and installed the Xamarin.Firebase.iOS.MLKit nuget.

After compiling the project, I get lots of errors like this:

Native linking failed, undefined Objective-C class: GTLRVision_DetectedBreak. The symbol '_OBJC_CLASS_$_GTLRVision_DetectedBreak' could not be found in any of the libraries or frameworks linked with your application

Native linking failed, undefined Objective-C class: GTMLogMininumLevelFilter. The symbol '_OBJC_CLASS_$_GTMLogMininumLevelFilter' could not be found in any of the libraries or frameworks linked with your application

Native linking failed, undefined Objective-C class: FIRApp. The symbol '_OBJC_CLASS_$_FIRApp' could not be found in any of the libraries or frameworks linked with your application

Native linking failed, undefined symbol: _OBJC_METACLASS_$_GPBRootObject. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in

Native linking failed. Please review the build log and the user flags provided to gcc: -ObjC -lc++ -lsqlite3 -lz -ObjC -ObjC -ObjC -ObjC -ObjC -ObjC -ObjC -lc++ -ObjC -lc++ -ObjC -lc++ -ObjC -lc++

Until now, I tried the following:

None of them worked.

Is there any solution out there?


Solution

  • Make sure you have initialized Firebase after you installed Xamarin.Firebase.iOS.MLKit in Xamarin.iOS.

    Here is the code of initialization:

    Firebase.Core.App.Configure ();
    

    Refer: GoogleApisForiOSComponents