I have an app that in contact us section allows the user to call us depending on the device. If it is an iPhone it would show the number along with the Call button. If it is an iPod Touch it would just display the number. But since updating to iOS8 the iPod Touch is also being identified as an iPhone and is showing the Call button. Anybody know how to fix this? Any help is appreciated.
Asked
Active
Viewed 88 times
2 Answers
4
You can check to see if the iOS device can open a telephone link:
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"tel:+11111"]])
As mentioned in the following post:

Community
- 1
- 1

Adam Richardson
- 2,518
- 1
- 27
- 31
-
Sensible solution! +1 – theiOSDude Oct 17 '14 at 09:29
-
Thank You but I am using this already and it is saying the iPod Touch can open a telephone link. But it cannot. – Abin Jose Oct 17 '14 at 09:33
-
1Is it on the same wifi network as an iPhone with the same Apple ID? – Paulw11 Oct 17 '14 at 09:43
1
Do device type check as below :
- (NSString *) deviceType{
NSString *devicePlatform = [self deviceModel];
if ([devicePlatform isEqualToString:@"iPod1,1"]) return @"iPod Touch 1G";
if ([devicePlatform isEqualToString:@"iPod2,1"]) return @"iPod Touch 2G";
if ([devicePlatform isEqualToString:@"iPod3,1"]) return @"iPod Touch 3G";
if ([devicePlatform isEqualToString:@"iPod4,1"]) return @"iPod Touch 4G";
if ([devicePlatform isEqualToString:@"iPad1,1"]) return @"iPad";
if ([devicePlatform isEqualToString:@"iPod5,1"]) return @"iPod Touch 5G";
return devicePlatform;
}
- (NSString *) deviceModel{
size_t size;
sysctlbyname("hw.machine", NULL, &size, NULL, 0);
char *machine = malloc(size);
sysctlbyname("hw.machine", machine, &size, NULL, 0);
NSString *platform = [NSString stringWithUTF8String:machine];
free(machine);
return platform;
}