Remove help links from tvOS version due to lack of browser and WebKit

This commit is contained in:
Cameron Gutman
2018-08-29 09:36:51 -07:00
parent 253144188c
commit 9123033bb3
4 changed files with 19 additions and 21 deletions
+1
View File
@@ -20,6 +20,7 @@ FOUNDATION_EXPORT NSString *const deviceName;
+ (NSString*) bytesToHex:(NSData*)data;
+ (NSData*) hexToBytes:(NSString*) hex;
+ (int) resolveHost:(NSString*)host;
+ (void) addHelpOptionToDialog:(UIAlertController*)dialog;
@end
+9
View File
@@ -73,6 +73,15 @@ NSString *const deviceName = @"roth";
}
}
+ (void) addHelpOptionToDialog:(UIAlertController*)dialog {
#if !TARGET_OS_TV
// tvOS doesn't have a browser
[dialog addAction:[UIAlertAction actionWithTitle:@"Help" style:UIAlertActionStyleDefault handler:^(UIAlertAction* action){
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://github.com/moonlight-stream/moonlight-docs/wiki/Troubleshooting"]];
}]];
#endif
}
@end
@implementation NSString (NSStringWithTrim)