Returns an array of all the protocols known to the runtime.
SDKs
- iOS 2.0+
- macOS 10.5+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Objective-C Runtime
Declaration
func objc_copyProtocolList(_ outCount: Unsafe Mutable Pointer<UInt32>?) -> Autoreleasing Unsafe Mutable Pointer<Protocol>?
Parameters
outCount
Upon return, contains the number of protocols in the returned array.
Return Value
A C array of all the protocols known to the runtime. The array contains *out
pointers followed by a NULL
terminator. You must free the list with free()
.
Discussion
This function acquires the runtime lock.