Check if app has a notfication using private frame

2019-02-19 08:00发布

I'm writing a mobilesubstrate tweak for jailbroken devices that displays an icon in the statusbar if a defined app has a notification using libstatusbar

I'm having trouble locating where iOS keeps this notification info for each app. Could anyone point me in the right direction/framework?

I don't intend on submitting this to Apple, again it's for jailbroken devices.

Thanks SO.

2条回答
我想做一个坏孩纸
2楼-- · 2019-02-19 08:31

I believe there are two notifications which looks similar, but internally goes through different execution routes: local notification and remote push notifications.

I don't have exact answer. Couple of ideas, direction, where I would look for:

API's in private framework SpringboardServices

  • Objective C SBSPushStore class
  • Bunch of C API's SBSPush*

There is ApplePushService private framework. I believe it provides a connection through which remote notifications are received.

Also, there is a BulletinBoardService. I believe this one is related to showing the list of notifications. My guess, that it may store notifications.

查看更多
再贱就再见
3楼-- · 2019-02-19 08:44

After looking through the file system I found my answer. To get application notification count for a givin app. Check the plist located at: /var/mobile/Library/SpringBoard/applicationState.plist>com.app.identifier>SBApplicationBadgeKey

查看更多
登录 后发表回答