Get list of all installed application in ios 8
try this.
it works,I've tested.
#include <objc/runtime.h>
Class LSApplicationWorkspace_class = objc_getClass("LSApplicationWorkspace");
NSObject* workspace = [LSApplicationWorkspace_class performSelector:@selector(defaultWorkspace)];
NSLog(@"apps: %@", [workspace performSelector:@selector(allApplications)]);
Get list of all installed apps
You can use this code snippet:
#import "InstalledAppReader.h"
static NSString* const installedAppListPath = @"/private/var/mobile/Library/Caches/com.apple.mobile.installation.plist";
@interface InstalledAppReader()
-(NSArray *)installedApp;
-(NSMutableDictionary *)appDescriptionFromDictionary:(NSDictionary *)dictionary;
@end
@implementation InstalledAppReader
#pragma mark - Init
-(NSMutableArray *)desktopAppsFromDictionary:(NSDictionary *)dictionary
{
NSMutableArray *desktopApps = [NSMutableArray array];
for (NSString *appKey in dictionary)
{
[desktopApps addObject:appKey];
}
return desktopApps;
}
-(NSArray *)installedApp
{
BOOL isDir = NO;
if([[NSFileManager defaultManager] fileExistsAtPath: installedAppListPath isDirectory: &isDir] && !isDir)
{
NSMutableDictionary *cacheDict = [NSDictionary dictionaryWithContentsOfFile: installedAppListPath];
NSDictionary *system = [cacheDict objectForKey: @"System"];
NSMutableArray *installedApp = [NSMutableArray arrayWithArray:[self desktopAppsFromDictionary:system]];
NSDictionary *user = [cacheDict objectForKey: @"User"];
[installedApp addObjectsFromArray:[self desktopAppsFromDictionary:user]];
return installedApp;
}
DLOG(@"can not find installed app plist");
return nil;
}
@end
Listing all installed apps on iPhone Programmatically?
I use the AppList library myself to get a list of all installed apps. It uses private frameworks so it's also jailbreak-only. Check it out at https://github.com/rpetrich/AppList.
Update: @Nate is correct about this already being asked and answered. Check out: Get list of all installed apps
Get list of installed apps on iPhone
No, apps are sandboxed and Apple-accepted APIs do not include anything that would let you do that.
You can, however, test whether a certain app is installed:
- if the app is known to handle URLs of a certain type
- by using
[[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"thisapp://foo"]
You can get a list of apps and URL schemes from here.
Finding list of installed apps on iphone
No, on iOS applications has no access to information of/about other applications due to sandboxed environment.
Related Topics
What Is the Meaning of This Declaration
How to Change Height of Uitableviewcell Real-Time
How to Pop Two Views at Once from a Navigation Controller
How to Set Image as a Title to Uinavigationbar
Alamofire: Sending JSON as Request Parameter
Gmsgeocoder Reversegeocodecoordinate: Completionhandler: on Background Thread
Retrieve User Defaults Information from an Apple Watch
Save an Object in Nsuserdefaults and Realm
Opening a PDF Document When Clicking a Button
Waiting for Asynchronous Function Call to Complete
Swift:Non-Nil Optional Value Raising a Nil Exception
Swift: Declare an Empty Dictionary
Uiimageview Aspect Fit and Center
Storyboard Uiviewcontroller, 'Custom Class' Not Showing in Drop Down
Memory-Mapped Files and Low-Memory Scenarios
Possible to Limit the Countries an iOS Application Is Released To