Skip to content

Instantly share code, notes, and snippets.

@kwylez
Created April 1, 2016 18:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kwylez/08c9079b08d118f7d9feb7db0f3672fc to your computer and use it in GitHub Desktop.
Save kwylez/08c9079b08d118f7d9feb7db0f3672fc to your computer and use it in GitHub Desktop.
- (void)executeLocalNotificationWithLaunchHookKey:(NSString *)launchHookKey
hookType:(RTVNotificationHookType)hookType
userInfo:(NSDictionary *)userInfo {
NSDictionary *dict = [self.notificationConfiguration notificationHooks];
NSSet *notificationIgnoreTypes = [self.notificationConfiguration notificationTypesToIgnore];
[dict enumerateKeysAndObjectsUsingBlock:^(NSString *key, id hook, BOOL *stop) {
if ([key isEqualToString:launchHookKey] && ![notificationIgnoreTypes containsObject:key]) {
void (^hookBlock)(NSDictionary *userInfo, RTVNotificationHookType hookType) = dict[key];
hookBlock(userInfo, hookType);
*stop = YES;
}
}];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment