首页 > 解决方案 > 如何在不删除现有平台的情况下更新 iOS 平台

问题描述

如何在不删除现有 iOS 平台的情况下更新 iOS 平台。

在基于cordova的项目中,目前使用的iOS平台是4.2.1。所以,需要更新 iOS 4.5.2 或更高版本。

我使用了以下命令

cordova platform update ios@4.5.4 --save and 
cordova platform update ios@4.5.4

但它显示如下错误。

Using cordova-fetch for cordova-ios@4.5.4
Updating ios project...
(node:34228) UnhandledPromiseRejectionWarning: An in-place platform update is not supported. 
The `platforms` folder is always treated as a build artifact.
To update your platform, you have to remove, then add your ios platform again.
Make sure you save your plugins beforehand using `cordova plugin save`, and save a copy of the platform first if you had manual changes

在里面。科尔多瓦插件保存科尔多瓦平台rm ios科尔多瓦平台添加ios

(node:34228) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async

没有 catch 块的函数,或者通过拒绝未使用 .catch() 处理的承诺。要在未处理的 Promise 拒绝时终止节点进程,请使用 CLI 标志--unhandled-rejections=strict (请参阅https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode)。(拒绝 id:1)(节点:34228)[DEP0018] DeprecationWarning:不推荐使用未处理的承诺拒绝。将来,未处理的 Promise 拒绝将使用非零退出代码终止 Node.js 进程。

请在不删除现有平台的情况下告诉我,需要更新平台 iOS 4.5.4 或更高版本。

标签: ioscordova

解决方案


推荐阅读