Last active
November 26, 2023 05:51
-
-
Save kylehowells/8625390 to your computer and use it in GitHub Desktop.
Pseudo code for creating a notification on iOS 7 in SpringBoard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//SBBulletinBannerController | |
-(BBBulletinRequest*)showTestBanner:(NSString*)something { | |
//r14 = self | |
//r15 = something | |
static NSInteger testCount = 0; | |
BBBulletinRequest *request = [[BBBulletinRequest alloc] init]; | |
[request setBulletinID:something]; | |
[request setTitle:something]; | |
[request setMessage:[NSString stringWithFormat:@"Fake iTunes notification %ld", testCount]]; | |
[request setSectionID:[rbx bulletinID]]; | |
BBAction *action = [BBAction actionWithLaunchBundleID:@"com.apple.mobilesafari" callblock:nil]; | |
[request setDefaultAction:rax]; | |
[request setAccessoryStyle:0x4]; | |
BOOL playSound = [[NSUserDefaults standardUserDefaults] boolForKey:@"SBTestBannerPlaysTextTone"]; | |
if (playSound != NO) { | |
BBSound *sound = [[[BBSound alloc] initWithToneAlert:0x2] autorelease]; | |
[request setSound:sound]; | |
} | |
// *(r14 + *0x1004c9cb8) = an iVar? | |
[self observer:*(r14 + *0x1004c9cb8) addBulletin:request forFeed:0x2]; | |
[request release]; // autorelease (safer) | |
testCount++; | |
//*0x1004eea48 = *0x1004eea48 + 0x1; | |
return request; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment