A Boolean value that indicates whether connections may use a network interface that the system considers expensive.
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- tvOS 13.0+
- watchOS 6.0+
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
allows property is
NO, any task created from the session fails. In this case, the error provided when the task fails has a
network property whose value is
Limit your app’s of use of expensive network access to user-initiated tasks, and put off discretionary tasks until an nonexpensive interface becomes available. To do this, set
YES. This way, your
NSURLSession waits for a suitable interface to become available before sending or receiving data.