首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何获取安装在iPhone中的应用程序名称列表

如何获取安装在iPhone中的应用程序名称列表
EN

Stack Overflow用户
提问于 2013-01-16 09:48:53
回答 1查看 4.1K关注 0票数 0

可能重复: 获取所有已安装应用程序的列表

我正在寻找的应用程序控制系统工具,其中我想要一个列表的所有安装的应用程序名称和用户将允许改变那里的状态,即用户可以隐藏那些跳板。如果是,那怎么可能呢?请帮帮我?

EN

回答 1

Stack Overflow用户

发布于 2013-01-16 10:14:58

尝尝这个

代码语言:javascript
复制
-(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;
}

这将给你一系列已安装的应用程序。

此链接还可以帮助您链接

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/14355444

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档