Instantly share code, notes, and snippets.

Embed
What would you like to do?
If you add this content to your ~/.lldbinit you can launch the Reveal library from within your debugger as long as you have the library added to your app bundle. For more info please see my blog post: http://ios-coding.com/improved-way-to-integrate-reveal/
command alias reveal_load expr (void*)dlopen([(NSString*)[(NSBundle*)[NSBundle mainBundle] pathForResource:@"libReveal" ofType:@"dylib"] cStringUsingEncoding:0x4], 0x2);
command alias reveal_start expr (void)[(NSNotificationCenter*)[NSNotificationCenter defaultCenter] postNotificationName:@"IBARevealRequestStart" object:nil];
command alias reveal_stop expr (void)[(NSNotificationCenter*)[NSNotificationCenter defaultCenter] postNotificationName:@"IBARevealRequestStop" object:nil];
@forgot

This comment has been minimized.

forgot commented Apr 2, 2014

With ARC enabled, I had to add a second cast to NSString, changing the first line to

command alias reveal_load expr (void*)dlopen((NSString*)[(NSString*)[(NSBundle*)[NSBundle mainBundle] pathForResource:@"libReveal" ofType:@"dylib"] cStringUsingEncoding:0x4], 0x2);

Not very experience with this, and it took me a while to get it right, so I'm commenting in case anyone else has the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment