Custom warning in Xcode

I am working on an API library and I would like to add a few warnings that will appear when other developers create the application if the optional apikey is not enabled. It must be embedded without a key (since it is optional), so I cannot just add a syntax error to cause a build error.

I know that Xcode supports TODO and FIXME, but in fact they do not stand out anywhere major.

Any other thoughts on how to approach this?

+3
source share
1 answer

You can use the #warningpreprocessor directive :

#warning This will appear in the compiler warnings output

, #warning, , ( ).

+24

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


All Articles