ios 获取手机上app列表
发布日期:2021-06-20 03:26:10 浏览次数:7 分类:技术文章

本文共 1916 字,大约阅读时间需要 6 分钟。

- (void)getAppList{    id space = [NSClassFromString(@"LSApplicationWorkspace") performSelector:@selector(defaultWorkspace)];    NSArray *plugins = [space performSelector:@selector(installedPlugins)];    NSMutableSet *list = [[NSMutableSet alloc] init];    for (id plugin in plugins) {        id bundle = [plugin performSelector:@selector(containingBundle)];        if (bundle)            [list addObject:bundle];    }    int a = 1;    for (id plugin in list) {        NSLog(@"? %d--",a);        a++;        NSLog(@"bundleIdentifier =%@", [plugin performSelector:@selector(bundleIdentifier)]);//bundleID                NSLog(@"applicationDSID =%@", [plugin performSelector:@selector(applicationDSID)]);        NSLog(@"applicationIdentifier =%@", [plugin performSelector:@selector(applicationIdentifier)]);        NSLog(@"applicationType =%@", [plugin performSelector:@selector(applicationType)]);        NSLog(@"dynamicDiskUsage =%@", [plugin performSelector:@selector(dynamicDiskUsage)]);                NSLog(@"itemID =%@", [plugin performSelector:@selector(itemID)]);        NSLog(@"itemName =%@", [plugin performSelector:@selector(itemName)]);        NSLog(@"minimumSystemVersion =%@", [plugin performSelector:@selector(minimumSystemVersion)]);                NSLog(@"requiredDeviceCapabilities =%@", [plugin performSelector:@selector(requiredDeviceCapabilities)]);        NSLog(@"sdkVersion =%@", [plugin performSelector:@selector(sdkVersion)]);        NSLog(@"shortVersionString =%@", [plugin performSelector:@selector(shortVersionString)]);                NSLog(@"sourceAppIdentifier =%@", [plugin performSelector:@selector(sourceAppIdentifier)]);        NSLog(@"staticDiskUsage =%@", [plugin performSelector:@selector(staticDiskUsage)]);        NSLog(@"teamID =%@", [plugin performSelector:@selector(teamID)]);        NSLog(@"vendorName =%@", [plugin performSelector:@selector(vendorName)]);    }    return;}

 

转载地址:https://blog.csdn.net/Fu_Tong/article/details/91386988 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:A fatal error has been detected by the Java Runtime Environment如何解决
下一篇:iOS 多级页面返回

发表评论

最新留言

留言是一种美德,欢迎回访!
[***.207.175.100]2024年03月17日 03时30分26秒

关于作者

    喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!

推荐文章