Get application icon image using Springboard (jailbreak)

I am developing a lockscreen application using theos, and some of the functions require icons for certain applications on the phone. How can I get these images and display them on a locked phone screen?

I tried everything that I could still think, and searched the headlines for springboards with no luck. I specifically tried to get images from SBApplication and SBIconModel from suggestions that I found through Google, but still no luck.

Any help is appreciated. Thanks!

+4
source share
2 answers

After you mix up the class, inside the method you use, follow these steps if, for example, you are trying to get an icon for a mail application

// Get the SBApplication for the mail app Class $SBApplicationController = objc_getClass("SBApplicationController"); SBApplication *mailApp = [[$SBApplicationController sharedInstance] applicationWithDisplayIdentifier:@"com.apple.mobilemail"]; // Get the SBApplicationIcon for the mail app SBApplicationIcon *mailAppIcon = [[objc_getClass("SBApplicationIcon") alloc] initWithApplication:mailApp]; 

It is important to get the correct DisplayIdentifier of the application that interests you.

Hope this help! any problems please scream.

+5
source

Although, I accept the above as an answer, I ended up using the following code, which displays the names and icons:

 SBIcon *sbIcon = [model applicationIconForDisplayIdentifier:identifier]; SBIconView *app = [[%c(SBIconView) alloc] initWithDefaultSize]; [app setIcon:sbIcon]; //if you want the titles to be conditional [app setLabelHidden:!titlesEnabled]; //if you want the badge view to be conditional id badgeView; if (device_version >= 6.0) badgeView = MSHookIvar<id>(app, "_accessoryView"); else badgeView = MSHookIvar<id>(app, "_badgeView"); if (badgeView) [badgeView setHidden:!badgesEnabled]; 
0
source

All Articles