I have an iOS native library which depends on a pure c code, can i make a binding to this library even though it depends on c code?
Yes, you can bind any Obj-C library, just make sure to link the required C library or it will crash.
The problem is that I haven't be able to parse the header files in order to generate the ApiDefinition. Could I have some help in this process?
Are you trying to process C header files? You can only bind Objective-C library. More information here.
Ok, let me explain my entire problem. We have an application which was developed on Xamarin, but now we need to integrate a device on it. The driver for the communication with this device was written using objective-c but it also depends on a c code. We have "mylib.h" (written using objective-c) and "mylibC.h" (written using c). "mylib.h" makes function calls to "mylibC.h". We also have an ".a" file which is the library.
We need to link the ".a" file to our application in order to use the device, but when we try to generate the ApiDefinition we get a lot of errors.
My question is: Can we make this binding? Is it possible to bind to that kind of library (which depends on c code)?
AFAIK you can do that binding as you usually do with any other library. The public header for your Objective-C library "mylib.h" is the one that should be bound. Just ignore the internal C header "mylibC.h", it's internally used from your Obj-C library, but there's not need to bind it because it won't be called directly from C#.
After creating the binding project, compile the DLL linking both Obj-C and C .a libraries into a Xamarin.iOS DLL.
Xamarin Inc., as a wholly-owned Microsoft subsidiary acting as a separate legal entity, adheres to the Microsoft Privacy Statement: Privacy & cookies