Call class methods in iOS simulator with lldb

Say you’ve got a class method which you call like this:

[MyClass myClassMethod];

lldb won’t let you print that however, giving error messages like:

error: use of undeclared identifier

The solution is:

po [[(Class)objc_getClass(“MyClass”) class] myClassMethod]

which does the job.

Leave a Reply

Your email address will not be published. Required fields are marked *