I want to check if an app is really running in iOS, this app isn't built by me, such as I want to check is there gmail app installed in an iPhone and running, How can I check this? I don't know how to do this by javascript or Objective-C, so can you give me an idea or opinion? Many thanks
Asked
Active
Viewed 233 times
-2
-
There's no way to know if an app is running, only if is installed or not. – rmaddy May 13 '15 at 00:52
-
@rmaddy how to check if is installed or not? – spotcool May 13 '15 at 03:08
-
Please some basic searching for how to do that. Start by reading the answer posed to your question. – rmaddy May 13 '15 at 03:12
-
Very closely related: http://stackoverflow.com/questions/8275578/how-to-get-information-about-free-memory-and-running-processes-in-an-app-store-a – ahruss May 13 '15 at 03:30
1 Answers
0
The only thing you can do is check if the app is installed. You can't check if the app is running.
For example, if you want to check whether Facebook is installed, you would do the following:
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"fb://"]]) {
// Facebook app is installed
}
Here is a long list of url for apps.
There is a library that lists of some apps on the phone. You can view and download it here: iHasApp.

Jessica
- 9,379
- 14
- 65
- 136
-
how can I know `[NSURL URLWithString:@"fb://"]` this? such as why not `[NSURL URLWithString:@"facebook://"]` ? thanks – spotcool May 13 '15 at 03:12
-
iHasApps does not list most apps. It has a small percentage of the available apps and it gets more out of date every day. – rmaddy May 13 '15 at 15:38