【发布时间】:2016-07-11 15:00:54
【问题描述】:
我将此添加到 config.xml
<access origin="*"/>
<access origin="tel:*" launch-external="yes"/>
<access origin="mailto:*" launch-external="yes"/>
<allow-intent href="*"/>
<allow-navigation href="*"/>
<allow-navigation href="tel:*"/>
<allow-navigation href="mailto:*"/>
<allow-navigation href="data:*"/>
<plugin name="cordova-plugin-whitelist" version="1" />
这个到 index.html:
<meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">
当我点击这样的链接时:<a href="tel:+1234567">Call!</a> ios 上没有任何反应(在 android 上运行良好)。
如果我将 config.xml 更改为:
<access origin="//*"/>
<access origin="tel:*" launch-external="yes"/>
<access origin="mailto:*" launch-external="yes"/>
<allow-intent href="//*"/>
<allow-navigation href="//*"/>
<allow-navigation href="tel:*"/>
<allow-navigation href="mailto:*"/>
<allow-navigation href="data:*"/>
<plugin name="cordova-plugin-whitelist" version="1" />
它调用,但对服务器的 ajax 请求停止工作。
【问题讨论】:
-
如果你使用
tel://而不是tel:,它是否有效? -
是的,应该是
tel:+15555555555。没有斜线。 -
你能解决这个问题吗?
-
我仍然无法让它在带有 Ionic3 的 iOS 上运行...在 Android 上运行良好 - 在这里尝试了很多解决方案
标签: ios cordova cordova-plugins