How to define a macro globally in Objective-C?

I want to define a macro globally. I want to override NSLocalizedString() throughout my project. Is it possible and how do I do it?

+4
source share
2 answers

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

+18
source

You define your macro in some header file. You put this header file in a *.pch file (prefix header file). Find the "prefix" in the build settings for your purpose. Make sure your *.pch file is used.

+5
source

Source: https://habr.com/ru/post/1382151/


All Articles