<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/URLRequest/allowsExpensiveNetworkAccess",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation10URLRequestV28allowsExpensiveNetworkAccessSbvp"
  },
  "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 request’s [`allowsExpensiveNetworkAccess`](/documentation/Foundation/URLRequest/allowsExpensiveNetworkAccess) property is <doc://com.apple.documentation/documentation/Swift/false>, any task created from the request 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).

Setting this property on a request overrides the [`allowsExpensiveNetworkAccess`](/documentation/Foundation/URLSessionConfiguration/allowsExpensiveNetworkAccess) property of [`URLSessionConfiguration`](/documentation/Foundation/URLSessionConfiguration). For example, if the session configuration’s [`allowsExpensiveNetworkAccess`](/documentation/Foundation/URLSessionConfiguration/allowsExpensiveNetworkAccess) value is <doc://com.apple.documentation/documentation/Swift/false>, and you create a task from a request whose [`allowsExpensiveNetworkAccess`](/documentation/Foundation/URLRequest/allowsExpensiveNetworkAccess) is <doc://com.apple.documentation/documentation/Swift/true>, the task treats the value as <doc://com.apple.documentation/documentation/Swift/true>.

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.

---

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)