<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "NetworkExtension",
  "identifier" : "/documentation/NetworkExtension/NERelayManager/loadAllManagersFromPreferences(completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Network Extension"
    ],
    "preciseIdentifier" : "c:objc(cs)NERelayManager(cm)loadAllManagersFromPreferencesWithCompletionHandler:"
  },
  "title" : "loadAllManagersFromPreferences(completionHandler:)"
}
-->

# loadAllManagersFromPreferences(completionHandler:)

Asynchronously reads all the relay configurations previously created and saved by the calling app.

```
class func loadAllManagersFromPreferences(completionHandler: @escaping @Sendable ([NERelayManager], (any Error)?) -> Void)
```

## Parameters

`completionHandler`

A block that receives an array of [`NERelayManager`](/documentation/NetworkExtension/NERelayManager) objects. If the system failed to read any [`NERelay`](/documentation/NetworkExtension/NERelay) configurations read from the disk, the array is passes to the block is empty. The <doc://com.apple.documentation/documentation/Foundation/NSError> passed to this block is `nil` if the load operation succeeded, non-`nil` otherwise.

---

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)