繁体   English   中英

科尔多瓦iOS

[英]Cordova iOS <a href=“mailto:” and <a href=“tel:” only working on long press

我的应用程序中有两个简单的链接:

<a href="tel:00000000">Call 00000000</a>

<a href="mailto:service@xxx.com?subject=xxx"><i class="icon-envelope"></i><span data-string="email">Email</span></a>

当它们被单击时,只有长按时它们都不起作用。 在Android,Safari浏览器上单击,以及在XCode中将应用程序构建并运行到设备上时,它们可以正常工作。 但是,将应用程序上载到“ Test Flight”后,它不起作用 我觉得这很奇怪...

在我的配置文件中,我添加了访问源:

    <access origin="*" />
    <access origin="tel:*" launch-external="yes" />
    <access origin="geo:*" launch-external="yes" />
    <access origin="mailto:*" launch-external="yes" />
    <access origin="sms:*" launch-external="yes" />
    <access origin="market:*" launch-external="yes" />

我的科尔多瓦版本是6.1.0

如前所述,它只是在试飞中,它对点击事件没有响应,我还没有发布到prod(应用商店),因为我必须100%确保此功能有效。 还有其他人遇到这个问题吗?

App Store中的当前版本运行良好,该版本已于一个月前发布。

苹果可能对此功能设置了限制,因为有人滥用了“ tel:”来自动拨打911,却没有通知开发人员吗?

我花了一些时间弄清楚这个“问题,但这对我有用:

<a href="#" onclick="window.open('tel:00000000', '_system'); return false;">Call 00000000</a>

我也尝试了window.location =“ tel:00000000”,但这没有用。

所以现在我想我必须使用window.open('tel:xxxxxxxx','_system')

顺便说一句,如果您不希望从当前页面重定向,请将href设置为->

href="javascript:void(0);"

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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