Reputation: 11
I have a static library project in Xcode where I have utilized the Copy Headers portion of build phases to make only certain classes accessible from another project and keep all other classes from being accessed outside of my static library project.
I have created a View Controller project where I link to the library (.a file) that I have built. When I import in my header that exists in the include folder auto generated by Xcode's Copy Headers feature (I'm assuming this is now a public header file), let's call it Header A, it returns an error Lexical or Preprocessor Issue, and that it cannot find a header file which is imported by Header A but was not added to the Copy Headers section because I do not want users to have access to it (I am assuming it is a private header since I have not added it to the include folder through Copy Headers), let's call it Header B.
If I copy the header file to the include path, than Xcode allows navigation to see the code which is what I am trying to avoid. Is there a way to only allow access to certain classes, which may themselves access private classes? Is there a certain way to declare classes as Public and Private that I am missing?
I appreciate your help!
Upvotes: 1
Views: 271