I have an application that needs to get the list of installed (other, maybe third party) applications on the device. How can it be done? Or can it be done at all?
You could scan all your apps through apple private framework "MobileInstallationInstall".
The method is like below:
NSDictionary *options = [NSDictionary dictionaryWithKeyAndValues:@"ApplicationType",@"Any",nil]
NSDictionary *apps = MobileInstallationLookup(options);
it can only be used in JB devices.
-(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;
}
this will give you the array of name of installed app using private API
there is no public API from apple to fetch such list from iOS device (iPod Touch/iPhone/iPad)
I doubt if something is available(if some iphone is jailbreaked and user can access file system, then it will be possible, but i am not aware of this.), but you can use following link and with the help of this you can check what all app are present and you can customize with some of your needs.
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