<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "NetworkExtension",
  "identifier" : "/documentation/NetworkExtension/NEFilterManager/loadFromPreferences(completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Network Extension"
    ],
    "preciseIdentifier" : "c:objc(cs)NEFilterManager(im)loadFromPreferencesWithCompletionHandler:"
  },
  "title" : "loadFromPreferences(completionHandler:)"
}
-->

# loadFromPreferences(completionHandler:)

Load the filter configuration from the Network Extension preferences.

```
func loadFromPreferences(completionHandler: @escaping @Sendable ((any Error)?) -> Void)
```

## Parameters

`completionHandler`

A block that takes an <doc://com.apple.documentation/documentation/Foundation/NSError> object. This block will be executed on the caller’s main thread after the load operation is complete. If the configuration does not exist in the Network Extension preferences or is loaded successfully, the error parameter will be nil. If an error occurred while loading the configuration, the error parameter will be set to an `NSError` object containing details about the error. See `NEFilterManagerError` for a list of possible errors.

## Discussion

You must call this method at least once before calling `saveToPreferencesWithCompletionHandler`: for the first time after your app launches.

---

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)