【发布时间】:2023-03-15 02:41:01
【问题描述】:
当我使用 IOS 时,我无法在我的 Cordova 应用中打开链接
window.open('http://maps.apple.com/?q='+label, '_system');
但它适用于(但不在浏览器中):
window.location.href = 'http://maps.apple.com/?q='+label;
在我的 config.xml 中,我将其列入白名单:
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
在我的 index.html 中:
<meta http-equiv="Content-Security-Policy" content="default-src * 'self' 'unsafe-inline' 'unsafe-eval' data: gap: content:">
我真的不明白这个问题..
谢谢
【问题讨论】:
标签: ios cordova hybrid-mobile-app phonegap