Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS][Cocoapods] Podfile deployment-target is not updated on cordova prepare #580

Closed
3 tasks done
rossholdway opened this issue Mar 25, 2019 · 6 comments · Fixed by #1341
Closed
3 tasks done

[iOS][Cocoapods] Podfile deployment-target is not updated on cordova prepare #580

rossholdway opened this issue Mar 25, 2019 · 6 comments · Fixed by #1341
Labels
Milestone

Comments

@rossholdway
Copy link

Bug Report

Issue #468 was recently fixed, however the deployment-target preference only applies if you run cordova plugin add ... and not when running cordova prepare.

Problem

cordova prepare does not update the Podfile with the value specified in the config.xml deployment-target prefrence.

What is expected to happen?

The Podfile should contain the value specified in the config.xml deployment-target preference after running cordova prepare.

What does actually happen?

The Podfile is not updated with the value specified

Steps to reproduce

  1. cordova create MyApp
  2. Edit config.xml and set deployment-target preference
...
  <platform name="ios">
    ...
    <preference name="deployment-target" value="10.0" />
  </platform>
...
  1. cordova platform add ios@5.0.0
  2. View platforms/ios/Podfile. The iOS platform will be 10.0
  3. Remove platforms and plugins folders
  4. Run cordova prepare
  5. View platforms/ios/Podfile. The iOS platform will be 9.0. I'd expect it to be 10, as specified in config.xml

Version information

Cordova iOS v5.0.0
Cordova CLI v9.0.0

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
@dpogue dpogue added this to the 5.0.1 milestone Mar 31, 2019
@janpio janpio added the bug label Apr 16, 2019
@dpogue dpogue modified the milestones: 5.0.1, 5.0.2 Apr 17, 2019
@frenmanoj
Copy link

frenmanoj commented Feb 6, 2020

I just tested this against cordova-ios 5.1.1. It seems to be working now.

@th3hamm0r
Copy link

I currently have a similar issue, even with version 5.1.1.
Beside other plugins I'm using ionic's webview which sets the deployment target to 11.0. But if remove and re-add the ios platform, the created Podfile's platform is still set to 10.0.
Only when I remove and re-add any of the plugins with podspecs, the version is updated to 11.0.
Changing the deployment-target in the config.xml does not solve the issue.

@flexaddicted
Copy link

flexaddicted commented Apr 8, 2020

Hi all, any update on this?

Using version 5.1.1 the bug appears just with a sample project. I can confirm the behavior described by @rossholdway.

Thanks, Lorenzo

@jaybowman
Copy link

I'm still having this issue. I created a new cordova app and I have a custom plugin that uses podspec.
using cordova-ios 6.1.1, cordova 10.0.0
using the config.xml deployment-target perferance value = 12.2 does not update the pod file when I do "cordova platform add ios" it is defaulting to '11.0' and my pod framework has a minimum ios deployment target of 12.
My plugin list:
cordova-plugin-add-swift-support
cordova-plugin-app-launcher
cordova-plugin-device
cordova-plugin-whitelist

@NiklasMerz NiklasMerz modified the milestones: 6.next, 7.0.0 Jan 31, 2021
@jacobg
Copy link

jacobg commented Dec 27, 2021

I'm also running into this issue. I'll have to check if a build hook can add a pod post-install script to work around this bug:
https://stackoverflow.com/a/37289688/1237919

@dpogue dpogue linked a pull request Jun 7, 2023 that will close this issue
5 tasks
@Faksprod

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.