简体   繁体   English

Cordova iOS - 如何更改最低部署版本?

[英]Cordova iOS - how to change minimum deployment version?

I've got cordova v6.0.0 and a test device that is iOS 7.1.2我有cordova v6.0.0和iOS 7.1.2的测试设备

Based on what I read, cordova v4.0.0 was updated to use minimum deployment target iOS 8根据我阅读的内容,cordova v4.0.0 已更新为使用最低部署目标 iOS 8

Is there anything I can do, either in or out of Xcode, to force this to deploy to my iOS 7.1.2 test device?无论是在 Xcode 内还是在 Xcode 外,我都可以做些什么来强制将其部署到我的 iOS 7.1.2 测试设备上?

You can add the deployment-target preference to your project's config.xml. 您可以将部署目标首选项添加到项目的config.xml中。 For example, this would set the deployment target to iOS 7.1.2. 例如,这会将部署目标设置为iOS 7.1.2。

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

Since this is below Cordova's minimum supported version, there is no guarantee this will work. 由于这低于Cordova的最低支持版本,因此无法保证这将起作用。

You can add the deployment-target as a preference in config in your plugin.xml您可以在plugin.xml 的配置中添加部署目标作为首选项

  <config-file parent="/*" target="config.xml">
        <feature name="<pluign name>">
            <param name="ios-package" value="plugin name"/>
        </feature>
        <preference name="deployment-target" value="12.0" />
        <preference name="target-device" value="universal" />
    </config-file>

Cordova iOS 4.0.0 does in fact target iOS 8 by default. 事实上,Cordova iOS 4.0.0确实以iOS 8为目标。 This means your app will only be installable on iOS devices running 8.0 or greater. 这意味着您的应用只能安装在运行8.0或更高版本的iOS设备上。 You can go into Xcode and change this setting. 您可以进入Xcode并更改此设置。 Click on your project name, then the General tab, and under Deployment Info you will see a Deployment Target drop down. 单击项目名称,然后单击常规选项卡,在部署信息下,您将看到部署目标下拉列表。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM