开发者

MonoTouch iPhone: Creating native assembly .NET wrappers

We are considering using an API from a 3rd party for the iPhone which was compiled in Xcode.

How do w开发者_开发知识库e create a wrapper for this native iOS library so that we can interop with it in Monotouch .NET

This is exactly what the Flurry.a wrapper did. We need to find out how to do it ourselves though. See Kevin Machanon's http://blog.kevfoo.com/index.php/2010/08/monotouch-flurry-analytics-bindings


On Kevin Machanon's GitHub repository you can take a look at the actual code. At first sight I believe the process implies the creation of an interface that mimics the native class you would like to use and decorate it with mapping attributes:

  • BaseType
  • Static
  • Export

And pass the detailed native method call to the attributes parameters.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜