How to get hardware details in Swift?

后端 未结 3 1792
执念已碎
执念已碎 2021-01-05 13:12

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<

3条回答
  •  没有蜡笔的小新
    2021-01-05 13:25

    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:

    • Process info
    • SystemKit
    • DeviceGuru (in swift!)

提交回复
热议问题