<!--
{
  "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/allowsConstrainedNetworkAccess",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSURLSessionConfiguration(py)allowsConstrainedNetworkAccess"
  },
  "title" : "allowsConstrainedNetworkAccess"
}
-->

# allowsConstrainedNetworkAccess

A Boolean value that indicates whether connections may use the network when the user has specified Low Data Mode.

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

## Discussion

In iOS 13 and later, users can set their device to use Low Data Mode as one of the Cellular Data Options in the Settings app. Users can turn on Low Data Mode to reduce your app’s network data usage. This property controls a URL session’s behavior when the user turns on Low Data Mode. If there are no nonconstrained network interfaces available and the session’s [`allowsConstrainedNetworkAccess`](/documentation/Foundation/URLSessionConfiguration/allowsConstrainedNetworkAccess) 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 [`NSURLErrorNetworkUnavailableReasonConstrained`](/documentation/Foundation/NSURLErrorNetworkUnavailableReason/NSURLErrorNetworkUnavailableReasonConstrained).

Limit your app’s of use of constrained network access to user-initiated tasks, and put off discretionary tasks until a nonconstrained interface becomes available. To do this, set [`allowsConstrainedNetworkAccess`](/documentation/Foundation/URLSessionConfiguration/allowsConstrainedNetworkAccess) (and [`allowsExpensiveNetworkAccess`](/documentation/Foundation/URLSessionConfiguration/allowsExpensiveNetworkAccess)) 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.

---

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)