2013-03-05 105 views

回答

1

您無法從Appstore獲取您設備的安裝應用程序列表,但是您可以從設備獲取安裝應用程序的列表。我只是谷歌,並得到來自

get list of installed applications on iphone objective-c

Get list of installed apps on iPhone

Get list of all installed apps

最佳答案你可以得到它,如: -

-(void)appInstalledList 
{ 
     BOOL isDir = NO; 
     NSDictionary *cacheDienter; 
     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 
    { 
     cacheDienter = [NSDictionary dictionaryWithContentsOfFile: path]; 
     user = [cacheDienter objectForKey: @"System"]; 
     NSLog(@"%@",user); 
     // Then all the user (App Store /var/mobile/Applications) apps 
    } 
} 
+0

尼廷嗨,thanx的答覆中,代碼給我的輸出找不到應用程序列表 – 2013-03-05 11:08:35

+0

在設備中運行您的項目 – 2013-03-05 11:10:43

+0

相同的輸出m – 2013-03-05 11:13:10

相關問題