Skip to content

Instantly share code, notes, and snippets.

View LacertosusRepo's full-sized avatar
🏂
Working hard (kinda)

LacertosusDeus LacertosusRepo

🏂
Working hard (kinda)
View GitHub Profile
@LacertosusRepo
LacertosusRepo / notifications.m
Last active March 11, 2021 06:53 — forked from cppforlife/gist:3731520
Log local notifications.
void printNotification(CFNotificationCenterRef center, void *observer, CFStringRef name, const void *object, CFDictionaryRef userInfo) {
if([(__bridge NSString *)name containsString:@"UIViewAnimation"]) {
return;
}
os_log(OS_LOG_DEFAULT, "name: %@\ninfo: %@\ncenter: %@", name, userInfo, center);
}
%ctor {
CFNotificationCenterAddObserver(CFNotificationCenterGetLocalCenter(), NULL, printNotification, NULL, NULL, CFNotificationSuspensionBehaviorDeliverImmediately);