Finding list of installed apps on iphone

后端 未结 7 1656
不知归路
不知归路 2020-11-27 07:03

Is it possible to programatically find out name of all apps installed on my iOS device ? Is there any API available for same ?

Thanks for the help

7条回答
  •  孤城傲影
    2020-11-27 07:44

    try this, it will work even with non-jailbroken devices:

    #include 
    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]);//will give you all **Bundle IDS** of user's all installed apps
    

提交回复
热议问题