有的时候,我们需要在实现应用间调用功能,系统自带的方式固然方便。
但是,如果我们能在调用前先获取系统的应用列表岂不更爽快。因此,今天
我们就来实现获取应用列表的功能。直接上代码!
+ (BOOL) APCheckIfAppInstalled:(NSString *)bundleIdentifier
{
staticNSString *const cacheFileName =@"com.apple.mobile.installation.plist";
NSString *relativeCachePath = [[@"Library"stringByAppendingPathComponent:@"Caches"]stringByAppendingPathComponent: cacheFileName];
NSDictionary *cacheDict =nil;
NSString *path =nil;