---
title: NEOnDemandRuleConnect
framework: networkextension
role: symbol
role_heading: Class
path: networkextension/neondemandruleconnect
---

# NEOnDemandRuleConnect

A VPN On Demand rule that connects the VPN.

## Declaration

```swift
class NEOnDemandRuleConnect
```

## Overview

Overview When rules of this class match, the system starts the VPN connection whenever an application running on the system opens a network connection.

## Relationships

### Inherits From

- [NEOnDemandRule](networkextension/neondemandrule.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)

## See Also

### Settings

- [NEOnDemandRuleDisconnect](networkextension/neondemandruledisconnect.md)
- [NEOnDemandRuleIgnore](networkextension/neondemandruleignore.md)
- [NEOnDemandRuleEvaluateConnection](networkextension/neondemandruleevaluateconnection.md)
- [NEOnDemandRule](networkextension/neondemandrule.md)
