Free CoreTemp Monitor for iOS devices


A simple API for read AlCPU CoreTemp data to make your own Monitor App for iOS, macOS, watchOS or tvOS.


Use Swift Package Manager to add this package to your project.

Definition & Interface

public convenience init(ip: String, port: String , using: NWParameters)
  • ip (String): endpoint of machine where CoreTempServer is running.
  • port (String): the port number where CoreTempServer is publishing the data.
  • using (NWParameters): enumerated that defines the protocol to read data.


All data info has been strcutured in following objects

import Foundation
struct CpuInfo: Codable {
    var uiLoad: [Int]?
    var uiTjMax: [Int]?
    var uiCoreCnt: Int?
    var uiCPUCnt: Int?
    var fTemp: [Int]?
    var fVID: Float?
    var fCPUSpeed: Float?
    var fFSBSpeed: Float?
    var fMultiplier: Int?
    var CPUName: String?
    var ucFahrenheit: Int?
    var ucDeltaToTjMax: Int?
    var ucTdpSupported: Int?
    var ucPowerSupported: Int?
    var uiStructVersion: Int?
    var  uiTdp: [Int]?
    var fPower: [Float]?
    var fMultipliers: [Int]?

struct MemoryInfo: Codable {
    var TotalPhys: Int64?
    var FreePhys: Int64?
    var TotalPage: Int64?
    var FreePage: Int64?
    var TotalVirtual: Int64?
    var FreeVirtual: Int64?
    var FreeExtendedVirtual: Int?
    var MemoryLoad: Int?

public struct CoreTempObject: Codable {
    var CpuInfo: CpuInfo?
    var MemoryInfo: MemoryInfo?

The most relevant info for this objects is:

  • ucFahrenheit, ucDeltaToTjMax, ucTdpSupported and ucPowerSupported represent boolean values. 0 = false, 1 = true.
  • If ucFahrenheit is true, the temperature is reported in Fahrenheit.
  • If ucDeltaToTjMax is true, the temperature reported represents the distance from TjMax.
  • If ucTdpSupported is true, processor TDP information in the uiTdp array is valid.
  • If ucPowerSupported is true, processor power consumption information in the fPower array is valid.

Use each one for design your monitor.

Usage example


Object instance runs the socket read. If you want to stop the reading call stop() function directly.

import UIKit
import CoreTempMonitorSwift

class ViewController: UIViewController {
    let sManager = SocketManager(ip: "", port: "5200", using: .tcp)
    override func viewDidLoad() {
        sManager.delegate = self
    @IBAction func stop_tapped(_ sender: Any) {

extension ViewController: CoreTempMonitorSwiftDelegate {
    func didReadData(data: CoreTempObject) {
        //do something


David Martin Saiz –

Distributed under the MIT license. See LICENSE for more information.

Version History

  • 0.0.1
    • First implementation with main features.


  • Swift Tools 5.0.0


  • None
Last updated: Tue Jan 12 2021 07:26:26 GMT-0500 (GMT-05:00)