1

I made a binding from a objective-c framework, it is working correctly but when I try to link my Xamarin.iOS project (Link Framework SDKs Only), I get this error

MTOUCH: Error MT5211: Native linking failed, undefined Objective-C class: GLKView. The symbol '_OBJC_CLASS_$_GLKView' could not be found in any of the libraries or frameworks linked with your application. (MT5211)

In the microsoft documentation, says to add the [Protocol] attribute to the binding project.

I tried to add the attribute in the ApiDefinition.cs, first on top of the class and then before all methods and interfaces the classe have, with no success.

Link for the github repo

What am I doing wrong ?

João Palma
  • 66
  • 11

1 Answers1

1

I have try the same steps as you did , and downloaded the project you provided.It works on my VS for Mac.So ,I suggest you can creat a new blank bind libaray and copy the code into it then build it again.

I have uploaded my project to my gitHub.you can download it and have a try. Demo

Lucas Zhang
  • 18,630
  • 3
  • 12
  • 22
  • I can give it a try. 2 questions, did you create a new bind or thats the one i created? Also it is possible that when i try to link the error i have is a conflict of nugets? – João Palma Aug 30 '18 at 09:07
  • Yeah, and I copied the bind project from your solution to my project and now it works. I don't know what to think about this. – João Palma Aug 30 '18 at 09:30
  • Alright forget it what I just said, it won't give me errors because you didn't had the native reference, so the bind doesn't really work without it. And when I add the native reference I have the same 4 errors that I always had. – João Palma Aug 30 '18 at 09:40