How can I see a preprocessed Objective-C code in which the Objective-C directives like @property and @synthesize are preprocessed?
I've searched this topic in Stackoverflow, there's some tips for how to see preprocessed code, for example Xcode Preprocessor Output. However, the "preprocessed code" does not involve preprocessed Objective-C directives. For example, in the "preprocessed code", the Objective-C directives like @property or @synthesize are not preprocessed.
Take the following code as an example,
// ========= Person.h =========
@interface Person: NSObject
{
}
-(void) Print;
@property int age;
@end
// ========= Person.m =========
@implementation Person
-(void) Print
{
NSLog(@"Print_Age:%d", _age);
}
@end
What I expect to see is something like this:
// ========= Person.h =========
@interface Person: NSObject
{
int _age;
}
-(void) Print;
-(int) age;
-(void) setAge:(int) age;
@end
// ========= Person.m =========
@implementation Person
-(void) Print
{
NSLog(@"Print_Age:%d", _age);
}
-(int) age {
return _age;
}
-(void) setAge:(int) age {
_age = age;
}
@end
How can I see it?