升级 iOS 应用程序的 Cordova 版本 [英] Upgrade Cordova Version of an iOS app
本文介绍了升级 iOS 应用程序的 Cordova 版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将 Cordova iOS 应用程序从一台 PC 转移到另一台 PC?该应用程序是使用其他版本的 Cordova 制作的,我想升级其 Cordova 版本.
How can I transfer a Cordova iOS app from one PC to other? The app is made in some other version of Cordova and I want to upgrade its Cordova version.
推荐答案
您可以按照以下步骤操作:
You can follow the steps below:
- 在新电脑上,使用
npm install -g cordova
命令安装最新版本的cordova - 在新PC中,使用创建一个新的cordova项目
cordova 创建 PROJECT_NAME 命令
在所需的位置使用终端 - 现在导航到新创建的项目文件夹,复制内容
WWW
文件夹和config.xml
文件来自旧 PC 中的旧项目并替换在新创建的项目文件夹中相同. - 在终端中,导航到项目根目录并安装使用
cordova plugin add PLUGIN_NAME
在新项目中需要的插件命令 - 安装所需插件后,将iOS平台添加到项目使用
cordova platform add ios
命令 - 现在使用
cordova build ios
命令构建项目
- In new PC, install the latest version of cordova using
npm install -g cordova
command - In new PC, create a new cordova project using
cordova create PROJECT_NAME command
in desired location using terminal - Now navigate to the newly create project folder, copy the contents of
WWW
folder andconfig.xml
file from Old project in Old PC and replace the same in newly created project folder. - In terminal, navigate to project root directory and install the
required plugins in new project using
cordova plugin add PLUGIN_NAME
command - After installing required plugins, add the iOS platform to the
project using
cordova platform add ios
command - Now build the project using
cordova build ios
command
你现在可以走了.但是您必须彻底测试您的项目,因为某些插件可能无法在最新的cordova 版本中正常工作.
You are good to go now. But you gotta test your project once thoroughly as some plugin may not works as expected with latest cordova version.
这篇关于升级 iOS 应用程序的 Cordova 版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文