The latest iPhone model cannot retrieve the Wi-Fi information it has connected to.

The latest iPhone model is unable to retrieve the Wi-Fi information it has connected to. The phone's operating system is iOS 26.1, and location permission has also been granted. "Access Wi-Fi Information" is also configured in the same way The following is the code I used to obtain Wi-Fi information:

func getCurrentWiFiInfo() -> String? { guard let interfaces = CNCopySupportedInterfaces() as? [String] else { return nil }

    for interface in interfaces {
        guard let info = CNCopyCurrentNetworkInfo(interface as CFString) as? [String: Any] else {
            continue
        }

        if let ssid = info[kCNNetworkInfoKeySSID as String] as? String,
           !ssid.isEmpty {
            return ssid
        }
    }
    return nil
}
The latest iPhone model cannot retrieve the Wi-Fi information it has connected to.
 
 
Q