Disabling phone number detection in iphone phonegap apps
Recently I found out that in a phone gap app for iPhone a number of a shipment in the UI got a link out of nowhere. The link got enabled after a while, and it was clearly the job of the iOS itself.
It turns out that iOS has a phone number detection in the web safari that is used also in the UIWebView class.
After a while I found the solution in this blog.
Just at this code in your apps delegate:
// ...
- (void)webViewDidStartLoad:(UIWebView *)theWebView
{
// disable telephone detection, basically
theWebView.dataDetectorTypes = UIDataDetectorTypeAll ^ UIDataDetectorTypePhoneNumber;
return [ super webViewDidStartLoad:theWebView ];
}
// ...