---
title: "init(domainName:roamingEnabled:)"
framework: networkextension
role: symbol
role_heading: Initializer
path: "networkextension/nehotspoths20settings/init(domainname:roamingenabled:)"
---

# init(domainName:roamingEnabled:)

Creates a new hotspot configuration of a legacy Hotspot or HS 2.0 Wi-Fi network. with optional roaming enabled.

## Declaration

```swift
init(domainName: String, roamingEnabled: Bool)
```

## Parameters

- `domainName`: The domain name of a Hotspot 2.0 Wi-Fi network. See doc://com.apple.networkextension/documentation/NetworkExtension/NEHotspotHS20Settings/domainName.
- `roamingEnabled`: A Boolean value indicating whether roaming is enabled on the network (true) or not (false).
