How do I add a library compiled in XCode into Monotouch so that it works for both simulator and device?

By : tofutim
Source: Stackoverflow.com
Question!

There are appear to be methods of creating a fat static library ala "http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4". Is this recommended? Any special steps (i.e., disabling thumb)

Also, if I do use the fat static library, will monotouch/xcode clear out any unused code in the final product?

By : tofutim


Answers

You definitely need to turn Thumb code off so you can link properly against the library. As far as creating the fat static library goes, I can only say that anecdotally I've done this for a few third-party libraries that I've used and haven't run into issues.

I assume you already know that you need to create the bindings necessary to make calls to the objective-c library from your MonoTouch code and add extra gcc flags in the project properties to link in the static lib. If not, you can get that information on how to do that from the MonoTouch website.



This video can help you solving your question :)
By: admin