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

# handleNewFlow(_:)

Handle a new flow of network data.

```
func handleNewFlow(_ flow: NEAppProxyFlow) -> Bool
```

## Parameters

`flow`

The new [`NEAppProxyFlow`](/documentation/NetworkExtension/NEAppProxyFlow) object. If the App Proxy Provider decides to proxy the flow, it should create a reference to the flow in its data structures.

## Return Value

Return <doc://com.apple.documentation/documentation/Swift/true> to indicate that the App Proxy Provider will handle the flow. Return <doc://com.apple.documentation/documentation/Swift/false> to indicate that the flow should be closed.

## Discussion

This method is called by the system whenever an app which matches the current App Proxy configuration’s app rules opens a new network connection.

`NEAppProxyProvider` subclasses must override this method.

New flows are initially in an unopened state. The App Proxy Provider should take whatever steps are necessary to ready itself to handle the flow data and then open the flow.

---

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)