Commit b474a889 authored by gtebbutt's avatar gtebbutt

Remove webview from tvOS build

parent c6ffd0f4
...@@ -144,6 +144,9 @@ RCT_EXPORT_MODULE() ...@@ -144,6 +144,9 @@ RCT_EXPORT_MODULE()
else if([self.deviceId rangeOfString:@"iPhone"].location != NSNotFound){ else if([self.deviceId rangeOfString:@"iPhone"].location != NSNotFound){
deviceName = @"iPhone"; deviceName = @"iPhone";
} }
else if([self.deviceId rangeOfString:@"AppleTV"].location != NSNotFound){
deviceName = @"Apple TV";
}
} }
return deviceName; return deviceName;
...@@ -151,8 +154,12 @@ RCT_EXPORT_MODULE() ...@@ -151,8 +154,12 @@ RCT_EXPORT_MODULE()
- (NSString*) userAgent - (NSString*) userAgent
{ {
#if TARGET_OS_TV
return @"not available";
#else
UIWebView* webView = [[UIWebView alloc] initWithFrame:CGRectZero]; UIWebView* webView = [[UIWebView alloc] initWithFrame:CGRectZero];
return [webView stringByEvaluatingJavaScriptFromString:@"navigator.userAgent"]; return [webView stringByEvaluatingJavaScriptFromString:@"navigator.userAgent"];
#endif
} }
- (NSString*) deviceLocale - (NSString*) deviceLocale
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment