---
title: "protocol_copyPropertyList(_:_:)"
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_copypropertylist(_:_:)"
---

# protocol_copyPropertyList(_:_:)

Returns an array of the properties declared by a protocol.

## Declaration

```swift
func protocol_copyPropertyList(_ proto: Protocol, _ outCount: UnsafeMutablePointer<UInt32>?) -> UnsafeMutablePointer<objc_property_t>?
```

## Parameters

- `proto`: A protocol.
- `outCount`: Upon return, contains the number of elements in the returned array.

## Return Value

Return Value A C array of pointers of type objc_property_t describing the properties declared by proto. Any properties declared by other protocols adopted by this protocol are not included. The array contains *outCount pointers followed by a NULL terminator. You must free the array with free().

## Discussion

Discussion If the protocol declares no properties, NULL is returned and *outCount is 0.

## 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_getMethodDescription(_:_:_:_:)](objectivec/protocol_getmethoddescription(_:_:_:_:).md)
- [protocol_getProperty(_:_:_:_:)](objectivec/protocol_getproperty(_:_:_:_:).md)
- [protocol_copyProtocolList(_:_:)](objectivec/protocol_copyprotocollist(_:_:).md)
- [protocol_conformsToProtocol(_:_:)](objectivec/protocol_conformstoprotocol(_:_:).md)
