获取设备品牌 iphone
获取手机的型号 [UIDevice currentDevice]. getCurrentDeviceMode
链接: https://www.jianshu.com/p/d0382538049a
设备版本号 [infoDictionary objectForKey:@"CFBundleShortVersionString"]
设备主机地址 [ UIDevice currentDevice]. getIPAddresses
蓝牙地址 https://www.jianshu.com/p/1d6a8fc8134f
CPU信息 CPU总数、已使用CPU比例、每个CPU使用比例
链接:http://www.cocoachina.com/articles/20890
存储信息 磁盘总量、磁盘空闲量、磁盘已使用量
链接:http://www.cocoachina.com/articles/20890
内存信息 系统总内存空间、已使用的内存空间
链接:http://www.cocoachina.com/articles/20890
系统信息设备名称 [UIDevice currentDevice].name
链接:http://www.cocoachina.com/articles/20890
设备类型 getDeviceName
链接:http://www.cocoachina.com/articles/20890
系统版本 [UIDevice currentDevice].systemVersion;
链接:http://www.cocoachina.com/articles/20890
系统名称 [UIDevice currentDevice].systemName
链接:http://www.cocoachina.com/articles/20890
分辨率 CGRect screenRect = [[UIScreen mainScreen] bounds];
CGSize screenSize = screenRect.size;
//横向分辨率
CGFloat scaleW = [UIScreen mainScreen].scale;
CGFloat screenX = screenSize.width * scaleW;
//竖向分辨率
CGFloat scaleH = [UIScreen mainScreen].scale;
CGFloat screenY = screenSize.height * scaleH;
return [NSString stringWithFormat:@"%d*%d",
(int)screenX ,(int)screenY];//总分辨率
屏幕尺寸 + (NSString )screenSize{
CGRect screenRect = [[UIScreen mainScreen] bounds];
CGSize screenSize = screenRect.size;
return [NSString
stringWithFormat:@"%d%d",
(int)screenSize.width,(int)screenSize.height];
}
是否越狱 - (BOOL)isJailBreak;
链接: https://www.jianshu.com/p/13156ca78ac8
是否开GPS [CLLocationManager locationServicesEnabled]
是否有WIFI - (BOOL) isWiFiEnabled;
链接: https://blog.csdn.net/onlychengzhi/article/details/78258965
是否支持NFC 系统版本大于11即可支持
是否插入耳机 - (BOOL)isHeadSetPlugging {
AVAudioSessionRouteDescription* route =
[[AVAudioSession sharedInstance] currentRoute];
for (AVAudioSessionPortDescription* desc in [route outputs])
{
if ([[desc portType] isEqualToString:
AVAudioSessionPortHeadphones])
return YES;
}
return NO;
}
获取电量信息 UIDevice currentDevice].batteryMonitoringEnabled = YES;
double deviceLevel = [UIDevice currentDevice].batteryLevel;
是否正在充电 链接:https://blog.csdn.net/inspirating/article/details/47807619
经纬度获取 链接: https://www.cnblogs.com/mawenqiangios/p/5884284.html
传感器信息 获取加速度数据,陀螺仪数据,磁场数据
链接: https://www.jianshu.com/p/a7d07367e0a8?from=timeline&isappinstalled=0
WIFI列表信息 向苹果申请一个权限,再在工程里面配置
链接:https://www.jianshu.com/p/5072a8485ceb
网友评论