从包ID获取应用名称 [英] Get app name from bundle id

查看:382
本文介绍了从包ID获取应用名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从设备上安装的应用程序中找到了包含id的列表,我想获取应用程序名称。解决方案应该适用于不受监狱破坏的设备。该应用程序不会进入应用程序商店,因此拒绝应用程序。

I have list with bundle id`s from apps that are installed on device and i want to get the app names. Solution should work on not jail broken devices. The app would not go on app store so the app rejection doesn't metter.

我找到了这个解决方案,如果它位于应用商店,请返回应用的详细信息。
http://itunes.apple.com/lookup?bundleId=com .bundle.id

I found this solution, which will return detailed info for app if it is located on app store. http://itunes.apple.com/lookup?bundleId=com.bundle.id

推荐答案

大部分时间,你可以得到这个......

Most of the time, you can get with this...

NSString *appName = [[[NSBundle mainBundle] infoDictionary] objectForKey:(id)kCFBundleNameKey];

编辑:

如你所愿查找所有应用程序。

AS you want to find for all the apps.

NSString *appName = [[NSBundle bundleWithIdentifier:@"BundleIdentifier"] objectForInfoDictionaryKey:(id)kCFBundleExecutableKey];
NSLog(@"AppName: %@",appName);

这篇关于从包ID获取应用名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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