Skip to content

Instantly share code, notes, and snippets.

@nickdowell
Created May 30, 2014 11:09
Show Gist options
  • Save nickdowell/bcac4213491e5516d7e9 to your computer and use it in GitHub Desktop.
Save nickdowell/bcac4213491e5516d7e9 to your computer and use it in GitHub Desktop.
#import <Foundation/Foundation.h>
#import <notify.h>
void test()
{
int notify_token;
notify_register_dispatch("com.apple.springboard.lockstate", &notify_token, dispatch_get_main_queue(), ^(int token) {
uint64_t state = UINT64_MAX;
notify_get_state(token, &state);
NSLog(@"com.apple.springboard.lockstate = %llu", state);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment