---
title: "objc_copyProtocolList(_:)"
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/objc_copyprotocollist(_:)"
---

# objc_copyProtocolList(_:)

Returns an array of all the protocols known to the runtime.

## Declaration

```swift
func objc_copyProtocolList(_ outCount: UnsafeMutablePointer<UInt32>?) -> AutoreleasingUnsafeMutablePointer<Protocol>?
```

## Parameters

- `outCount`: Upon return, contains the number of protocols in the returned array.

## Return Value

Return Value A C array of all the protocols known to the runtime. The array contains *outCount pointers followed by a NULL terminator. You must free the list with free().

## Discussion

Discussion This function acquires the runtime lock.

## See Also

### Working with Protocols

- [objc_getProtocol(_:)](objectivec/objc_getprotocol(_:).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_getMethodDescription(_:_:_:_:)](objectivec/protocol_getmethoddescription(_:_:_:_:).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)
