Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get app name from bundle 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.


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

like image 258
Ivan Alek Avatar asked Dec 24 '12 16:12

Ivan Alek


People also ask

How do I find my app bundle ID?

Click the relevant app. Go to General > App Information. The Bundle ID is displayed.

Where is Bundleid of iOS app in XCode?

Open you project with XCode, select the top project item in the project navigator at the left. Then select TARGETS -> General. Bundle Identifier is found under Identity.

What are app identifiers?

An App ID is a two-part string used to identify one or more apps from a single development team. The string consists of a Team ID and a bundle ID search string, with a period ( . ) separating the two parts.


2 Answers

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

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

EDIT:

AS you want to find for all the apps.

NSString *appName = [[NSBundle bundleWithIdentifier:@"BundleIdentifier"] objectForInfoDictionaryKey:(id)kCFBundleExecutableKey];
NSLog(@"AppName: %@",appName);
like image 148
Anoop Vaidya Avatar answered Oct 01 '22 03:10

Anoop Vaidya


This should do it.

NSBundle *bundle = [NSBundle bundleWithIdentifier:@"yourBundleIdentifier"];
NSString *appName = [bundle objectForInfoDictionaryKey:@"CFBundleExecutable"];

Method

- (NSString *)titleOfAppWithBundleIdentifier:(NSString *)bundleIdentifier {
    NSBundle *bundle = [NSBundle bundleWithIdentifier:bundleIdentifier];
    return [bundle objectForInfoDictionaryKey:@"CFBundleExecutable"];
}
like image 29
IluTov Avatar answered Oct 01 '22 02:10

IluTov