我有一个适用于Android和iOS的cordova应用程序。该应用程序是一个可在webview中加载的移动网站。当用户单击移动网站外部的链接时,我希望在系统浏览器中打开该链接。
现在在Android上,此功能可与允许导航配合使用。 iOS不是。
<allow-navigation href="https://mywebsite.nl/*" />
<allow-navigation href="https://code.jquery.com/*" />
<allow-navigation href="https://fonts.googleapis.com/*" />
<allow-navigation href="https://use.fontawesome.com/*" />
<allow-navigation href="*.google.com" />
<allow-navigation href="*.googleapis.com" />
<allow-navigation href="*.gstatic.com" />
<allow-navigation href="*.googleusercontent.com" />
<allow-navigation href="google.com/*" />
<allow-navigation href="googleapis.com/*" />
<allow-navigation href="gstatic.com/*" />
<allow-navigation href="googleusercontent.com/*" />
<preference name="AllowInlineMediaPlayback" value="true" />
<preference name="MediaPlaybackRequiresUserAction" value="false" />
<allow-navigation href="*youtube*" />
<allow-navigation href="*ytimg*" />
<allow-navigation href="*youtube-nocookie*" />
<allow-navigation href="*vimeo*" />
<access origin="https://*.youtube-nocookie.com" />
<access origin="https://*.youtube.com" />
<access origin="*.vimeo.com" />
<access origin="*.vimeocdn.com" />
<access origin="https://*.ytimg.com" />
<access origin="https://*.gstatic.com" />
<access origin="https://*.googlevideo.com" />
<access origin="https://*.google.com" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
点击外部链接时,我是否需要为iOS添加一些东西来打开系统浏览器?