apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.15k stars 987 forks source link

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

Closed jaybowman closed 8 months ago

jaybowman commented 3 years ago

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

Franco-Alejandro commented 1 year ago

Running into this issue as well.

expcapitaldev commented 8 months ago

cordova-ios 6.2.0 the same, confirm

expcapitaldev commented 8 months ago

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

dpogue commented 8 months ago

yeah, this should be fixed in 7.0.0 🙂