objective-c method call from unity

Hi,

I’m trying to call an objective-c method from unity using C#. I’m using the plug-in method described here.

I can get this method to work if I include my header and mm files directly in the Unity generated Xcode project but, what I’m trying to do is create a static library or even a framework with my interface and implementations defined in those but I get an error that my referenced methods are not defined, which happens if I don’t even include my .h or .mm files. My problem may be that I’m not creating a framework or a static library correctly (which I suspect is my problem).

Now, my question is: can I even use dllimport in this manner, such as calling a function defined in a static or dynamic xcode library?

Thanks in advance.

@Aram Azhari: I did find a solution to this.
Basically what we do now is have an m file or header file as a “bridge” into what we want to call in the static library or framework.
So we would do the same dllimport in the CS file, but it calls a method who’s signature is unique across the scope of the project and is defined in an mm file located in the Assets->Plugins folder.