Creando una biblioteca estática de bibliotecas estáticas en XCode

I have a need to create a static library which will some of it's own code and it will also contain a number of other static libraries I have written.

So normally I have a main project A.xcodeproj which depends on B.xcodeproj which in turn depends on C, D, E etc.

My company has a requirement to distribute only a static library with a simple app, and for there to only be one library sent out, not a multitude of libC.a libD.a etc.

So I create A_static.xcodeproj which has simple application API calls and links to libB.a but everytime I try this libB.a only contains the symbols for B.xcodeproj, I can not get to it also contain libC.a libD.a etc.

Is there an easy way to do this in XCode that I'm missing?

Muchas Gracias

preguntado el 09 de marzo de 12 a las 15:03

You might be better off writing a shell script to unpack all the .ar files and repack them into a single archive. The only issue with this will be files from different archives with the same name... perhaps you can use folders, or renaming the file to be always unique (based on their source archive). It's not something that Xcode would provide as it's a very bespoke requirement. -

1 Respuestas

It sounds very much like you need to use frameworks. Allows you to bundle multiple libraries and files together into 1 bundle that other parties can include. I'm in the same boat where I work. I've used this guide on github to get our frameworks up and running. Worked great for me.

Marco de iOS

respondido 09 mar '12, 16:03

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.