<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "NetworkExtension",
  "identifier" : "/documentation/NetworkExtension/NEHotspotConfiguration/joinOnce",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Network Extension"
    ],
    "preciseIdentifier" : "c:objc(cs)NEHotspotConfiguration(py)joinOnce"
  },
  "title" : "joinOnce"
}
-->

# joinOnce

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

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

## 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:)`](/documentation/NetworkExtension/NEHotspotConfigurationManager/removeConfiguration(forSSID:)).

---

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)