xcode 使用 Phonegap 安装 Cordova 插件 - 没有 Cordova.plist

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14536790/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 02:37:57  来源:igfitidea点击:

Installing Cordova Plugins with Phonegap - no Cordova.plist

iosxcodecordova

提问by Ben

I am trying to install a plugin for my application (which is working fine), compiled in XCode using Cordova and the PhoneGap framework.

我正在尝试为我的应用程序安装一个插件(工作正常),使用 Cordova 和 PhoneGap 框架在 XCode 中编译。

On the instructions of the plugin I am supposed to add a key to the Cordova.plistfile but I cannot find it in my hierarchy. Here is a screenshot of the directories in my XCode project.

根据插件的说明,我应该向Cordova.plist文件添加一个密钥,但在我的层次结构中找不到它。这是我的 XCode 项目中目录的屏幕截图

What is the fix for this issue?

这个问题的解决方法是什么?

回答by Ben

Since PhoneGap upgraded, the Cordova.plistfile was discontinued and is instead config.xml.

由于 PhoneGap 升级,Cordova.plist文件已停止使用,取而代之的是config.xml

Source

来源



Edit: Since the original page has since been deleted, here is a sort-of transcript from the forum thread:

编辑:由于原始页面已被删除,以下是论坛主题的文字记录:

Are you using the brand new PhoneGap version 2.3.0, which was release 7/Jan/2013? The Wikitude plugin is currently only tested with PhoneGap 2.2.0. In 2.3.0 cordova.plist has been changed to config.xml

From http://shazronatadobe.wordpress.com/2012/12/10/whats-new-in-cordova-ios-2-3-0/

Cordova.plist is changed to config.xml

The configuration Cordova.plist file has been changed to config.xml – it comes in a new format that is the same as the Android config.xml. If you are upgrading, you will need to convert your existing Cordova.plist by running the bin/cordova_plist_to_config_xml script. The 2.3.0 project itself will warn you (in the console log) if you are still using the old Cordova.plist and tell you to upgrade.

Try to edit the new config.xml accordingly - we are working on a updated Plugin compliant to 2.3.0 in the next weeks.

您使用的是 2013 年 1 月 7 日发布的全新 PhoneGap 2.3.0 版吗?Wikitude 插件目前仅使用 PhoneGap 2.2.0 进行测试。在 2.3.0 中,cordova.plist 已更改为 config.xml

来自http://shazronatadobe.wordpress.com/2012/12/10/whats-new-in-cordova-ios-2-3-0/

Cordova.plist 改为 config.xml

配置 Cordova.plist 文件已更改为 config.xml - 它采用与 Android config.xml 相同的新格式。如果要升级,则需要通过运行 bin/cordova_plist_to_config_xml 脚本来转换现有的 Cordova.plist。如果您仍在使用旧的 Cordova.plist 并告诉您升级,2.3.0 项目本身会警告您(在控制台日志中)。

尝试相应地编辑新的 config.xml - 我们将在接下来的几周内开发符合 2.3.0 的更新插件。