diff --git a/Limelight/AppDelegate.m b/Limelight/AppDelegate.m index c8668c3..5db73f5 100644 --- a/Limelight/AppDelegate.m +++ b/Limelight/AppDelegate.m @@ -24,11 +24,9 @@ static NSString* DB_NAME = @"Limelight_iOS.sqlite"; - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { #if !TARGET_OS_TV - if (@available(iOS 9.0, *)) { - UIApplicationShortcutItem* shortcut = [launchOptions valueForKey:UIApplicationLaunchOptionsShortcutItemKey]; - if (shortcut != nil) { - _pcUuidToLoad = (NSString*)[shortcut.userInfo objectForKey:@"UUID"]; - } + UIApplicationShortcutItem* shortcut = [launchOptions valueForKey:UIApplicationLaunchOptionsShortcutItemKey]; + if (shortcut != nil) { + _pcUuidToLoad = (NSString*)[shortcut.userInfo objectForKey:@"UUID"]; } #endif return YES; diff --git a/Limelight/UIAppView.m b/Limelight/UIAppView.m index cdc3093..822269b 100644 --- a/Limelight/UIAppView.m +++ b/Limelight/UIAppView.m @@ -49,12 +49,7 @@ static UIImage* noImage; UILongPressGestureRecognizer* longPressRecognizer = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(appLongClicked:)]; [self addGestureRecognizer:longPressRecognizer]; - if (@available(iOS 9.0, tvOS 9.0, *)) { - [self addTarget:self action:@selector(appClicked:) forControlEvents:UIControlEventPrimaryActionTriggered]; - } - else { - [self addTarget:self action:@selector(appClicked:) forControlEvents:UIControlEventTouchUpInside]; - } + [self addTarget:self action:@selector(appClicked:) forControlEvents:UIControlEventPrimaryActionTriggered]; [self addTarget:self action:@selector(buttonSelected:) forControlEvents:UIControlEventTouchDown]; [self addTarget:self action:@selector(buttonDeselected:) forControlEvents:UIControlEventTouchUpInside | UIControlEventTouchCancel | UIControlEventTouchDragExit]; diff --git a/Limelight/UIComputerView.m b/Limelight/UIComputerView.m index 26cbe65..143811c 100644 --- a/Limelight/UIComputerView.m +++ b/Limelight/UIComputerView.m @@ -102,12 +102,7 @@ static const int LABEL_DY = 20; self = [self init]; _callback = callback; - if (@available(iOS 9.0, tvOS 9.0, *)) { - [self addTarget:self action:@selector(addClicked) forControlEvents:UIControlEventPrimaryActionTriggered]; - } - else { - [self addTarget:self action:@selector(addClicked) forControlEvents:UIControlEventTouchUpInside]; - } + [self addTarget:self action:@selector(addClicked) forControlEvents:UIControlEventPrimaryActionTriggered]; [_hostLabel setText:@"Add Host Manually"]; [_hostLabel sizeToFit]; @@ -127,12 +122,7 @@ static const int LABEL_DY = 20; UILongPressGestureRecognizer* longPressRecognizer = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(hostLongClicked:)]; [self addGestureRecognizer:longPressRecognizer]; - if (@available(iOS 9.0, tvOS 9.0, *)) { - [self addTarget:self action:@selector(hostClicked) forControlEvents:UIControlEventPrimaryActionTriggered]; - } - else { - [self addTarget:self action:@selector(hostClicked) forControlEvents:UIControlEventTouchUpInside]; - } + [self addTarget:self action:@selector(hostClicked) forControlEvents:UIControlEventPrimaryActionTriggered]; [self updateContentsForHost:host]; [self startUpdateLoop]; diff --git a/Limelight/ViewControllers/MainFrameViewController.m b/Limelight/ViewControllers/MainFrameViewController.m index b06f124..8c72600 100644 --- a/Limelight/ViewControllers/MainFrameViewController.m +++ b/Limelight/ViewControllers/MainFrameViewController.m @@ -1138,27 +1138,25 @@ static NSMutableSet* hostList; - (void)updateHostShortcuts { #if !TARGET_OS_TV - if (@available(iOS 9.0, *)) { - NSMutableArray* quickActions = [[NSMutableArray alloc] init]; - - @synchronized (hostList) { - for (TemporaryHost* host in hostList) { - // Pair state may be unknown if we haven't polled it yet, but the app list - // count will persist from paired PCs - if ([host.appList count] > 0) { - UIApplicationShortcutItem* shortcut = [[UIApplicationShortcutItem alloc] - initWithType:@"PC" - localizedTitle:host.name - localizedSubtitle:nil - icon:[UIApplicationShortcutIcon iconWithType:UIApplicationShortcutIconTypePlay] - userInfo:[NSDictionary dictionaryWithObject:host.uuid forKey:@"UUID"]]; - [quickActions addObject: shortcut]; - } + NSMutableArray* quickActions = [[NSMutableArray alloc] init]; + + @synchronized (hostList) { + for (TemporaryHost* host in hostList) { + // Pair state may be unknown if we haven't polled it yet, but the app list + // count will persist from paired PCs + if ([host.appList count] > 0) { + UIApplicationShortcutItem* shortcut = [[UIApplicationShortcutItem alloc] + initWithType:@"PC" + localizedTitle:host.name + localizedSubtitle:nil + icon:[UIApplicationShortcutIcon iconWithType:UIApplicationShortcutIconTypePlay] + userInfo:[NSDictionary dictionaryWithObject:host.uuid forKey:@"UUID"]]; + [quickActions addObject: shortcut]; } } - - [UIApplication sharedApplication].shortcutItems = quickActions; } + + [UIApplication sharedApplication].shortcutItems = quickActions; #endif }