开发者

How to build a library for both iPhone simulator and device?

开发者 https://www.devze.com 2023-01-03 04:33 出处:网络
I want to build a static library for ipho开发者_StackOverflowne. I want to give my users the .a library which they can use for both simulator test and device test. Do I have to build two library in si

I want to build a static library for ipho开发者_StackOverflowne. I want to give my users the .a library which they can use for both simulator test and device test. Do I have to build two library in simulator mode and device mode? Is there any way to build a single one that can be used for both platforms?


Compile your library twice. Once using the device SDK, and again using the Simulator SDK.

Then use the lipo command line tool to create a "fat" library.

lipo -create libdevice.a libsimulator.a -output libcombined.a

That should give you what you need.

0

精彩评论

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