<!--
{
  "documentType" : "article",
  "framework" : "SystemConfiguration",
  "identifier" : "/documentation/SystemConfiguration/scnetworkreachability-g7d",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "SCNetworkReachability"
}
-->

# SCNetworkReachability

## Overview

> Important:
> All `SCNetworkReachability` functions are deprecated, because network conditions change too frequently for preflight reachability tests to be accurate and useful. Instead of trying to perform a preflight check, just attempt your connection. The connection may not be available immediately, but you can use <doc://com.apple.documentation/documentation/Foundation/URLSessionConfiguration/waitsForConnectivity> in your <doc://com.apple.documentation/documentation/Foundation/URLSessionConfiguration> to automatically connect as soon as it’s possible to do so. If you’re using the <doc://com.apple.documentation/documentation/Network> framework, you can monitor the state of an <doc://com.apple.documentation/documentation/Network/NWConnection> (<doc://com.apple.documentation/documentation/Network/nw_connection_t> in Objective-C), which lets you know when the connection is waiting for a change in connectivity before automatically proceeding. In limited cases, if you need to change a network request based on the network you’re using, use <doc://com.apple.documentation/documentation/Network/NWPathMonitor> to observe the system networking state.

The `SCNetworkReachability` programming interface allows an application to determine the status of a system’s current network configuration and the reachability of a target host. A remote host is considered reachable when a data packet, sent by an application into the network stack, can leave the local device. Reachability doesn’t guarantee that the data packet will actually be received by the host.

The `SCNetworkReachability` programming interface supports a synchronous and an asynchronous model. In the synchronous model, you get the reachability status by calling the [`SCNetworkReachabilityGetFlags(_:_:)`](/documentation/SystemConfiguration/SCNetworkReachabilityGetFlags(_:_:)) function. In the asynchronous model, you can schedule the `SCNetworkReachability` object on the run loop of a client object’s thread. The client implements a callback function to receive notifications when the reachability status of a given remote host changes. Note that these functions follow Core Foundation naming conventions. A function that has “Create” or “Copy” in its name returns a reference you must release with the <doc://com.apple.documentation/documentation/CoreFoundation/CFRelease> function.

For information about detecting and interpreting errors generated by calling these functions, see [System Configuration](/documentation/SystemConfiguration/system-configuration).

## Topics

### Creating a Reachability Reference

[`SCNetworkReachabilityCreateWithAddress(_:_:)`](/documentation/SystemConfiguration/SCNetworkReachabilityCreateWithAddress(_:_:))

Creates a reachability reference to the specified network address.

[`SCNetworkReachabilityCreateWithAddressPair(_:_:_:)`](/documentation/SystemConfiguration/SCNetworkReachabilityCreateWithAddressPair(_:_:_:))

Creates a reachability reference to the specified network address.

[`SCNetworkReachabilityCreateWithName(_:_:)`](/documentation/SystemConfiguration/SCNetworkReachabilityCreateWithName(_:_:))

Creates a reachability reference to the specified network host or node name.

### Determining Reachability Status

[`SCNetworkReachabilityGetFlags(_:_:)`](/documentation/SystemConfiguration/SCNetworkReachabilityGetFlags(_:_:))

Determines if the specified network target is reachable using the current network configuration.

### Preparing to Determine Reachability

[`SCNetworkReachabilityGetTypeID()`](/documentation/SystemConfiguration/SCNetworkReachabilityGetTypeID())

Returns the type identifier of all `SCNetworkReachability` instances.

[`SCNetworkReachabilitySetCallback(_:_:_:)`](/documentation/SystemConfiguration/SCNetworkReachabilitySetCallback(_:_:_:))

Assigns a client to the specified target, which receives callbacks when the reachability of the target changes.

[`SCNetworkReachabilityScheduleWithRunLoop(_:_:_:)`](/documentation/SystemConfiguration/SCNetworkReachabilityScheduleWithRunLoop(_:_:_:))

Schedules the specified network target with the specified run loop and mode.

[`SCNetworkReachabilityUnscheduleFromRunLoop(_:_:_:)`](/documentation/SystemConfiguration/SCNetworkReachabilityUnscheduleFromRunLoop(_:_:_:))

Unschedules the specified target from the specified run loop and mode.

[`SCNetworkReachabilitySetDispatchQueue(_:_:)`](/documentation/SystemConfiguration/SCNetworkReachabilitySetDispatchQueue(_:_:))

Schedules callbacks for the specified target on the specified dispatch queue.

### Callbacks

[`SCNetworkReachabilityCallBack`](/documentation/SystemConfiguration/SCNetworkReachabilityCallBack)

Type of callback function used when the reachability of a network address or name changes.

### Data Types

[`SCNetworkReachability`](/documentation/SystemConfiguration/SCNetworkReachability)

The handle to a network address or name.

[`SCNetworkReachabilityContext`](/documentation/SystemConfiguration/SCNetworkReachabilityContext)

Structure containing user-specified data and callbacks used with [`SCNetworkReachabilitySetCallback(_:_:_:)`](/documentation/SystemConfiguration/SCNetworkReachabilitySetCallback(_:_:_:)).

### Constants

[`SCNetworkReachabilityFlags`](/documentation/SystemConfiguration/SCNetworkReachabilityFlags)

Flags that indicate the reachability of a network node name or address, including whether a connection is required, and whether some user intervention might be required when establishing a connection.



---

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)