简体   繁体   中英

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:

  • Delete bin/obj folders, clean and recompile the project
  • Re-install the nuget
  • Update xCode to the latest version
  • Change linking behaviors in the iOS project.
  • Added "--registrar:static" inside the Additional mtouch arguments inside de iOS Build configuration.

None of them worked.

Is there any solution out there?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM