0

XCode: Copy Headers: Public vs. Private vs. Project?

That seems to be a good explanation but i still couldn't understand much of it.

public - readable source code? do they mean readable source code of the header file?

private - since i am still working on that part of the implementation, i'll mark that header as private and no one will be able to use it, until i change it back to public and build the library again. ??

project - I couldn't understand anything

Community
  • 1
  • 1
neeraj
  • 1,191
  • 4
  • 19
  • 47

1 Answers1

0

Long story short: if you want to make your code available as a library, put those function and type declarations in the header.

If you have complicated code that shares types between c files and requires-forward declaration of types and functions, put them in headers.

Otherwise, no need to use headers. Although it's nice to separate them out for readibility and documentation purposes.

Joe
  • 46,419
  • 33
  • 155
  • 245
  • i want to use my code as a library and thus i will use headers. I am just confused about the 'type' of headers. Public private and Project. In the project settings we have an option of setting the type of header – neeraj Aug 21 '12 at 14:23