开发者

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

开发者 https://www.devze.com 2023-02-02 08:28 出处:网络
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-an开发者_开发问答d-sdk-4\".Is thi

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-an开发者_开发问答d-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?


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.

0

精彩评论

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