Funny
Funny

Reputation: 576

Get the list of apps installed and its usage in iOS

I want to get the list of apps installed and its usage on iOS device. I have searched for this and found few solutions.

  1. Using IHasApp framework that returns only the list of apps which has used custom URL Scheme in it. Rest of the apps that doesn't implement custom URL Scheme are not listed.
  2. I have seen we can get the result with the help of AppList framework. But there's no instruction how to use that framework into our project. https://github.com/rpetrich/AppList
  3. Using SpringBoardServices framework - for this I am following below link, and the result I get from this is the list of running processes (pid, appid, pname, etc) I am not sure If I can get the list of apps name with the help of this information. how to determine which apps are background and which app is foreground on iOS by application id
  4. Few other links I have tried

    Getting global list of all ios apps

    https://stackoverflow.com/questions/2689711/itunes-app-store-api

    how to get the list of apps Name installed in the iPhone

    But nothing helps

Please can someone assist if you know, I don't mind using private frameworks to get the list of apps installed and its usage.

Upvotes: 2

Views: 1993

Answers (1)

Lucy
Lucy

Reputation: 175

You can do it by using SpringboardServices framework. First download headers file for this framework and link the framework into your project, then simply implement these lines of code:

CFArrayRef SBSCopyApplicationDisplayIdentifiers(bool onlyActive, bool debuggable);

int main() {
    char buf[1024];
    CFArrayRef ary = SBSCopyApplicationDisplayIdentifiers(false, false);
    for(CFIndex i = 0; i < CFArrayGetCount(ary); i++) {
        CFStringGetCString(CFArrayGetValueAtIndex(ary, i),buf, sizeof(buf), kCFStringEncodingUTF8);
        printf("%s\n", buf);
    }
    return 0;
}

It'll return the list of installed apps in your devices. However, these methods cannot work on iOS 8, I'm still working around with it now. If you know any replacement for this in iOS 8, please share. The answer I found it from here https://stackoverflow.com/a/15342129

Upvotes: 1

Related Questions