The Objective C runtime reference has the function class_getSuperclass for getting the superclass of a class. Is there anything similar for listing the direct ancestors of a protocol?
The Objective C runtime reference has the function class_getSuperclass for getting the superclass of
Share
There’s no such thing as ancestors, since protocols expand rather than inherit, hence you should look for siblings. The closest thing that I can give you is:
objc_protocol_listprotocol_conformsToProtocolupdate it seems i didn’t rtfm enough. Here’s the proper method:
protocol_copyProtocolList, which is described as