---
title: "protocol_getMethodDescription(_:_:_:_:)"
framework: Objective-C Runtime
role: symbol
role_heading: Function
platforms: [iOS 2.0+, iPadOS 2.0+, Mac Catalyst 13.1+, macOS 10.5+, tvOS 9.0+, visionOS 1.0+, watchOS 1.0+]
path: "objectivec/protocol_getmethoddescription(_:_:_:_:)"
---

# protocol_getMethodDescription(_:_:_:_:)

Returns a method description structure for a specified method of a given protocol.

## Declaration

```swift
func protocol_getMethodDescription(_ proto: Protocol, _ aSel: Selector, _ isRequiredMethod: Bool, _ isInstanceMethod: Bool) -> objc_method_description
```

## Parameters

- `proto`: A protocol.
- `aSel`: A selector
- `isRequiredMethod`: A Boolean value that indicates whether aSel is a required method.
- `isInstanceMethod`: A Boolean value that indicates whether aSel is an instance method.

## Return Value

Return Value An objc_method_description structure that describes the method specified by aSel, isRequiredMethod, and isInstanceMethod for the protocol p.

## Discussion

Discussion If the protocol does not contain the specified method, returns an objc_method_description structure with the value {NULL, NULL}.

## See Also

### Working with Protocols

- [objc_getProtocol(_:)](objectivec/objc_getprotocol(_:).md)
- [objc_copyProtocolList(_:)](objectivec/objc_copyprotocollist(_:).md)
- [objc_allocateProtocol(_:)](objectivec/objc_allocateprotocol(_:).md)
- [objc_registerProtocol(_:)](objectivec/objc_registerprotocol(_:).md)
- [protocol_addMethodDescription(_:_:_:_:_:)](objectivec/protocol_addmethoddescription(_:_:_:_:_:).md)
- [protocol_addProtocol(_:_:)](objectivec/protocol_addprotocol(_:_:).md)
- [protocol_addProperty(_:_:_:_:_:_:)](objectivec/protocol_addproperty(_:_:_:_:_:_:).md)
- [protocol_getName(_:)](objectivec/protocol_getname(_:).md)
- [protocol_isEqual(_:_:)](objectivec/protocol_isequal(_:_:).md)
- [protocol_copyMethodDescriptionList(_:_:_:_:)](objectivec/protocol_copymethoddescriptionlist(_:_:_:_:).md)
- [protocol_copyPropertyList(_:_:)](objectivec/protocol_copypropertylist(_:_:).md)
- [protocol_getProperty(_:_:_:_:)](objectivec/protocol_getproperty(_:_:_:_:).md)
- [protocol_copyProtocolList(_:_:)](objectivec/protocol_copyprotocollist(_:_:).md)
- [protocol_conformsToProtocol(_:_:)](objectivec/protocol_conformstoprotocol(_:_:).md)
