I need some information about Static Library creation, Actually i was created static library with .h(header files) files, But i want to hide some .h(header files) from my library which are not visible to others. Could u please provide any solution..
Asked
Active
Viewed 486 times
1
-
Yeah, but how ? could u please provide clear information. – maren iOS Mar 08 '13 at 09:24
-
If you need these "private" headers in order for someone to use your static library, then you cannot hide them. However if you don't need these "private" headers, you just don't distribute them. – trojanfoe Mar 08 '13 at 09:50
-
Yeah Ok,But how can i ?Actually some headers are using for developing main header file, But i don't want distribute those helping headers. But in static library when i'm not taking those un wanted headers files into public then in integration time it showing like undeclared files in lib.a. Then how can i approach ? – maren iOS Mar 14 '13 at 12:39
1 Answers
0
Yes, there is a possibility and I have done this very recently.
Please refer this website which shows how to expose the header files.
Note: You should not import your private headers in your public headers. You'll get some compilation errors while compiling the library in other projects.
Lets assume you have two headers,
- XYZ.h (public)
- XYZInternal.h (private)
You have to import XYZInternal.h in XYZ.m file to avoid the header not found error and of course to hide the existence of the private header/class.

Vasanth
- 420
- 6
- 17