I\'ve noticed that a Swift Class is renamed in objective-c runtime. So if I had a class in swift named ViewController
and the name of my app was TestRunti
The description is build up in the following 3 sections
Functions are a special case here. The description will also has some information about the function signature.
For example you could have a _TtCFCC5MyApp7MyClass10MySubClass6myFuncFS0_FT_T_L_11MySubSubClass
This would be the description of the MySubSubClass in the following code:
class MyClass {
class MySubClass {
func myFunc() {
class MySubSubClass {
}
}
}
}
Here you can find some sample code that will parse that description into easy to use properties and arrays.
Update: Demangle is now converted to swift. You can find it here: https://github.com/mattgallagher/CwlDemangle/blob/master/CwlDemangle/CwlDemangle.swift
They're not random. They're the length of the following value. This is similar to common C++ name mangling and supports identifiers that may have fairly arbitrary characters in them without needing some new separator character. It also can make them easier to parse, especially in C.
In this particular case, it's _TtC
then "an eleven character module name" then the module name and then "a fourteen character class name" and the class name. I assume C
is class. Not sure about Tt
(maybe "type").