<!--
{
  "availability" : [
    "iOS: 2.0.0 - 17.4.0",
    "iPadOS: 2.0.0 - 17.4.0",
    "macCatalyst: 13.1.0 - 17.4.0",
    "macOS: 10.3.0 - 14.4.0",
    "tvOS: -",
    "visionOS: 1.0.0 - 1.1.0"
  ],
  "documentType" : "symbol",
  "framework" : "SystemConfiguration",
  "identifier" : "/documentation/SystemConfiguration/SCNetworkReachabilitySetCallback(_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "System Configuration"
    ],
    "preciseIdentifier" : "c:@F@SCNetworkReachabilitySetCallback"
  },
  "title" : "SCNetworkReachabilitySetCallback(_:_:_:)"
}
-->

# SCNetworkReachabilitySetCallback(_:_:_:)

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

```
func SCNetworkReachabilitySetCallback(_ target: SCNetworkReachability, _ callout: SCNetworkReachabilityCallBack?, _ context: UnsafeMutablePointer<SCNetworkReachabilityContext>?) -> Bool
```

## Parameters

`target`

The network reference associated with the address or name to be checked for reachability.

`callout`

The function to be called when the reachability of the target changes. If `NULL`, the current client for the target is removed.

`context`

The reachability context associated with the callout. This value may be `NULL`.

## Return Value

`TRUE` if the notification client was successfully set; otherwise, `FALSE`.

## Discussion

---

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)