Skip to content

Instantly share code, notes, and snippets.

View 0x8badf00d's full-sized avatar

0x8badf00d 0x8badf00d

View GitHub Profile
@krzysztofzablocki
krzysztofzablocki / gist:4396302
Last active November 24, 2021 19:17
Set symbol breakpoint on objc_msgSend then setup this debug command to log all methods called in iOS Simulator. If you want to do device debugging change esp+4 register to r0, esp+8 to r1 Found long ago somewhere on stackoverflow.
expr -- (void)printf("[%s, %s]\n",(char *) object_getClassName(*(long*)($esp+4)), (char *) *(long *)($esp+8) )
@breeno
breeno / NSNotificationCenter+ObserverAdditions.h
Created January 18, 2012 17:29
Simplifying NSNotificationCenter block based observers
#import <Foundation/Foundation.h>
@interface NSNotificationCenter (ObserverAdditions)
-(void) registerObserver: (id) observer
forName: (NSString *)name
object:(id)obj
queue:(NSOperationQueue *)queue
usingBlock:(void (^)(NSNotification *))block;