iOS - Is it possible to make a macro globally available without importing the file in which it is defined every time? [duplicate]

StackOverflow https://stackoverflow.com/questions/23512506

Question

I want to define a logging macro that I can use in all my source files, but I don't want to import the file in which I defined the macro every time? So, I am just curios whether it is possible to make a macro globally available without importing the file in which it is defined every time?

Was it helpful?

Solution

Declare the macro in the #ifdef __OBJC__ section of your AppName-Prefix.pch.

Source How to define a macro globally in Objective-C?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top