0

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?

Thanks

1
  • 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. Commented Mar 9, 2012 at 16:06

1 Answer 1

2

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.

iOS Framework

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.