一,代码。

- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view. self.title=@"判断是否是模拟机";
[self isSimulator];
}
#pragma -mark -functions
-(void)isSimulator
{
if (TARGET_IPHONE_SIMULATOR) {
NSLog(@"是模拟机");
}else{
NSLog(@"不是模拟机");
} }

二,输出。
2015-10-19 15:31:30.761 判断是不是模拟机[9014:225857] 是模拟机