cordova-ios icon indicating copy to clipboard operation
cordova-ios copied to clipboard

deployment-target preference is not used during plugin add to create podfile.

Open jaybowman opened this issue 3 years ago • 1 comments

Bug Report

When adding a plugin that has a podspec defined the perference deployment-target is not used for the creation of the podfile.

Problem

What is expected to happen?

When adding a plugin with a podspec tag in the plugin.xml a podfile is created, this works. But Looking at the cordova code (api.js) when a tag is present in the ios platform section of the applications config.xml the podfile created should have "platform :ios, '13.0'" but it is always being set to the default "10.0" for cordova-ios 5.1.1.

What does actually happen?

The podfile created from the plugin add always defaults to the cordova-ios ios version default value. The depoyment-target set in the config.xml is not making it to the cordova-common api.js where the plugin add code is.

Information

My plugin has a framework requirement of ios 13 or greater. I can edit the podfile and then run "pod install" cocoapods does the install without an error.

Command or Code

plugin with podspec, have in your apps config.xml cordova plugin add my-plugin cordova platform add ios

Environment, Platform, Device

Mac OS 11.2.3

Version information

cordova 10.0.0 cordova-ios > 5.1 npm 6.14.11 mac os 11.2.3

Checklist

  • [X] I searched for existing GitHub issues
  • [X] I updated all Cordova tooling to most recent version
  • [X] I included all the necessary information above

jaybowman avatar Mar 18 '21 18:03 jaybowman

Running into this issue as well.

Franco-Alejandro avatar Sep 19 '22 15:09 Franco-Alejandro

cordova-ios 6.2.0 the same, confirm

expcapitaldev avatar Oct 12 '23 09:10 expcapitaldev

but looks like it is fixed in 7.0.0 https://github.com/apache/cordova-ios/pull/1341

expcapitaldev avatar Oct 12 '23 09:10 expcapitaldev

yeah, this should be fixed in 7.0.0 🙂

dpogue avatar Oct 12 '23 16:10 dpogue