0

I'm creating a binding library for MLKitBarcodeScanning from it's cocoapod, to be used in Xamarin.ios project. After executing the sharpie bind command it creates the pod folder with 13 pods. But only the MLKitBarcodeScanning, MLKitVision, MLKitCommon, MLImage folders has a framework that I can add as a native reference in my binding library. GoogleDataTransport and other folders does not have any .framework file. So I'm getting errors like: Native linking failed, undefined Objective-C class: GDTCORTransport. The symbol '_OBJC_CLASS_$_GDTCORTransport' could not be found in any of the libraries or frameworks linked with your application. when building the project.

I have tried re initialising the podfile and also I have already created the ApiDefinitions and Structs from the header files. Also I have added LinkerFlags -libc++ -undefined -ObjC -lc++ And has set IsCxx true

Edit: From those folders which are not frameworks or libraries (Including GoogleDataTransport), I created a static library following this Create Static Library And linked it as a Native reference in my binding project. Still the errors are the same

WarKirin
  • 41
  • 7

2 Answers2

0

CocoaPods packages can distribute as source distributions or binary distributions. The MLKitBarcodeScanning dependencies without .frameworks are source distributions and get built directly with the app.

Paul Beusterien
  • 27,542
  • 6
  • 83
  • 139
0

So I'm getting errors like: Native linking failed, undefined Objective-C class: GDTCORTransport. The symbol 'OBJC_CLASS$_GDTCORTransport' could not be found in any of the libraries or frameworks linked with your application.

A third-party binding bound an Objective-C protocol, but did not annotate it with the [Protocol] attribute in its api definition. You need to add the missing [Protocol] attribute.

Zack
  • 1,255
  • 1
  • 2
  • 5
  • Have already done that. These errors are class names of those dependencies that are neither frameworks (.framework) nor libraries(.a). So Finally I created a fat library (.a) from those and linked it as a Native reference, still no luck. – WarKirin Feb 10 '23 at 06:42
  • You can check that the Podfile correctly declares the required dependencies. Try reinstalling your Cocoapods dependencies. – Zack Feb 13 '23 at 06:32