Consuming 3rd Party ObjC Libraries
Table of contents
Step 1: Add the 3rd party library to your project
Select the project from the solution explorer and press Command (Apple)+Option+A. Navigate to the libFoo.a and add it to the project. When prompted, tell MonoDevelop to copy it into the project. After adding it, find the libFoo.a in the project, right click on it, and set the Build Action to none.
Step 2: Configure the addition mtouch args for your configurations
Select the project from the solution explorer and click Project->[Project Name] Options. Navigate to iPhone Build in the Build subsection. You need to add the following flags to every configuration you use:
-gcc_flags "-L${ProjectDir} -lFoo -framework CFNetwork -force_load ${ProjectDir}/libFoo.a""
- -gcc_flags is an option to mtouch telling it to pass everything in the quotes to the native compiler.
- -L${ProjectDir} tells the linker to look in your project directory for the library
- -lFoo tells the linker to include the libFoo.a you added to your project earlier
- -framework CFNetwork tells the linker to include the CFNetwork framework.
- -force_load tells the linker to load your library, as -ObjC has a bug looks like
Step 3: Create bindings for the classes you need to consume from the native library
You can see directions on how to bind third party types here.
There are projects that are binding various popular libraries, for example the btouch-library in code.google.com.
- Tag page
- What links here
[MISSING: skin.common.header-gallery-count]
| Images 0 | ||
|---|---|---|
| No images to display in the gallery. |