在iOS设备上访问硬件信息 [英] Accessing hardware infos on iOS devices

查看:57
本文介绍了在iOS设备上访问硬件信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以编写一个显示硬件信息的应用程序,例如处理器中的内核数量,可用的RAM,GPS,运动传感器?

Is it possible to write an app that displays hardware infos such as the number of kernels in the processor, the available RAM, GPS, motion sensors?

由于位置服务开关,无法使用 CoreLocation CoreMotion 来确定设备上是否存在GPS或加速度计.

Using CoreLocation and CoreMotion it's not possible to know for sure if a GPS or an accelerometer is present on the device because of the Location Services switch.

是否可以更深入地检查硬件?

Is it possible to check deeper for hardware?

推荐答案

几乎没有.您可以获取一些常规的隐含信息,例如,通过分配RAM直到收到警告,然后假定这是您的可用RAM.您还可以检查某些服务的可用性,例如,通过询问CLLocationManager是否locationServicesEnabled.但是您无法获得有关它的详细信息,无法确定例如是否存在GPS,但只是将其关闭.

Pretty much no. You can get some general, implied information, for example by allocating RAM until you get a warning, and then assuming that's your available RAM. You can also check for availability of certain services, for example by asking CLLocationManager if locationServicesEnabled. But you can't get detailed information about it to know for sure if, for example, the GPS is there, but it's just turned off.

所以答案是否定的.

这篇关于在iOS设备上访问硬件信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆