I am developing an app where I have to detect whether there any app which is already running on device. I want the list of all running apps. I made R&D on this topic but I found nothing. Is there any way to do this?
Asked
Active
Viewed 170 times
0
-
No public APIs for this, but you may find [this](https://github.com/caughtinflux/iOS-6-SpringBoard-Headers/blob/master/SBAppSwitcherModel.h) useful. – Mar 01 '13 at 10:37
1 Answers
5
I think in a non-jailbreak app you can not do this.
However for a jailbroken app you can do : Return a list of running background apps/processes in iOS
Also: Detect which app is currently running on iOS using sysctl
EDIT:
As this app in iTunes does the same as you need, so you can go with above.

Community
- 1
- 1

Anoop Vaidya
- 46,283
- 15
- 111
- 140
-
I think it is possible to do it with in a non-jailbreak, this app did it https://itunes.apple.com/us/app/sys-activity-manager-for-memory/id447374159?mt=8, but I have no idea about how they accomplish this – tkanzakic Mar 01 '13 at 10:32
-
I have found this: http://forrst.com/posts/UIDevice_Category_For_Processes-h1H, I can't test it right now, maybe you can take a look – tkanzakic Mar 01 '13 at 10:41
-
@AnoopVaidya Do you know how to detect if a process is in background or foreground mode? – James Laurenstin Jan 10 '14 at 15:42
-
@JamesLaurenstin: you can check if a process is running but I am not sure you can check if it is in bg or fg. – Anoop Vaidya Jan 13 '14 at 13:51
-
@AnoopVaidya I already know how to list the running processes. I'm just trying to figure out if they're in bg or fg? Not sure how to get that info yet. – James Laurenstin Jan 13 '14 at 16:36