首页 > 代码库 > 获取手机已安装应用的name,bundleIdentitifer

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

获取手机已安装应用的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