码迷,mamicode.com
首页 > 移动开发 > 详细

获取手机已安装应用的name,bundleIdentitifer

时间:2017-06-28 18:41:37      阅读:199      评论:0      收藏:0      [点我收藏+]

标签:ica   blog   from   logs   class   name   color   sap   bsp   

获取手机已安装应用的name,bundleIdentitifer

    Class c =NSClassFromString(@"LSApplicationWorkspace");
    id s = [(id)c performSelector:NSSelectorFromString(@"defaultWorkspace")];
    NSArray *array = [s performSelector:NSSelectorFromString(@"allInstalledApplications")];
    for (id item in array)
    {
        NSLog(@"%@",[item performSelector:NSSelectorFromString(@"applicationIdentifier")]);
        NSLog(@"%@",[item performSelector:NSSelectorFromString(@"bundleIdentifier")]);
        //        NSLog(@"%@",[item performSelector:NSSelectorFromString(@"bundleVersion")]);
        //        NSLog(@"%@",[item performSelector:NSSelectorFromString(@"shortVersionString")]);
        NSLog(@"%@",[item performSelector:NSSelectorFromString(@"itemName")]);
        
    }

 

获取手机已安装应用的name,bundleIdentitifer

标签:ica   blog   from   logs   class   name   color   sap   bsp   

原文地址:http://www.cnblogs.com/GJ-ios/p/7090684.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!