如何以编程方式获取完整的ios设备详细信息 [英] How to get the complete ios device details programatically

查看:154
本文介绍了如何以编程方式获取完整的ios设备详细信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要访问IOS设备中常规"->设置"->关于"中的所有设备详细信息,我可以获取除设备IMEI和序列号调制解调器固件之外的详细信息,可以通过任何方式在我的设备中获取完整的设置包申请或上述详细信息

I need to access all the device details in general->settings->about in my IOS device , i can get the details except device IMEI and serial number modem firmware, there is any way to get the complete settings bundle in my application or the above mentioned details

推荐答案

在项目中添加Message.framework并获取IMEI编号,

Adding Message.framework to your project and Get IMEI Number,

NetworkController *ntc = [NetworkController sharedInstance];
NSString *imeistring = [ntc IMEI];

Apple允许设备的某些详细信息,而不提供IMEI,序列号.在UIDevice类中提供详细信息.

Apple allow some of the details of device, Not give IMEI, serial Number. in UIDevice class provide details.

class UIDevice : NSObject {

    class func currentDevice() -> UIDevice

    var name: String { get } // e.g. "My iPhone"
    var model: String { get } // e.g. @"iPhone", @"iPod touch"
    var localizedModel: String { get } // localized version of model
    var systemName: String { get } // e.g. @"iOS"
    var systemVersion: String { get } // e.g. @"4.0"
    var orientation: UIDeviceOrientation { get } // return current device orientation.  this will return UIDeviceOrientationUnknown unless device orientation notifications are being generated.

    @availability(iOS, introduced=6.0)
    var identifierForVendor: NSUUID! { get } // a UUID that may be used to uniquely identify the device, same across apps from a single vendor.

    var generatesDeviceOrientationNotifications: Bool { get }
    func beginGeneratingDeviceOrientationNotifications() // nestable
    func endGeneratingDeviceOrientationNotifications()

    @availability(iOS, introduced=3.0)
    var batteryMonitoringEnabled: Bool // default is NO
    @availability(iOS, introduced=3.0)
    var batteryState: UIDeviceBatteryState { get } // UIDeviceBatteryStateUnknown if monitoring disabled
    @availability(iOS, introduced=3.0)
    var batteryLevel: Float { get } // 0 .. 1.0. -1.0 if UIDeviceBatteryStateUnknown

    @availability(iOS, introduced=3.0)
    var proximityMonitoringEnabled: Bool // default is NO
    @availability(iOS, introduced=3.0)
    var proximityState: Bool { get } // always returns NO if no proximity detector

    @availability(iOS, introduced=4.0)
    var multitaskingSupported: Bool { get }

    @availability(iOS, introduced=3.2)
    var userInterfaceIdiom: UIUserInterfaceIdiom { get }

    @availability(iOS, introduced=4.2)
    func playInputClick() // Plays a click only if an enabling input view is on-screen and user has enabled input clicks.
}

示例:[[UIDevice currentDevice] name];

这篇关于如何以编程方式获取完整的ios设备详细信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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