---
title: joinOnce
framework: networkextension
role: symbol
role_heading: Instance Property
path: networkextension/nehotspotconfiguration/joinonce
---

# joinOnce

Restricts the lifetime of a configuration to the operating status of the app that created it.

## Declaration

```swift
var joinOnce: Bool { get set }
```

## Discussion

Discussion Optional. When joinOnce is set to true, the hotspot remains configured and connected only as long as the app that configured it is running in the foreground. The hotspot is disconnected and its configuration is removed when any of the following events occurs: The app stays in the background for more than 15 seconds. The device sleeps. The app crashes, quits, or is uninstalled. The app connects the device to a different Wi-Fi network. The user connects the device to a different Wi-Fi network. To disconnect the device from a hotspot configured with joinOnce set to true, call removeConfiguration(forSSID:).

## See Also

### Accessing configuration properties

- [ssid](networkextension/nehotspotconfiguration/ssid.md)
- [ssidPrefix](networkextension/nehotspotconfiguration/ssidprefix.md)
- [lifeTimeInDays](networkextension/nehotspotconfiguration/lifetimeindays.md)
- [hidden](networkextension/nehotspotconfiguration/hidden.md)
