The way to detect other apps in use

Discussion in 'iOS Programming' started by chikiuso, Apr 24, 2014.

  1. chikiuso macrumors newbie

    Apr 24, 2014
    Hello, may I ask how to detect the other apps in use with xcode programming? For example, I need to run an app which could show what apps are running in the iphone or ipad.
  2. 1458279 Suspended


    May 1, 2010
    Apple sandboxes everything, meaning you can't get info on other apps. Apple clearly has that information because they gather stats on what apps have been run and for how long. Unless you have a hook into the other apps, I really don't think you'll be able to get that information.

    I could be wrong, but I'm pretty sure Apple doesn't allow that info.
  3. chikiuso thread starter macrumors newbie

    Apr 24, 2014
    Thanks for your info, you are right, I just would like to make sure, thanks.
  4. D.T. macrumors G3


    Sep 15, 2011
    Vilano Beach, FL
    If the apps you’re wanting to verify have a published URL schema, you can check if that’s available. That’s how apps know to route to an installed app (like Twitter), or to use some external default through Safari.

    For example:


    Most are here:

    Do something like this using the canOpenURL method to check if there’s an app that can handle that URL/schema, then you can openURL:[] and invoke the native app, or handle the lack of the app, like so:

    NSString *url = @“custom_url_schema://";
    if ([[UIApplication sharedApplication] canOpenURL:[NSURL url]]) {
        // open and route with custom url
    } else {
       // handle lack of schema, open in safari, notify user, etc.
    This of course doesn’t detect “running” apps, and only apps with a published schema, but since I don’t know your actual design goals, I figured I’d toss it out there as a possible solution.

Share This Page