开发者

MonoTouch iPhone: Creating native assembly .NET wrappers

开发者 https://www.devze.com 2023-03-02 09:21 出处:网络
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

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

精彩评论

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

关注公众号