如何获取iPhone中安装的应用程序列表名称 [英] how to get the list of apps Name installed in the iPhone

查看:428
本文介绍了如何获取iPhone中安装的应用程序列表名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

获取所有已安装应用的列表

我是寻找应用程序控制系统工具,我希望在其中列出所有已安装的应用程序名称,并允许用户更改其状态,即用户可以隐藏跳板中的那些。是的,如果是,那怎么可能? PLZ帮助我吗?

I am looking for the apps control system tool, in which I want a list of all installed apps name and user will allowed to change there status, that is user can hide those from the springboard. can it be possible if yes then how? plz help me out?

推荐答案

试试这个

-(NSArray *) installedApps
{
    BOOL isDir enter code here= NO;
    NSDictionary *cacheDienter code herect;
    NSDictionary *user;
    static NSString *const cacheFileName = @"com.apple.mobile.installation.plist";
    NSString *relativeCachePath = [[@"Library" stringByAppendingPathComponent: @"Caches"] stringByAppendingPathComponent: cacheFileName];
    NSString *path = [[NSHomeDirectory() stringByAppendingPathComponent: @"../.."] stringByAppendingPathComponent: relativeCachePath];
    if ([[NSFileManager defaultManager] fileExistsAtPath: path isDirectory: &isDir] && !isDir) // Ensure that file exists
    {
        cacheDict    = [NSDictionary dictionaryWithContentsOfFile: path];
        user = [cacheDict objectForKey: @"System"]; // Then all the user (App Store /var/mobile/Applications) apps
    }



    //NSLog(@"Installed Applications = %@",[user allKeys]); 
    //return [user allKeys];
    return nil;
}

这将提供已安装的应用程序数组。

This will gives u array of installed apps.

这个链接也有助于你链接

这篇关于如何获取iPhone中安装的应用程序列表名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆