Skip to content

Instantly share code, notes, and snippets.

@steipete
Last active December 13, 2015 17:29
Show Gist options
  • Save steipete/4948697 to your computer and use it in GitHub Desktop.
Save steipete/4948697 to your computer and use it in GitHub Desktop.
Hook onto NSNotificationCenter to see all notifications.
[[NSNotificationCenter defaultCenter] addObserverForName:nil object:nil queue:nil usingBlock:^(NSNotification *note) {
NSLog(@"%@: %@", note.name, note.userInfo);
}];
@steipete
Copy link
Author

I use CF at first for that, but turns out even the modern block-based API supports capturing everything (don't do this in production!)

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