<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Network",
  "identifier" : "/documentation/Network/NWProtocolFramer/Instance/prependApplicationProtocolIgnoringReady(options:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Network"
    ],
    "preciseIdentifier" : "s:7Network16NWProtocolFramerC8InstanceC39prependApplicationProtocolIgnoringReady7optionsyAA0B7OptionsC_tKF"
  },
  "title" : "prependApplicationProtocolIgnoringReady(options:)"
}
-->

# prependApplicationProtocolIgnoringReady(options:)

Dynamically add a protocol to a connection establishment
attempt “above” the framer protocol. This means that the
protocol above will start running once the framer becomes
ready by calling markReady(). This can only
be used with framers that return a value of
willMarkReady to their start
handlers. An example of using this functionality is
adding a security protocol, like TLS, above a framer
once that framer completes its initial handshake.

```
final func prependApplicationProtocolIgnoringReady(options: NWProtocolOptions) throws
```

## Parameters

`options`

Protocol options for an application
protocol to dynamically add “above” the framer.

## Discussion

To ensure thread safety, this function can only be called
in one of the callback blocks invoked on the framer, or
in a block passed to NWProtocolFramer.Instance.async().

Throws an error if the protocol could not be added.

This function differs from prependApplicationProtocol when
the framer has already been marked ready.
prependApplicationProtocol will throw an error if the framer was marked ready.
prependApplicationProtocolIgnoringReady will still add the protocol and
reset ready. The framer must markReady again.

If there is data in-flight on the connection, the behavior is undefined.

---

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)