<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "NetworkExtension",
  "identifier" : "/documentation/NetworkExtension/NEHotspotManager/saveToPreferences()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Network Extension"
    ],
    "preciseIdentifier" : "s:16NetworkExtension16NEHotspotManagerC17saveToPreferencesyyYaKF"
  },
  "title" : "saveToPreferences()"
}
-->

# saveToPreferences()

Saves the HotspotManager configuration in the Network Extension preferences.

```
final func saveToPreferences() async throws
```

## Discussion

Only call this method after previously calling [`loadFromPreferences()`](/documentation/NetworkExtension/NEHotspotManager/loadFromPreferences()) to load the configuration.

This method throws [`NEHotspotManager.Error`](/documentation/NetworkExtension/NEHotspotManager/Error) value asynchronously on failure.

---

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)