<!--
{
  "availability" : [
    "iOS: 9.0.0 - 18.0.0",
    "iPadOS: 9.0.0 - 18.0.0",
    "macCatalyst: 13.1.0 - 18.0.0",
    "macOS: 10.11.0 - 15.0.0",
    "tvOS: 17.0.0 - 18.0.0",
    "visionOS: 1.0.0 - 2.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "NetworkExtension",
  "identifier" : "/documentation/NetworkExtension/NWTCPConnection/hasBetterPath",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Network Extension"
    ],
    "preciseIdentifier" : "c:objc(cs)NWTCPConnection(py)hasBetterPath"
  },
  "title" : "hasBetterPath"
}
-->

# hasBetterPath

If a connection has a better path, new connections would use a different interface.

```
var hasBetterPath: Bool { get }
```

## Discussion

Evaluates to <doc://com.apple.documentation/documentation/Swift/true> if a new connection attempt to the remote endpoint would use a different and preferred path. If the current connection is not viable, this can be used as a hint to try again. If the current connection is still viable, this can indicate that the system or user has a preference for the newly available network path. For example, if the connection is established over a cellular data network and Wi-Fi is now available, then the connection has a better path available and this property is set to <doc://com.apple.documentation/documentation/Swift/true>. Use the `initWithUpgradeForConnection:` initializer to create a new connection with the same parameters as the current connection. Use Key-Value Observing to watch this property.

## See Also

[`isViable`](/documentation/NetworkExtension/NWTCPConnection/isViable)

The viability of a TCP connection indicates whether or not data can be transferred.



---

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)