To preface: yes I know Mirror
exists. I don't see it as helpful for my usecase.
I'm a security researcher / reverse-engineer for macOS. I've gotten familiar with the Objective-C runtime methods: objc_*
, class_
, etc. They work nicely when trying to figure out what is on a give Objective-C class.
However, I have come across some instances where there appears to be an class where the superclass is Swift._SwiftObject
. In some of these cases, there are what appear to be methods on these classes, but they don't show up when I use class_copyMethodList
. I'm assuming that either Swift has it's own implementation of method lists, or I am looking through some obfuscated code (or perhaps both).
If it is, in any way, the former, are there Swift equivalents to class_copyMethodList
? I know libSwiftCore.dylib
exports a lot of swift_
methods. Many of which, seem to interface with the runtime. Are there ways to use those to get Swift-specific details about a given class?