diff --git a/SimulatorManager.xcodeproj/project.pbxproj b/SimulatorManager.xcodeproj/project.pbxproj index e50c089..5a1361e 100755 --- a/SimulatorManager.xcodeproj/project.pbxproj +++ b/SimulatorManager.xcodeproj/project.pbxproj @@ -9,6 +9,7 @@ /* Begin PBXBuildFile section */ 0ADB3B13178F3DE4004E9BB9 /* LaunchAtLoginController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0ADB3B12178F3DE4004E9BB9 /* LaunchAtLoginController.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 8155085C19E6081600C99832 /* RecentAppsManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 8155085B19E6081600C99832 /* RecentAppsManager.m */; }; + 81AC54BE19EA10AD004C2C3C /* SimulatorErase.sh in Resources */ = {isa = PBXBuildFile; fileRef = 81AC54BD19EA10AD004C2C3C /* SimulatorErase.sh */; }; 81D6BB7519C40261006974D1 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 81D6BB7419C40261006974D1 /* Images.xcassets */; }; 81D6BB7819C4062E006974D1 /* Simulator.m in Sources */ = {isa = PBXBuildFile; fileRef = 81D6BB7719C4062E006974D1 /* Simulator.m */; }; 81D6BB7B19C414BD006974D1 /* SimulatorApp.m in Sources */ = {isa = PBXBuildFile; fileRef = 81D6BB7A19C414BD006974D1 /* SimulatorApp.m */; }; @@ -25,6 +26,7 @@ 0ADB3B12178F3DE4004E9BB9 /* LaunchAtLoginController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LaunchAtLoginController.m; sourceTree = ""; }; 8155085A19E6081600C99832 /* RecentAppsManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RecentAppsManager.h; sourceTree = ""; }; 8155085B19E6081600C99832 /* RecentAppsManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RecentAppsManager.m; sourceTree = ""; }; + 81AC54BD19EA10AD004C2C3C /* SimulatorErase.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = SimulatorErase.sh; sourceTree = ""; }; 81D6BB7419C40261006974D1 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 81D6BB7619C4062E006974D1 /* Simulator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Simulator.h; sourceTree = ""; }; 81D6BB7719C4062E006974D1 /* Simulator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Simulator.m; sourceTree = ""; }; @@ -129,6 +131,7 @@ C149EC0915D5214600B1F558 /* main.m */, C149EC0B15D5214600B1F558 /* SimulatorManager-Prefix.pch */, C149EC0C15D5214600B1F558 /* Credits.rtf */, + 81AC54BD19EA10AD004C2C3C /* SimulatorErase.sh */, ); name = "Supporting Files"; sourceTree = ""; @@ -186,6 +189,7 @@ files = ( 81D6BB7519C40261006974D1 /* Images.xcassets in Resources */, C149EC0815D5214600B1F558 /* InfoPlist.strings in Resources */, + 81AC54BE19EA10AD004C2C3C /* SimulatorErase.sh in Resources */, C149EC0E15D5214600B1F558 /* Credits.rtf in Resources */, C149EC1415D5214600B1F558 /* MainMenu.xib in Resources */, ); @@ -294,7 +298,7 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "SimulatorManager/SimulatorManager-Prefix.pch"; INFOPLIST_FILE = "SimulatorManager/SimulatorManager-Info.plist"; - MACOSX_DEPLOYMENT_TARGET = 10.7; + MACOSX_DEPLOYMENT_TARGET = 10.8; PRODUCT_NAME = SimulatorManager; WRAPPER_EXTENSION = app; }; @@ -310,7 +314,7 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "SimulatorManager/SimulatorManager-Prefix.pch"; INFOPLIST_FILE = "SimulatorManager/SimulatorManager-Info.plist"; - MACOSX_DEPLOYMENT_TARGET = 10.7; + MACOSX_DEPLOYMENT_TARGET = 10.8; PRODUCT_NAME = SimulatorManager; WRAPPER_EXTENSION = app; }; diff --git a/SimulatorManager/AppDelegate.m b/SimulatorManager/AppDelegate.m index f98b5c4..2c5c296 100755 --- a/SimulatorManager/AppDelegate.m +++ b/SimulatorManager/AppDelegate.m @@ -6,14 +6,24 @@ #import "AppDelegate.h" #import "Simulator.h" #import "RecentAppsManager.h" -@interface AppDelegate() +@interface AppDelegate() + @property (nonatomic, strong) NSMutableArray *simulators; @property (weak) IBOutlet NSMenuItem *launchAtLoginMenuItem; @property (nonatomic, strong) NSDate *lastModDate; @property (nonatomic, strong) RecentAppsManager *recentManager; @property (assign, nonatomic) BOOL recentAppUpdate; +@property (weak) IBOutlet NSMenuItem *eraseMenuItem; + @end @implementation AppDelegate +- (void)applicationDidFinishLaunching:(NSNotification *)notification { + [[NSUserNotificationCenter defaultUserNotificationCenter] setDelegate:self]; +} + +- (BOOL)userNotificationCenter:(NSUserNotificationCenter *)center shouldPresentNotification:(NSUserNotification *)notification{ + return YES; +} - (NSString *)simulatorDevicesDirectory { NSArray *array = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES); @@ -63,7 +73,7 @@ - (void)menuWillOpen:(NSMenu *)menu { - (void) loadMenu { // Clear out the hosts so we can start over NSUInteger n = [[menu itemArray] count]; - for (int i=0;iCFBundlePackageType APPL CFBundleShortVersionString - 1.1 + 1.2 CFBundleSignature ???? CFBundleVersion - 1.1 + 5 LSApplicationCategoryType public.app-category.developer-tools LSMinimumSystemVersion diff --git a/SimulatorManager/en.lproj/MainMenu.xib b/SimulatorManager/en.lproj/MainMenu.xib index 99fc385..14a26ab 100755 --- a/SimulatorManager/en.lproj/MainMenu.xib +++ b/SimulatorManager/en.lproj/MainMenu.xib @@ -1,11 +1,11 @@ - 1070 - 14A343f + 1080 + 14A388a 6245 - 1334 - 751.00 + 1343.14 + 755.00 com.apple.InterfaceBuilder.CocoaPlugin 6245 @@ -99,6 +99,24 @@ + + + YES + YES + + + 2147483647 + + + + + + Erase All Simulators + + 2147483647 + + + YES @@ -197,6 +215,14 @@ 659 + + + eraseAllSimulators: + + + + 663 + menu @@ -245,6 +271,14 @@ 660 + + + eraseMenuItem + + + + 664 + @@ -331,6 +365,8 @@ + + @@ -370,6 +406,17 @@ Launch At Login + + 661 + + + Erase All Simulators + + + 662 + + + @@ -392,12 +439,14 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin - 660 + 664 @@ -420,19 +469,22 @@ IBProjectSource - ../Shuttle/AppDelegate.h + ../SimulatorManager/AppDelegate.h AppDelegate + id id id id - id - id + + eraseAllSimulators: + id + launchAtLogin: id @@ -445,29 +497,24 @@ showAbout: id - - showExportPanel: - id - - - showImportPanel: - id - - - launchAtLoginMenuItem - NSMenuItem - - - launchAtLoginMenuItem - + + NSMenuItem + NSMenuItem + + + + eraseMenuItem + NSMenuItem + + launchAtLoginMenuItem NSMenuItem - + IBProjectSource - ../Shuttle/AppDelegate.m + ../SimulatorManager/AppDelegate.m @@ -559,7 +606,7 @@ NO com.apple.InterfaceBuilder.CocoaPlugin.macosx - + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3