Replacement for _stdlib_getDemangledTypeName () in Swift 2.2

The latest version of Swift 2.2 removes _stdlib_getDemangledTypeName().

What are my options for replacement?

I am currently using debugging messages like this:

let debugStr = "\(_stdlib_getDemangledTypeName(self)) -> \(self.versionString) (\(self.versionInfo))"
+4
source share
1 answer

You can get beautiful descriptions of type names through the initializer String. This is enough to replace _stdlib_getDemangledTypeName.

Example:

String(self.dynamicType)
+17
source

Source: https://habr.com/ru/post/1626160/


All Articles