---
title: "loadAllManagersFromPreferences(completionHandler:)"
framework: Network Extension
role: symbol
role_heading: Type Method
platforms: [iOS 17.0+, iPadOS 17.0+, Mac Catalyst 17.0+, macOS 14.0+, tvOS 17.0+, visionOS 1.0+]
path: "networkextension/nerelaymanager/loadallmanagersfrompreferences(completionhandler:)"
---

# loadAllManagersFromPreferences(completionHandler:)

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

## Declaration

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

```swift
class func loadAllManagersFromPreferences() async throws -> [NERelayManager]
```

## Parameters

- `completionHandler`: A block that receives an array of doc://com.apple.networkextension/documentation/NetworkExtension/NERelayManager objects. If the system failed to read any doc://com.apple.networkextension/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.
