简体   繁体   中英

iPod Touch canOpenURL of type tel://

On an iPod Touch running iOS 8.0 (12A365), canOpenURL: returns YES for tel:// URL schemes.

Also, openURL: returns nil, after a 5 - 10 second delay .

UIApplication *application = [UIApplication sharedApplication];
NSURL *url = [NSURL URLWithString:@"tel://"];

if ([application canOpenURL:url])
{
    [application openURL:url];
}

Anyone know why canOpenURL: doesn't return NO for iPod? The facetime URL scheme is different ('facetime://') so in theory it should return NO .

Unfortunately I don't have an iPod with iOS7 to test, so I can't isolate the problem to only iOS8.

Hm I'm not sure whether I'm being helpful here as I don't own an iPod to test it but on Mac you can open a URL with a tel:// scheme too which launches FaceTime. This can call via a nearby iPhone any phone number.

I don't know whether this is the case for the iPod models too though.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM