ios设备名称列表
我在我的应用程序中使用了这个函数来返回我的设备的型号名称并且工作得很好,但是我如何找到这个函数返回值的完整列表(es for iphone3,3gs,4s,ipad,ipad2,ipod ecc ecc
size_t size;
sysctlbyname("hw.machine", NULL, &size, NULL, 0);
char *machine = malloc(size);
sysctlbyname("hw.machine", machine, &size, NULL, 0);
NSString *platform = [NSString stringWithCString:machine];
free(machine);
return platform;
谢谢
i have used this function in my app for return the model name of my device and work very well, but how i can find a complete list of the returned value for this function (es for iphone3,3gs,4s,ipad,ipad2,ipod ecc ecc
size_t size;
sysctlbyname("hw.machine", NULL, &size, NULL, 0);
char *machine = malloc(size);
sysctlbyname("hw.machine", machine, &size, NULL, 0);
NSString *platform = [NSString stringWithCString:machine];
free(machine);
return platform;
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您还可以使用
UIDevice
类获取移动操作系统的所有详细信息,如下所示:You can also use to get the all details of your mobile OS using
UIDevice
class as below:这里显示了所有硬件标识符的更新列表。
Here's an updated list that shows all the hardware identifiers.