[英]how to update cordova-ios version in visual studio 2015 cordova project?
I'm developing ios app using cordova template in visual studio 2015. I have configured mac book as described in this link . 我正在使用visual studio 2015中的cordova模板开发ios应用程序。我已经按照此链接中的描述配置了mac book。 https://taco.visualstudio.com/en-us/docs/ios-guide/#run-your-app-in-an-ios-simulator . https://taco.visualstudio.com/en-us/docs/ios-guide/#run-your-app-in-an-ios-simulator 。 Installed xcode version is 8.3. 安装的xcode版本是8.3。 when i try to run app in an ios simulator , getting following error. 当我尝试在ios模拟器中运行应用程序时,会出现以下错误。 so, how to fix this, please help .thanks. 所以,如何解决这个问题,请帮助。谢谢。
Error: Remote build error from the build server Build failed with error Remotebuild requires your projects to use cordova-ios 4.3.0 or greater with XCode 8.3. 错误:构建服务器的远程构建错误构建失败,错误Remotebuild要求您的项目在XCode 8.3中使用cordova-ios 4.3.0或更高版本。 Please update your cordova-ios version. 请更新您的cordova-ios版本。
From this link you can see how to update cordova: 在此链接中,您可以看到如何更新cordova:
npm update -g cordova
On next link you can find instructions for ios cordova update. 在下一个链接中,您可以找到有关ios cordova更新的说明。 Basically its just removing ios platform and adding it back again for projects built with Cordova 4.x version: 基本上它只是删除ios平台并将其添加回用于使用Cordova 4.x版本构建的项目:
cordova platform rm ios
cordova platform add ios
For older versions use: 对于旧版本,请使用:
cordova platform update ios
Visual Studio 2015 was forcing the 4.1.1 version for cordova-ios. Visual Studio 2015强制使用了cordova-ios的4.1.1版本。
This worked for me on the command line: 这在命令行上对我有用:
cordova platform add ios@4.3.1
cordova-ios 4.3.1 cordova-ios 4.3.1
Note: And i deleted the "bld" folder from the cordova project root. 注意:我从cordova项目根目录中删除了“bld”文件夹。
This is what worked for me in Visual Studio 2017 Community Edition. 这在Visual Studio 2017社区版中对我有用。
1) Delete the platforms / ios folder in the root folder of your project 1)删除项目根文件夹中的platforms / ios文件夹
2) In the platforms folder, edit the platforms.json file manually with the version you want, in my case it was: 2)在platforms文件夹中,使用你想要的版本手动编辑platforms.json文件,在我的例子中是:
{
"android": "5.2.1",
"ios": "4.3.0"
}
3) Update your config.xml file in your project like so: 3)更新项目中的config.xml文件,如下所示:
<engine name="ios" spec="4.3.0" />
4) Run your project. 4)运行你的项目。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.