Objective-C: What is the current preferred method of declaring constants without a .pch?


Alex Zavatone
 

I’ve read the Apple docs and looked around and can’t find definitive sources on what the preferred method is and how to do it.

Do we use modules? If so, how?

I understand that a .pch is now a “bad idea”. OK. What do we do instead? Why?

Is it good practice to create one constants.h/m? Or is that just another way of masking a global (which is bad)?

It does make everything easy to find.

Should we create one .h/.m file with multiple constants classes within?

I can easily go back to using a .pch, but a clear path forward to the current year’s practice would be nice.

Thanks in advance.

- Alex Zavatone

Join {cocoa@apple-dev.groups.io to automatically receive all group messages.