Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XCode Project: how to build sub-projects as static libraries?

I need to build sub-projects as static libraries, not too sure how I should do it, should I:

  1. Compile all sub-projects one by one (or compile the main project once?)
  2. Find .a files for sub-projects in products folder, copy them to main project
  3. copy all .h files for sub-projects into a folder in main projects
  4. remove all sub-projects

are the above steps correct?

Also, do I need to compile them in release(or debug) mode, and for simulator and device respectively?

Thanks!

like image 748
hzxu Avatar asked Sep 09 '26 20:09

hzxu


1 Answers

No, you don't need to do any of that because Xcode will do it all for you...

Basically, just drag the library project in, set the dependencies and be done: See this page for details.

like image 87
borrrden Avatar answered Sep 12 '26 10:09

borrrden



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!