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
Click the relevant app. Go to General > App Information. The Bundle ID is displayed.
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.
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.
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);
This should do it.
NSBundle *bundle = [NSBundle bundleWithIdentifier:@"yourBundleIdentifier"];
NSString *appName = [bundle objectForInfoDictionaryKey:@"CFBundleExecutable"];
- (NSString *)titleOfAppWithBundleIdentifier:(NSString *)bundleIdentifier {
NSBundle *bundle = [NSBundle bundleWithIdentifier:bundleIdentifier];
return [bundle objectForInfoDictionaryKey:@"CFBundleExecutable"];
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With