Question

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.

Was it helpful?

Solution

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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top