Contents

disableSlicing()

Disables network slicing for new connections.

Declaration

final func disableSlicing() async throws

Discussion

Call this method to stop using network slicing for your app. After calling this method, new network connections that your app establishes use the carrier’s default cellular internet without slice-specific routing.

do {
    try await CTSlicingManager.shared.disableSlicing()
    // New connections use the default cellular internet.
    // Existing connections remain on their current slice.
} catch POSIXError.ENOTSUP {
    print("Network slicing operation isn't currently available.")
} catch {
    print("Failed to disable slicing: \(error)")
}

See Also

Managing network slicing