Fix tvOS build

This commit is contained in:
Cameron Gutman
2019-11-03 15:25:43 -08:00
parent ee7df54842
commit c89de92e23
2 changed files with 6 additions and 0 deletions

View File

@@ -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
{

View File

@@ -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 {