Cordova config.xml文件被重写 [英] Cordova config.xml file getting re-written

查看:87
本文介绍了Cordova config.xml文件被重写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我建立了一个基本的Cordova项目,每当我运行cordova build时,IOS中的config.xml文件都会被重写为默认值,并且我在项目文件夹中的config.xml中添加的所有首选项都将简单地附加到IOS平台文件夹中的config.xml.因此,例如,默认情况下,IOS文件夹中的config.xml具有<首选项name ="DisableOverscroll" value ="false"/>,当我将同一行(但使用True)添加到我的项目文件夹中的config.xml文件时,IOS文件夹中生成的config.xml最终具有两个条目(错误和正确).如何在IOS文件夹中获取config.xml文件以具有我设置它们的方式的首选项??

I set up a basic Cordova project, and whenever I run cordova build, the config.xml file in IOS gets re-written to defaults, and any preferences I add in the config.xml in my project folder are simply appended to the config.xml in the IOS platform folder. So, for example, by default the config.xml in the IOS folder has < preference name="DisableOverscroll" value="false" /> and when I add that same line (but with True) to the config.xml file in my project folder, the resulting config.xml in the IOS folder ends up having BOTH entries (false and true). How do I get the config.xml file in the IOS folder to have the preferences the way I'm setting them???

谢谢!

推荐答案

谢谢大家.我想我昨晚找到了答案.有一个 platform文件夹中的default.xml文件.一旦我修改了默认值 那里的偏好值,他们不断出现 每当我运行构建命令时,都可以在config.xml中正确访问.

Thanks guys. I think I found the answer last night. There's a default.xml file in the platform folder. Once I modified the default values for the preferences there, they consistently showed up correctly in the config.xml whenever I ran the build command.

这篇关于Cordova config.xml文件被重写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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