Please note that there are differences between the simulator and the device. The simulator does not start the same SDK as the device. The lower layers from the Mac SDK are actually what makes sense since it runs on a Mac.
, , . , Jeff Lamarche : Simulator
#import <objc/objc-runtime.h>
#import <objc/runtime.h>
#import <objc/message.h>
, , :
#if (TARGET_OS_IPHONE)
- (NSString *)className;
+ (NSString *)className;
#endif
:
#if (TARGET_OS_IPHONE)
- (NSString *)className {
return [NSString stringWithUTF8String:class_getName([self class])];
}
+ (NSString *)className {
return [NSString stringWithUTF8String:class_getName(self)];
}
#endif