Phonegap/Cordova 2.3.0 iOS白名单被忽略 [英] Phonegap/Cordova 2.3.0 iOS Whitelist Ignored

查看:72
本文介绍了Phonegap/Cordova 2.3.0 iOS白名单被忽略的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近将我的phonegap iOS应用程序升级到了2.3.0.此版本按预期将我的Cordova.plist文件转换为config.xml文件,但是由于升级,我的应用程序无法再从外部URL(图像等)加载资源.我的config.xml中有以下内容:

I have recently upgraded my phonegap iOS application to 2.3.0. This release converted my Cordova.plist file into a config.xml file as expected, but since the upgrade my application can no longer load resources from external URLs (images etc). I have the following delcaration in my config.xml:

<access origin="*"/>

自升级以来,是否有人遇到过此问题?

Has anyone come across this issue since the upgrade?

推荐答案

现在可以这样指定白名单:

The whitelist is now specified like so:

<access origin="*" />

要注意的重要一点是,如果使用情节提要板,则必须重写initWithCoder才能调用[super init],以便从config.xml进行Cordova加载设置.

An important thing to note is that if you are using storyboards, you must override initWithCoder to call [super init] in order to make Cordova load settings from config.xml.

加载在[CDVViewController loadSettings]中完成.尝试在此处建立断点,如果未调用该断点,那就出了问题.

The loading is done in [CDVViewController loadSettings]. Try breakpointing there and if it is not being called then something is wrong.

这篇关于Phonegap/Cordova 2.3.0 iOS白名单被忽略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆