我需要在我的 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/