main
 1//
 2// Licensed under the terms in License.txt
 3//
 4// Copyright 2010 Allen Ding. All rights reserved.
 5//
 6
 7#import "KWDeviceInfo.h"
 8
 9#if TARGET_IPHONE_SIMULATOR
10
11#import <UIKit/UIKit.h>
12
13#endif // #if TARGET_IPHONE_SIMULATOR
14
15@implementation KWDeviceInfo
16
17#pragma mark -
18#pragma mark Getting the Device Type
19
20+ (BOOL)isSimulator {
21#if TARGET_IPHONE_SIMULATOR
22    return YES;
23#else
24    return NO;
25#endif // #if TARGET_IPHONE_SIMULATOR
26}
27
28+ (BOOL)isPhysical {
29    return ![self isSimulator];
30}
31
32@end