iOS制作通用库-适用于i386和arm7 [英] iOS making a universal library - for i386 and arm7

查看:139
本文介绍了iOS制作通用库-适用于i386和arm7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在建立一个用于iOS开发的库.我们可以为模拟器生成i386库,或者为硬件设备生成arm7库.现在,将库分发给其他开发人员时,我们需要具有两个不同的文件(.a库).出于分发目的,这有点麻烦.我在想;有没有一种方法可以在XCode中构建该库,以便单个.a库文件中同时包含i386和arm7,因此我们可以仅为i386和arm7两种体系结构分发一个库文件.

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.

推荐答案

您可以使用lipo工具将这两个文件缝合为一个通用"文件:

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

这篇关于iOS制作通用库-适用于i386和arm7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆