Binding Objective-C Libraries in Xamarin.iOS

Preview:

DESCRIPTION

Ever wondered how to use Objective-C libraries in your Xamarin.iOS project? Now you can learn, with Binding Objective-C Libraries in Xamarin.iOS. Video: Coming Objective Sharpie: http://docs.xamarin.com/guides/ios/advanced_topics/binding_objective-c_libraries/objective_sharpie QBFlatButton: https://github.com/questbeat/QBFlatButton FlatButton: https://github.com/pierceboggan/FlatButton Producing Better Bindings: http://blog.xamarin.com/producing-better-bindings-for-xamarin.ios-and-xamarin.mac/

Citation preview

Binding Objective-C Libraries

Pierce BogganXamarin Support Engineerpierce.boggan@xamarin.compierce@pierceboggan.com

Why?

• Time

• Money

• Creativity

• “Great artists steal”

Potential Obstacles

• Complicated

• Just another thing to learn

• No Objective-C knowledge

• No knowledge of the process

Simplicity

• No Objective-C knowledge is required (for most simple libraries)

• Tools that cut down time to bind

• Very mechanical, repeatable process

Binding vs. Converting

Binding

• Little-to-no Objective-C knowledge required

• Quick and straightforward

• Less customization and extensibility

Converting

• Objective-C knowledge is a must

• Quite tedious

• More customization and extensibility

Expectations

WON’T:

• Be a bindings expert

• Be able to bind complex libraries

WILL:

• Be able to bind simple libraries with no Objective-C knowledge

• Have a solid foundation moving forward

Finding & Downloading Libraries

WHAT:

• UI Controls

• SDKs

• Helper Libraries

WHERE:

• CocoaControls

• Github

• Twitter

First Time Downloads

• Objective Sharpie

• Xcode Command Line Tools

• Other SDKs to bind against

DEMO

QBFlatButton

• Open-sourced on Github

• Text version

Process Review

1. Identify & Download Library

2. Create an Objective-C Static Library

3. Generate Bindings with Objective Sharpie

4. Create iOS Binding Project in Xamarin Studio

Process Review: Optional

1. Create Demo Project

2. Open-source on Github

3. Submit to the Xamarin Component Store

Moving Forward: Reading Up

• Programming with Objective-C (Apple)

• Binding Objective-C Libraries (Xamarin)

• Binding Types Reference (Xamarin)

• .NET Framework Design Guidelines (Microsoft)

Moving Forward: Practice

• Remember: Practice makes perfect!

• Examine other bindings in the mono/monotouch-bindings repository

• Make small additions/fixes to existing bindings

• Bind progressively larger libraries on your own

Q&A

THANK YOU

Recommended