Facilitating the spread of knowledge and innovation in professional software development



Choose your language

InfoQ Homepage News Quickly Create Mono Bindings with Objective Sharpie

Quickly Create Mono Bindings with Objective Sharpie


Objective Sharpie is the child of Aaron Bockover. This tool creates C# bindings suitable for use in Mono for Objective C SDKs.

Objective Sharpie works by using Clang to parse Objective C header files. Since the process is automated, and has full access to the header, binding errors should be non-existent for most libraries.

Aaron created Objective Sharpie in order to deal with the tedious task of creating bindings for OS X Lion and Mountain Lion. According to Aaron, OS X Lion “thousands of new APIs”. He continues,

This fear of monotony fueled me to implement a tool that used Clang as a library to gain access to every single detail of the source tree as it’s parsed. With this information, I was able to start generating C# code that represented a verifiably correct binding.

It’s important to note that we build Xamarin.Mac and Xamarin.iOS using the exact same binding tools that are available in Xamarin Studio to bind third party libraries. And now Objective Sharpie is no different: it helps us deliver faster on new APIs and ensure that they are accurate and error-free by producing a correct binding definition up front.

It is important to note that this is a work in progress. While most common language features are covered, the code generator doesn’t support the entire Objective C language. It also doesn’t correct naming conventions, so you may wish to do that manually.

We need your feedback

How might we improve InfoQ for you

Thank you for being an InfoQ reader.

Each year, we seek feedback from our readers to help us improve InfoQ. Would you mind spending 2 minutes to share your feedback in our short survey? Your feedback will directly help us continually evolve how we support you.

Take the Survey

Rate this Article


Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p


Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.