Exposing headers on iPhone static library

Posted by leolobato on Stack Overflow See other posts from Stack Overflow or by leolobato
Published on 2010-04-20T12:46:18Z Indexed on 2010/04/26 2:33 UTC
Read the original article Hit count: 326

Hello guys,

I've followed this tutorial for setting up a static library with common classes from 3 projects we are working on.

It's pretty simple, create a new static library project on xcode, add the code there, a change some headers role from project to public. The tutorial says I should add my library folder to the header search paths recursively.

Is this the right way to go?

I mean, on my library project, I have files separated in folders like Global/, InfoScreen/, Additions/. I was trying to setup one LOKit.h file on the root folder, and inside that file #import everything I need to expose. So on my host project I don't need to add the folder recursively to the header search path, and would just #import "LOKit.h".

But I couldn't get this to work, the host project won't build complaining about all the classes I didn't add to LOKit.h, even though the library project builds.

So, my question is, what is the right way of exposing header files when I setup a Cocoa Touch Static Library project on xCode?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about static-libraries