<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "ObjectiveC",
  "identifier" : "/documentation/ObjectiveC/NSObjectProtocol/conforms(to:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Objective-C Runtime"
    ],
    "preciseIdentifier" : "c:objc(pl)NSObject(im)conformsToProtocol:"
  },
  "title" : "conforms(to:)"
}
-->

# conforms(to:)

Returns a Boolean value that indicates whether the receiver conforms to a given protocol.

```
func conforms(to aProtocol: Protocol) -> Bool
```

## Parameters

`aProtocol`

A protocol object that represents a particular protocol.

## Return Value

[`YES`](/documentation/ObjectiveC/YES) if the receiver conforms to `aProtocol`, otherwise [`NO`](/documentation/ObjectiveC/NO).

## Discussion

This method works identically to the [`conforms(to:)`](/documentation/ObjectiveC/NSObject-swift.class/conforms(to:)) class method declared in [`NSObject`](/documentation/ObjectiveC/NSObject-swift.class). It’s provided as a convenience so that you don’t need to get the class object to find out whether an instance can respond to a given set of messages.

---

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)