Take the 2-minute tour ×

I am creating a library to share with other projects. I am adding the required .h files in "Copy Headers" & .m files in "Compiled Sources" folder.

I noticed one thing that even if I do not add some .h files & add just a .m file my library works fine but reverse is not true. Why it is so that .h file is not mandatory to add in the library?

share|improve this question

1 Answer 1

up vote 0 down vote accepted


share|improve this answer
I understand that. So, would it be OK if I do not add any .h file in my library & just the .m files? –  Abhinav Jan 25 '12 at 22:02
If you leave out the .h file, you'll get warnings that specific methods can't be found or variables are undeclared. So you need that .h file next to the library (.a) –  basvk Jan 25 '12 at 22:06
ok. got it. Thanks. –  Abhinav Jan 25 '12 at 22:11

Your Answer


