From a63ba48b8ad4856d09857e5086d4b6ab99aa4ba6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesu=CC=81s=20A=2E=20A=CC=81lvarez?= Date: Sun, 29 May 2016 00:10:48 +0200 Subject: [PATCH] fix PlugIns icons not showing when installed in /Applications --- Mini vMac/SettingsViewController.m | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Mini vMac/SettingsViewController.m b/Mini vMac/SettingsViewController.m index f902550..e9f56f4 100644 --- a/Mini vMac/SettingsViewController.m +++ b/Mini vMac/SettingsViewController.m @@ -169,8 +169,7 @@ typedef enum : NSInteger { cell = [tableView dequeueReusableCellWithIdentifier:@"machine" forIndexPath:indexPath]; cell.textLabel.text = [bundle objectForInfoDictionaryKey:@"CFBundleDisplayName"]; cell.detailTextLabel.text = [bundle objectForInfoDictionaryKey:@"CFBundleGetInfoString"]; - NSAssert([bundle.bundlePath hasPrefix:[NSBundle mainBundle].bundlePath], @"emulator bundle is in main bundle"); - NSString *iconName = [[bundle.bundlePath stringByAppendingPathComponent:@"Icon"] substringFromIndex:[NSBundle mainBundle].bundlePath.length+1]; + NSString *iconName = [NSString stringWithFormat:@"PlugIns/%@.mnvm/Icon", bundleName]; cell.imageView.image = [UIImage imageNamed:iconName]; BOOL selected = [[defaults stringForKey:@"machine"] isEqualToString:bundleName]; cell.accessoryType = selected ? UITableViewCellAccessoryCheckmark : UITableViewCellAccessoryNone;