Minimal native macOS menu bar app that shows the current Apple Silicon CPU/SoC temperature.
The Xcode project is named TemperatureIcon; the installed app appears as CPU Temperature.
Current menu bar format:
CPU 45°C
The screenshot is a cropped strip of the macOS menu bar. The app does not open a main window.
- macOS 14 or later.
- Apple Silicon Mac.
- Tested locally on a MacBook Air Apple Silicon where macOS exposed
PMU tdie*andPMU2 tdie*sensors. - Not intentionally limited to M4. The HID/IOKit method may work on other Apple Silicon M-series chips, but it is not guaranteed on every model.
- Intel Macs are not supported in the current implementation.
Apple does not provide a public stable API for reading Apple Silicon CPU/SoC temperature in Celsius. TemperatureIcon uses undocumented HID/IOKit sensor paths.
That means:
- Sensor names can change between M1, M2, M3, M4, and future generations.
- The app displays a representative die/SoC reading, not an official per-core temperature.
- It may stop working if Apple changes sensor access or permissions in a future macOS release.
- App Sandbox is disabled because HID/IOKit sensor reading may fail inside the sandbox.
TemperatureIcon/TemperatureIcon/
App/
TemperatureIconApp.swift
Monitoring/
TemperatureMonitor.swift
Sensors/
TemperatureReader.swift
SensorBridge.c
SensorBridge.h
TemperatureIcon-Bridging-Header.h
Views/
ContentView.swift
Assets.xcassets/
Sources/
SensorBridge/
temperature-cli/
TemperatureIcon/TemperatureIcon/App/TemperatureIconApp.swift: app entry point andMenuBarExtra.TemperatureIcon/TemperatureIcon/Monitoring/TemperatureMonitor.swift: current reading, 5-second timer, and menu bar formatting.TemperatureIcon/TemperatureIcon/Sensors/TemperatureReader.swift: chooses the CPU/SoC sensor reading.TemperatureIcon/TemperatureIcon/Sensors/SensorBridge.c: low-level HID/IOKit sensor access.Sources/temperature-cli: minimal CLI prototype used to validate sensor access before building the SwiftUI app.
Open:
TemperatureIcon/TemperatureIcon.xcodeproj
Select the TemperatureIcon scheme and press Run.
The app uses LSUIElement, so it appears only in the menu bar and not in the Dock.
Build:
swift buildList detected temperature sensors:
.build/debug/temperature-cli --listPrint the selected CPU/SoC reading:
.build/debug/temperature-cliLocal review before sharing:
- No network requests.
- No
URLSession, sockets, or HTTP APIs. - No external command execution.
- No access to user documents.
- No Keychain usage.
- No tokens, secrets, or credentials.
- Only reads temperature sensors via HID/IOKit and updates menu bar text.
- Stats documents that Apple Silicon CPU/GPU sensors are thermal zones and that Apple changes sensor keys between SoCs.
- mactop uses
IOKit/IOHIDEventSystemClientfor Apple Silicon monitoring. - apple_sensors write-up explains the HID approach for reading temperatures on M-series Macs.
MIT 🗿