简体   繁体   English

在trigger.io UIWebView中加载外部URL

[英]Load external URL in trigger.io UIWebView

I have a pre-existing backbone application (made to be loaded in a native iOS UIWebView ) that I'm trying to (quickly) migrate over to trigger.io in order to make use of the easy image caching/access to the camera. 我有一个预先存在的主干应用程序(用于在本机iOS UIWebView加载),我正在尝试(快速)迁移到trigger.io ,以便使用简单的图像缓存/访问相机。

So far I've tried setting window.location in a tiny shim, but this causes trigger.io to forward the URL request to mobile safari. 到目前为止,我已经尝试在一个小垫片中设置window.location ,但这会导致trigger.io将URL请求转发到移动safari。 I also created a native module and tried loading a request on the webView directly, as well as calling loadURL on the ForgeViewController . 我还创建了一个本机模块,并尝试直接在webView上加载请求,以及在ForgeViewController上调用loadURL Both had the same effect of launching mobile safari. 两者都具有发射移动野生动物园的相同效果。

I'd love to be able to serve my application in its current form while also being able to take advantage of trigger.io's features. 我希望能够以当前的形式提供我的应用程序,同时还能够利用trigger.io的功能。 Is this possible? 这可能吗?

This is possible, but disabled by default to prevent external websites gaining access to native functionality. 这是可能的,但默认情况下禁用,以防止外部网站获得对本机功能的访问权限。

To enable this add your site to the trusted urls setting under general in the app config. 要启用此功能,请将您的网站添加到应用配置中general下的trusted urls设置。 URLs should follow chrome style match patterns documented here: http://developer.chrome.com/extensions/match_patterns.html 网址应遵循此处记录的Chrome样式匹配模式: http//developer.chrome.com/extensions/match_patterns.html

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

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