ios - 如何以编程方式获取完整的 ios 设备详细信息

标签 ios objective-c imei uidevice

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

最佳答案

Message.framework添加到您的项目中并获取IMEI号码,

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

Apple 允许一些设备的详细信息,不提供 IMEI、序列号。在 UIDevice 类中提供详细信息。

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] 名称];

关于ios - 如何以编程方式获取完整的 ios 设备详细信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31135421/

相关文章:

ios - base64EncodedString 返回不需要的反斜杠

android - 唯一标识每个设备,访问sencha web应用程序

android - 如何以编程方式获取 Nexus 7 序列号?

iphone - UITableViewCell 删除按钮没有出现

ios - 尝试在表格 View 中按日期对核心数据对象进行排序

ios - 如何在具有缩放填充模式的 tableViewHeader 中为 UIImageView 使用固定高度?

objective-c - 如何获取有关媒体文件的特定信息(持续时间、比特率、FPS 等)

c++ - 通过内部颜色过滤OpenCV轮廓

android - 为什么模拟器给出 IMEI 号码 000000000000000

ios - 如何让按钮执行动画?