NSLog([[UIDevice currentDevice] name]); // Name of the phone as named by user
NSLog([[UIDevice currentDevice] uniqueIdentifier]); // A GUID like string
NSLog([[UIDevice currentDevice] systemName]); // "iPhone OS"
NSLog([[UIDevice currentDevice] systemVersion]); // "2.2.1"
NSLog([[UIDevice currentDevice] model]); // "iPhone" on both devices
NSLog([[UIDevice currentDevice] localizedModel]); // "iPhone" on both devices
float version = [[[UIDevice currentDevice] systemVersion] floatValue];
取设备信息
获取iOS设备信息的Swift代码示例
最新推荐文章于 2022-05-15 12:15:00 发布
本文提供了一个Swift代码示例,展示了如何通过Objective-C桥接获取iOS设备的名称、唯一标识符、系统名称、系统版本和型号等信息。
5714

被折叠的 条评论
为什么被折叠?



