获得IPhone手机的相关硬件和其版本支持的SDK信息
2011-09-05 21:32
288 查看
主要类:UIDevice
例如:如下代码获得了设备是否支持多线程
再比如:获得设备的ID号:
iphone开发时某些情况我们可能需要获取用户使用的设备唯一编号来做一些事情。
我现在要实现一个验证的过程,但目前为止ios 最新sdk中还没有提供获取用户手机号码的api,所以只有通过获取设备id做验证了,具体代码很简单。
例如:如下代码获得了设备是否支持多线程
UIDevice* device = [UIDevice currentDevice]; if ([device respondsToSelector:@selector(isMultitaskingSupported)]) { _multitaskingSupported = device.multitaskingSupported; }
再比如:获得设备的ID号:
iphone开发时某些情况我们可能需要获取用户使用的设备唯一编号来做一些事情。
我现在要实现一个验证的过程,但目前为止ios 最新sdk中还没有提供获取用户手机号码的api,所以只有通过获取设备id做验证了,具体代码很简单。
//获取设备id号 |
UIDevice *device = [UIDevice currentDevice]; //创建设备对象 |
NSString *deviceUID = [[ NSString alloc] initWithString:[device uniqueIdentifier]]; |
NSLog (@ "%@" ,deviceUID); // 输出设备id |
相关文章推荐
- adb获取android手机系统版本,已对应的api版本和硬件相关信息
- adb获取android手机系统版本,已对应的api版本和硬件相关信息
- 从手机中读取音乐信息相关详细步骤(手机版本在6.0以下)
- AndroidUtils(一)手机信息大全(设备ID、厂商、型号、系统、IMEI、SDK版本等)
- IOS开发: 查看xcode支持iphone手机版本的方法
- 如何获取iphone的硬件版本以及系统信息
- 通过源码获取iphone硬件版本以及系统信息
- iphone 如何获取iphone的硬件版本以及系统信息
- 利用私有的API获得手机上所安装的所有应用信息(包括版本,名称,bundleID,类型)
- Android 获取手机的相关硬件信息
- 获取iphone的硬件版本以及系统信息
- 如何获取iphone的硬件版本以及系统信息
- 获得android手机的相关信息
- 如何获取iphone的硬件版本以及系统信息
- CDH5 安装需求和相关软件支持的版本信息
- iphone开发之通过unix系统底层获取和系统相关的硬件信息
- iphone开发之通过unix系统底层获取和系统相关的硬件信息
- iphone开发之通过unix系统底层获取和系统相关的硬件信息
- 获取iphone的硬件版本以及系统信息
- windows8 开发获得系统 app相关信息代码 c#版本