From c89de92e23ba8a38d87a393ded06e55c045b6044 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 3 Nov 2019 15:25:43 -0800 Subject: [PATCH] Fix tvOS build --- Limelight/AppDelegate.m | 4 ++++ Limelight/ViewControllers/MainFrameViewController.m | 2 ++ 2 files changed, 6 insertions(+) diff --git a/Limelight/AppDelegate.m b/Limelight/AppDelegate.m index 916bac8f..5db73f57 100644 --- a/Limelight/AppDelegate.m +++ b/Limelight/AppDelegate.m @@ -23,17 +23,21 @@ static NSString* DB_NAME = @"Limelight_iOS.sqlite"; #endif - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { +#if !TARGET_OS_TV UIApplicationShortcutItem* shortcut = [launchOptions valueForKey:UIApplicationLaunchOptionsShortcutItemKey]; if (shortcut != nil) { _pcUuidToLoad = (NSString*)[shortcut.userInfo objectForKey:@"UUID"]; } +#endif return YES; } +#if !TARGET_OS_TV - (void)application:(UIApplication *)application performActionForShortcutItem:(UIApplicationShortcutItem *)shortcutItem completionHandler:(void (^)(BOOL succeeded))completionHandler { _pcUuidToLoad = (NSString*)[shortcutItem.userInfo objectForKey:@"UUID"]; _shortcutCompletionHandler = completionHandler; } +#endif - (void)applicationWillResignActive:(UIApplication *)application { diff --git a/Limelight/ViewControllers/MainFrameViewController.m b/Limelight/ViewControllers/MainFrameViewController.m index 54fc5417..8714c46e 100644 --- a/Limelight/ViewControllers/MainFrameViewController.m +++ b/Limelight/ViewControllers/MainFrameViewController.m @@ -983,6 +983,7 @@ static NSMutableSet* hostList; } - (void)updateHostShortcuts { +#if !TARGET_OS_TV if (@available(iOS 9.0, *)) { NSMutableArray* quickActions = [[NSMutableArray alloc] init]; @@ -1004,6 +1005,7 @@ static NSMutableSet* hostList; [UIApplication sharedApplication].shortcutItems = quickActions; } +#endif } - (void)updateHosts {