Skip to content

Instantly share code, notes, and snippets.

@jontelang
Created March 13, 2013 17:21
Show Gist options
  • Save jontelang/5154260 to your computer and use it in GitHub Desktop.
Save jontelang/5154260 to your computer and use it in GitHub Desktop.
alarm
%hook SBIcon
@interface SBIcon
-(void)setBadge:(NSString*)badge;
@end
-(void)viewWillAppear:(BOOL)animated{
%orig;
NSLog(@" 0 00- ---- - ---- -- - - - -- - -- -- -- - - -- --- -- - - -- - -- - -- - - -- - - -");
NSLog(@" 0 00- ---- - ---- -- - - - -- - -- -- -- - - -- --- -- - - -- - -- - -- - - -- - - -");
NSLog(@" 0 00- ---- - ---- -- - - - -- - -- -- -- - - -- --- -- - - -- - -- - -- - - -- - - -");
NSLog(@" 0 00- ---- - ---- -- - - - -- - -- -- -- - - -- --- -- - - -- - -- - -- - - -- - - -");
NSLog(@" 0 00- ---- - ---- -- - - - -- - -- -- -- - - -- --- -- - - -- - -- - -- - - -- - - -");
NSLog(@" 0 00- ---- - ---- -- - - - -- - -- -- -- - - -- --- -- - - -- - -- - -- - - -- - - -");
NSLog(@" 0 00- ---- - ---- -- - - - -- - -- -- -- - - -- --- -- - - -- - -- - -- - - -- - - -");
NSLog(@" 0 00- ---- - ---- -- - - - -- - -- -- -- - - -- --- -- - - -- - -- - -- - - -- - - -");
NSLog(@" 0 00- ---- - ---- -- - - - -- - -- -- -- - - -- --- -- - - -- - -- - -- - - -- - - -");
//[super viewWillAppear:animated];
[self setBadge:@"did load"];
}
-(id)displayName{
//NSString *o = %orig;
return @"dd";
/*if( [o isEqualToString:@"Clock"] ){
NSDictionary *d = [[NSDictionary alloc] initWithContentsOfFile:@"/var/mobile/Library/Preferences/com.apple.mobiletimer.plist"];
NSArray *a = [d valueForKey:@"Alarms"];
NSDictionary *x = [a objectAtIndex:0];
NSString *nextAlarm = [NSString stringWithFormat:@"%@:%@",
[x valueForKey:@"hour"],
[x valueForKey:@"minute"]];
[self setBadge:nextAlarm];
}*/
//return o;
}
%end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment