I'm using Theos to develop a jailbreak tweak, and I need to get the Bundle ID of the current open application. I'm modifying SBBannerView.h
which is a SpringBoard header. I tried Using:
[[NSBundle mainBundle] bundleIdentifier]
and also:
[NSBundle mainBundle].bundleIdentifier
which should both give the bundle identifier of the app, but because I'm modifying the iOS Banner Notifications, I think it's always returning com.apple.springboard
because thats the object calling the notifications
how would I get the application bundle ID of the current app that I have displaying on screen?
for Instance, if I have the Settings.app open, what would I hook or call to get the bundle ID com.apple.Preferences
I'm sorry if I didn't explain too well
Thank you for everyones help
I figured it out, for anyone else who is trying to accomplish this:
SBApplication *frontApp = [(SpringBoard*)[UIApplication sharedApplication] _accessibilityFrontMostApplication];
NSString *currentAppDisplayID = [frontApp displayIdentifier];