---
title: saveToPreferences()
framework: networkextension
role: symbol
role_heading: Instance Method
path: networkextension/neurlfiltermanager/savetopreferences()
---

# saveToPreferences()

Saves the URL filter configuration in the caller’s URL filter preferences.

## Declaration

```swift
func saveToPreferences() async throws
```

## Discussion

Discussion If the URL filter is enabled, this call causes it to become active.

## See Also

### Working with the filter configuration

- [setConfiguration(pirServerURL:pirPrivacyPassIssuerURL:pirAuthenticationToken:controlProviderBundleIdentifier:)](networkextension/neurlfiltermanager/setconfiguration(pirserverurl:pirprivacypassissuerurl:pirauthenticationtoken:controlproviderbundleidentifier:).md)
- [loadFromPreferences()](networkextension/neurlfiltermanager/loadfrompreferences().md)
- [removeFromPreferences()](networkextension/neurlfiltermanager/removefrompreferences().md)
- [handleConfigChange()](networkextension/neurlfiltermanager/handleconfigchange().md)
