Check if app has a notfication using private frameworks?

对着背影说爱祢 提交于 2019-12-01 08:35:13

问题


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.


回答1:


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.




回答2:


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



来源:https://stackoverflow.com/questions/18724086/check-if-app-has-a-notfication-using-private-frameworks

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!