How to Determine the Actual Wi-Fi Band (2.4GHz / 5GHz / 6GHz) on macOS Programmatically

I’m trying to determine the actual Wi-Fi band (e.g. 2.4GHz, 5GHz, or 6GHz) of the network that is currently connected on macOS.

I’m not looking for a heuristic based on the Wi-Fi name (SSID), such as checking whether it contains “5G” or “6G”. Instead, I want a reliable and accurate method that reflects the real connection parameters reported by the system.

Specifically, I’m interested in:

Whether macOS exposes the current Wi-Fi band or channel information through public APIs (e.g. CoreWLAN)

Or if there is any supported system-level way to retrieve this information programmatically

If this information is not directly accessible, I’d also like to understand:

Why macOS does not expose it

And whether there is a recommended alternative approach

Any insights or examples would be greatly appreciated.

Answered by DTS Engineer in 873921022

AFAIK this information is available from Core WLAN. See the various properties on CWChannel.

IMPORTANT Modern versions of macOS limit what Wi-Fi information you can access unless you have the Location privilege, as shown in System Settings > Privacy & Security. That restriction has been discussed on the forums many times. If you rummage through the posts with the Core WLAN tag, you’ll find a bunch of backstory.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

AFAIK this information is available from Core WLAN. See the various properties on CWChannel.

IMPORTANT Modern versions of macOS limit what Wi-Fi information you can access unless you have the Location privilege, as shown in System Settings > Privacy & Security. That restriction has been discussed on the forums many times. If you rummage through the posts with the Core WLAN tag, you’ll find a bunch of backstory.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

It’s better to reply as a reply, rather than in the comments; see Quinn’s Top Ten DevForums Tips for this and other titbits.

It works on macOS

Cool.

is it also possible on iOS?

Core WLAN is not available on iOS.

For a list of Wi-Fi APIs that are available in iOS, see TN3111 iOS Wi-Fi API overview. I don’t think that any of these return the information you’re looking for. The nearest that I can think of is fetchCurrent(completionHandler:), which returns some details, like the security type, but no channel info.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

How to Determine the Actual Wi-Fi Band (2.4GHz / 5GHz / 6GHz) on macOS Programmatically
 
 
Q