Commit d04b83bd authored by Radek Zmeskal's avatar Radek Zmeskal

updated tvOS support

parent c1e93065
......@@ -7,7 +7,8 @@ Pod::Spec.new do |s|
s.license = "MIT"
s.authors = { "Rebecca Hughes" => "rebecca@learnium.net" }
s.platform = :ios, "7.0"
s.ios.deployment_target = '9.0'
s.tvos.deployment_target = '10.0'
s.source = { :git => "https://github.com/rebeccahughes/react-native-device-info.git" }
......
......@@ -16,7 +16,9 @@
@property (nonatomic) bool isEmulator;
@end
#if !(TARGET_OS_TV)
@import CoreTelephony;
#endif
@implementation RNDeviceInfo
......@@ -156,9 +158,13 @@ RCT_EXPORT_MODULE(RNDeviceInfo)
- (NSString *) carrier
{
#if (TARGET_OS_TV)
return nil;
#else
CTTelephonyNetworkInfo *netinfo = [[CTTelephonyNetworkInfo alloc] init];
CTCarrier *carrier = [netinfo subscriberCellularProvider];
return carrier.carrierName;
#endif
}
- (NSString*) userAgent
......
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