iOS making a universal library - for i386 and arm7

感情迁移 提交于 2020-01-01 01:15:34

问题


We are building a library for use in iOS development. We can generate either a i386 library for the simulator, or a arm7 library for the hardware device. As it is now, we need to have two different files (.a libraries) when distributing the library to our other developers. This is a little bit cumbersome for distribution purposes. I was wondering; is there a way to build the library in XCode so that a single .a library file has both i386 and arm7 in it, so that we can distribute just a single library file for both architectures i386 and arm7.


回答1:


You can use the lipo tool to stitch those two files into a single “universal” file:

lipo -create <i386_lib>.a <armv7_lib>.a -output lib.a


来源:https://stackoverflow.com/questions/17283172/ios-making-a-universal-library-for-i386-and-arm7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!