您的位置:首页 > 其它

获取iphone的设备信息

2015-06-03 15:17 423 查看
uniqueIdentifier – identifier guaranteed to be unique for every device
name – arbitrary name found in General > About setting on device
systemName – name of the OS running on the device
systemVersion – current version of the OS
model- model, such as ”iPhone” or ”iPod touch”
localizedModel – same as above using a localized string

@property(nonatomic,readonly,retain) NSString*name;// e.g. "My iPhone"
@property(nonatomic,readonly,retain) NSString*model; // e.g. @"iPhone", @"iPod Touch"
@property(nonatomic,readonly,retain) NSString*localizedModel;// localized version of model
@property(nonatomic,readonly,retain) NSString*systemName;// e.g. @"iPhone OS"
@property(nonatomic,readonly,retain) NSString*systemVersion; // e.g. @"2.0"
@property(nonatomic,readonly) UIDeviceOrientation orientation; // return current device orientation
@property(nonatomic,readonly,retain) NSString*uniqueIdentifier;

NSLog(@"uniqueIdentifier: %@", [[UIDevicecurrentDevice] uniqueIdentifier]);
NSLog(@"name: %@", [[UIDevicecurrentDevice] name]);
NSLog(@"systemName: %@", [[UIDevicecurrentDevice] systemName]);
NSLog(@"systemVersion: %@", [[UIDevicecurrentDevice] systemVersion]);
NSLog(@"model: %@", [[UIDevicecurrentDevice] model]);
NSLog(@"localizedModel: %@", [[UIDevicecurrentDevice] localizedModel]);


-------------------------------------------------------------------------------------------------------------------------------
iphone simulator:
2010-10-15 09:20:43.661 SmartRoadShow[1404:207] uniqueIdentifier: 759A9CA7-F880-5BB3-B225-9CE89ABF1B0D
2010-10-15 09:20:43.662 SmartRoadShow[1404:207] name: iPhone Simulator
2010-10-15 09:20:43.662 SmartRoadShow[1404:207] systemName: iPhone OS
2010-10-15 09:20:43.663 SmartRoadShow[1404:207] systemVersion: 4.0.2
2010-10-15 09:20:43.663 SmartRoadShow[1404:207] model: iPhone Simulator
2010-10-15 09:20:43.664 SmartRoadShow[1404:207] localizedModel: iPhone Simulator
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: