本文介绍了如何在Swift中获取硬件详细信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

如何获取诸如CPU型号,CPU使用率,CPU空闲,RAM详细信息,存储详细信息等硬件信息?我使用Xcode 7.1.1和Swift2.我不需要make应用程序.我尝试了 UIDevice NSProcessInfo .我看到了几篇文章,但找不到任何解决方法.

How to get info of hardware like CPU Model, CPU usage, CPU idle, RAM Details, Storage details etc? I use Xcode 7.1.1 and Swift 2. I want no make app. I tried UIDevice, NSProcessInfo. I saw several posts but I don't find any solving.

推荐答案

大多数这些东西都可以通过一些较低级别的C API来揭示.这可能是您基于它们编写一些简单的Swift扩展的好机会,但是您仍然可以直接在Swift中编写C代码以获取答案.

Most of this stuff can be revealed with some of the lower level C APIs. This might be a good opportunity for you to write some simple Swift extensions based on them, but you can write C code directly in Swift to get your answers anyway.

我想获得荣誉,但是我将链接到其他人提供的一些答案:

I would love to take credit but I'll just link to some answers other people have provided:

这篇关于如何在Swift中获取硬件详细信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 23:48