xAppKey is a macro. It will not be connected at all. On the contrary. At compile time, it will be replaced by @"REPLACE_WITH_YOUR_APP_KEY" , and then compiled as if this line has been repeated all the time.
For this reason, some experts suggest replacing them with constant lines. These experts may be right. However, I like #define.
And for this reason you should not add comments to the #define statement.
#define xAppKey @"REPLACE_WITH_YOUR_APP_KEY"
Such things will almost certainly cause compile-time errors that can be difficult to understand. Example:
NSLog (@"%@", xAppKey);
This works fine with a comment because it will be converted to:
NSLog (@"%@", @"REPLACE_WITH_YOUR_APP_KEY");
But with a comment, it will be converted to:
NSLog (@"%@", @"REPLACE_WITH_YOUR_APP_KEY"
And it does not compile.
source share