I have a problem to create a preprocessor macro function, that concatenates two Strings and "return" a
#define ObjectKeyMake(NAME) @"com.test.##NAME"
NSLog(@"%@", ObjectKeyMake(foo)); // com.test.##NAME
#define ObjectKeyMake(NAME) [@"com.test." stringByAppendingString: NAME]
You can take advantage of the fact that the compiler combines string literals that are next to each other, like this:
NSString* greeting = @"Hello, " "world";
The macro implementation would look like this:
#define ObjectKeyMake(NAME) (@"com.test." #NAME)