<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/URLSessionConfiguration/allowsExpensiveNetworkAccess",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSURLSessionConfiguration(py)allowsExpensiveNetworkAccess"
  },
  "title" : "allowsExpensiveNetworkAccess"
}
-->

# allowsExpensiveNetworkAccess

A Boolean value that indicates whether connections may use a network interface that the system considers expensive.

```
var allowsExpensiveNetworkAccess: Bool { get set }
```

## Discussion

The system determines what constitutes “expensive” based on the nature of the network interface and other factors. iOS 13 considers most cellular networks and personal hotspots expensive. If there are no nonexpensive network interfaces available and the session’s [`allowsExpensiveNetworkAccess`](/documentation/Foundation/URLSessionConfiguration/allowsExpensiveNetworkAccess) property is <doc://com.apple.documentation/documentation/Swift/false>, any task created from the session fails. In this case, the error provided when the task fails has a [`networkUnavailableReason`](/documentation/Foundation/URLError/networkUnavailableReason-swift.property) property whose value is [`NSURLErrorNetworkUnavailableReasonExpensive`](/documentation/Foundation/NSURLErrorNetworkUnavailableReason/NSURLErrorNetworkUnavailableReasonExpensive).

You can limit your app’s of use of expensive network access to user-initiated tasks, and put off discretionary tasks until a nonexpensive interface becomes available. To do this, set [`allowsExpensiveNetworkAccess`](/documentation/Foundation/URLSessionConfiguration/allowsExpensiveNetworkAccess) (and [`allowsConstrainedNetworkAccess`](/documentation/Foundation/URLSessionConfiguration/allowsConstrainedNetworkAccess)) to <doc://com.apple.documentation/documentation/Swift/false> and [`waitsForConnectivity`](/documentation/Foundation/URLSessionConfiguration/waitsForConnectivity) to <doc://com.apple.documentation/documentation/Swift/true>. This way, your [`URLSessionTask`](/documentation/Foundation/URLSessionTask) waits for a suitable interface to become available before sending or receiving data.

To test the behavior of this property, you can override the device’s current values for cellular and Wi-Fi cost in Settings > Developer > Network Override.

> Tip:
> Prefer basing your app’s policy logic around the ``doc://com.apple.foundation/documentation/Foundation/URLSessionConfiguration/allowsConstrainedNetworkAccess`` property rather than this one. People using your app can use the “Low Data Mode” setting to set the constrained status, and thereby choose to use a potentially expensive network.

---

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)