Can you find individual app usage duration using SpringBoard services framework or other private framework?

霸气de小男生 提交于 2019-12-08 02:43:19

问题


I have a background service running on iOS5. I am trying to find the duration for which each foreground application runs. I came across this great post by Vikarti Anatra. how to determine which apps are background and which app is foreground on iOS by application id

This shows how to get the current foreground process. However, what I would like to know is if there is a method which will give me the start time of various processes launched by Springboard so I can compute the duration.

I am trying to create a log of apps launched by my users. This is not meant for app store certification and meant to be an internal organization tool.

Thanks.


回答1:


Have you had a look at SBApplication? Perhaps you could swizzle -[SBApplication activate] and -[SBApplication deactivate] inside SpringBoard.app and calculate the time between them?



来源:https://stackoverflow.com/questions/8561194/can-you-find-individual-app-usage-duration-using-springboard-services-framework

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