码迷,mamicode.com
首页 > 移动开发 > 详细

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

时间:2019-10-07 13:18:27      阅读:134      评论:0      收藏:0      [点我收藏+]

标签:build   RKE   fine   mod   ids   class   手机型号   ever   型号   

代码宏定义如下

 

//设备号
#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"

 

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

标签:build   RKE   fine   mod   ids   class   手机型号   ever   型号   

原文地址:https://www.cnblogs.com/110-913-1025/p/11629924.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!