---
title: copyAppRules()
framework: networkextension
role: symbol
role_heading: Instance Method
path: networkextension/netunnelprovidermanager/copyapprules()
---

# copyAppRules()

Returns a copy of the app rules currently set in the configuration.

## Declaration

```swift
func copyAppRules() -> [NEAppRule]?
```

## Mentioned in

Routing your VPN network traffic

## Return Value

Return Value An array of NEAppRule objects, or nil if the configuration doesn’t have any app rules.

## Discussion

Discussion This method provides read-only access to the configuration’s app rules.

## See Also

### Managing tunnel configurations

- [loadAllFromPreferences(completionHandler:)](networkextension/netunnelprovidermanager/loadallfrompreferences(completionhandler:).md)
