<!--
{
  "availability" : [
    "iOS: 4.1.0 - 27.0.0",
    "iPadOS: 4.1.0 - 27.0.0",
    "macCatalyst: 14.0.0 - 27.0.0",
    "macOS: -",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "SystemConfiguration",
  "identifier" : "/documentation/SystemConfiguration/CNCopyCurrentNetworkInfo",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "System Configuration"
    ],
    "preciseIdentifier" : "c:@F@CNCopyCurrentNetworkInfo"
  },
  "title" : "CNCopyCurrentNetworkInfo"
}
-->

# CNCopyCurrentNetworkInfo

Returns the current network information for a given network interface.

```
CFDictionaryRefCNCopyCurrentNetworkInfo(CFStringRef interfaceName);
```

## Parameters

`interfaceName`

The network interface name.

## Return Value

A dictionary containing the interface’s current network information, provided certain requirements are met (see Discussion section). If the requirements are not met, the return value is either a dictionary with pseudo-values or `NULL`. If an error occurs, the return value is `NULL`.

## Discussion

The returned dictionary contains the following keys and values:

|Key                                                                                                |Value type                                                           |
|---------------------------------------------------------------------------------------------------|---------------------------------------------------------------------|
|``doc://com.apple.systemconfiguration/documentation/SystemConfiguration/kCNNetworkInfoKeySSIDData``|<doc://com.apple.documentation/documentation/CoreFoundation/CFData>  |
|``doc://com.apple.systemconfiguration/documentation/SystemConfiguration/kCNNetworkInfoKeySSID``    |<doc://com.apple.documentation/documentation/CoreFoundation/CFString>|
|``doc://com.apple.systemconfiguration/documentation/SystemConfiguration/kCNNetworkInfoKeyBSSID``   |<doc://com.apple.documentation/documentation/CoreFoundation/CFString>|

Ownership of the returned dictionary follows the [The Create Rule](https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/Concepts/Ownership.html#//apple_ref/doc/uid/20001148-103029). You are responsible for releasing the returned value.

## Discussion

The requesting app must meet one of the following requirements:

- The app uses <doc://com.apple.documentation/documentation/CoreLocation>, and has the user’s authorization to use location information.
- The app uses the <doc://com.apple.documentation/documentation/NetworkExtension/NEHotspotConfiguration> API to configure the current Wi-Fi network.
- The app has an active VPN configuration installed.
- The app has an active <doc://com.apple.documentation/documentation/NetworkExtension/NEDNSSettingsManager> configuration installed.

If the requesting app is a Mac app built with Mac Catalyst, it must meet the following requirements:

- The app uses <doc://com.apple.documentation/documentation/CoreLocation>, and has the user’s authorization to use location information.
- The app includes the <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.developer.networking.wifi-info>.
- The app runs in macOS 11 or later.

An app that fails to meet the above requirements receives the following return value:

- An app linked against iOS 12 or earlier receives a dictionary with pseudo-values. In this case, the SSID is `Wi-Fi` (or `WLAN` in China mainland), and the BSSID is `00:00:00:00:00:00`.
- An app linked against iOS 13 or later receives `NULL`.

> Important:
> To use this function, an app linked against iOS 12 or later must enable the Access WiFi Information capability in Xcode. For more information, see <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.developer.networking.wifi-info>. Calling this function without the entitlement always returns `NULL` when linked against iOS 12 or later.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)