Skip to content

Instantly share code, notes, and snippets.

@breeno
Created October 16, 2013 15:57
Show Gist options
  • Select an option

  • Save breeno/7010222 to your computer and use it in GitHub Desktop.

Select an option

Save breeno/7010222 to your computer and use it in GitHub Desktop.

Revisions

  1. breeno created this gist Oct 16, 2013.
    16 changes: 16 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    CFNotificationCenterAddObserver(CFNotificationCenterGetLocalCenter(),
    NULL,
    notificationCenterHookProc,
    NULL,
    NULL,
    CFNotificationSuspensionBehaviorDeliverImmediately);


    void notificationCenterHookProc (CFNotificationCenterRef center,
    void *observer,
    CFStringRef name,
    const void *object,
    CFDictionaryRef userInfo)
    {
    NSLog(@"name: %@ userInfo:%@", name, userInfo);
    }