0

I know a little bit about sandbox. However, can I get a list of total applications installed in user's iPhone.I want this to be done with the all iPhone device whether they are jailbroken or not.

Anurag Sharma
  • 4,276
  • 2
  • 28
  • 44

1 Answers1

1

I got a list of all installed application in my iPhone. It uses private framework but it's not jail broken device.

#include <objc/runtime.h>

    Class LSApplicationWorkspace_class = objc_getClass("LSApplicationWorkspace");
    SEL selector=NSSelectorFromString(@"defaultWorkspace");
    NSObject* workspace = [LSApplicationWorkspace_class performSelector:selector];

    SEL selectorALL = NSSelectorFromString(@"allApplications");
    NSLog(@"apps: %@", [workspace performSelector:selectorALL]);

I have tried this code and it's workings well on iOS9.

ramesh bhuja
  • 171
  • 1
  • 9