如何更改Cordova中的部署目标

问题描述 投票:1回答:2

我有一个插件需要比8.0更高的部署目标。我可以更改我的pod文件,但Cordova总是将其更改回来。有没有办法设定呢?我试过了:

<preference name="deployment-target" value="10.0" />

在config.xml中。

我的问题是我总是在安装时得到这个:enter image description here

其结果是:enter image description here

cordova cocoapods visual-studio-app-center
2个回答
0
投票

即便如此

cordova plugin list 

显示添加的插件,他们实际上不在文件夹中。唯一一个有cordova-plugin-appcenter-shared所以我从两个插件文件夹中删除了它并重新运行

cordova plugin add cordova-plugin-appcenter-analytics 

一切安装正确。


0
投票

如果您收到CocoaPods could not find compatible versions for pod "AppCenter" ... Specs satisfying the 'AppCenter (~> 1.13.2) dependency were found, but they required a higher minimum deployment target,您可能会将iOS定位到9以下,并且正在使用指定的AppCenter版本生成Podfile。

我相信AppCenter 0.3.0负责将iOS Podfile从pod 'AppCenter'更改为pod 'AppCenter ~> 1.13.2'(或者在你的情况下为1.12.0)

您可以尝试通过添加值为“9.0”的Cordova config.xml“deployment-target”首选项来强制Podfile定位到iOS 9或更高版本,但这不适用于cordova-ios 4.5.5+。否则,您必须手动更改Xcode中的Podfile或目标(不建议使用)。或者,您可以在短期内将AppCenter SDK /插件降级到0.2.2,以便Podfile不指定AppCenter版本。

© www.soinside.com 2019 - 2024. All rights reserved.