<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 8.0.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/URLRequest/networkServiceType-swift.property",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation10URLRequestV18networkServiceTypeSo019NSURLRequestNetworkdE0Vvp"
  },
  "title" : "networkServiceType"
}
-->

# networkServiceType

The type of network service for all tasks within network sessions to enable Cellular Network Slicing.

```
var networkServiceType: URLRequest.NetworkServiceType { get set }
```

## Discussion

There are two steps to enable Cellular Network Slicing:

- Set the entitlements in your property list for <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.developer.networking.slicing.appcategory> and <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.developer.networking.slicing.trafficcategory>. If you don’t entitle your app by specifying both these entitlements, your apps network connections won’t be using Cellular Network Slicing, even if supported by the carrier.
- At the time of network flow creation, set this to the appropriate [`NSURLRequest.NetworkServiceType`](/documentation/Foundation/NSURLRequest/NetworkServiceType-swift.enum) for your application type.

---

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)