Is there a private API to be able to detect what is current foreground app on iOS?

余生颓废 提交于 2019-12-08 20:16:31

问题


I am not planning to send this app to AppStore. It's just an experimental app. So, I am not worried about AppStore approval/rejection.

I am looking for a way, how I can determine

a) What is the current foreground app (my app will be in the background at that moment. I may use audio player or voip for this)

b) Detect when new application became foreground app


回答1:


It looks like this question has this answer for mine question. how to determine which apps are background and which app is foreground on iOS by application id

It boils down to SBFrontmostApplicationDisplayIdentifier private API



来源:https://stackoverflow.com/questions/11299957/is-there-a-private-api-to-be-able-to-detect-what-is-current-foreground-app-on-io

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