获取手机设备号及型号的宏

代码宏定义如下

 

//设备号
#define hUUID          [[UIDevice currentDevice].identifierForVendor.UUIDString stringByReplacingOccurrencesOfString:@"-" withString:@""]
//手机型号
#define hDeviceModel  [UIDevice currentDevice].model
//版本号获取
#define hAPPVersion    [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]
//Build号获取
#define hAPPBuild      [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"]
//设备系统版本号
#define hDeviceVersion ([[UIDevice currentDevice] systemVersion])

#define hScreenWidth   [NSString stringWithFormat:@"%.1f",[[UIScreen mainScreen] bounds].size.width*[UIScreen mainScreen].scale]
#define hScreenHeight  [NSString stringWithFormat:@"%.1f",[[UIScreen mainScreen] bounds].size.height*[UIScreen mainScreen].scale]
//平台
#define hPlatform      @"iOS"

 

获取手机设备号及型号的宏

上一篇:Android项目目录结构模板以及简单说明


下一篇:android Studio keytool' 不是内部或外部命令,也不是可运行的程序 或批处理文件