I recently discovered the GDB in Xcode which makes up for some functionality which IMHO seems to be lacking in Xcode.
So I can do the following in GDB:
(gdb) po [LoginManager sharedSession].loginToken
20D52FE9-3573-437E-9A65-846572B63726
However, I have another Service class, which is currently not loaded so I get the following error:
(gdb) po [SessionService displaySessionInfoForToken:@"XXX"]
No symbol "SessionService" in current context.
I don't understand why the LoginManager can be loaded but not the SessionService.
Try using NSClassFromString, like this:
(gdb) po [NSClassFromString(@"SessionService") displaySessionInfoForToken:@"XXX"]
It's hard to say exactly what's going on, but using NSClassFromString may tickle the right thing in the runtime to do what you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With