[iOS][Cocoapods] Podfile deployment-target is not updated on cordova prepare
See original GitHub issueBug 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
cordova create MyApp
- Edit config.xml and set deployment-target preference
...
<platform name="ios">
...
<preference name="deployment-target" value="10.0" />
</platform>
...
cordova platform add ios@5.0.0
- View platforms/ios/Podfile. The iOS platform will be
10.0
- Remove
platforms
andplugins
folders - Run
cordova prepare
- 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
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:5
Top Results From Across the Web
ios - CocoaPods could not find compatible versions for pod ...
My setup: VS Code, Flutter. If you don't have Podfile.lock file and pod update doesn't help, try this: Go to ios/Pods/Local Podspecs ...
Read more >Ionic iOS build process failing
It appears that the cocoapods install, or something related to it, is causing the problem. Running pod install --verbose. in the /ios/app folder ......
Read more >Fixing `The iOS Simulator deployment target ... - wafrat
To regenerate the Podfile, run: rm ios/Podfile Error launching application on iPhone 13. Exited (sigterm). Seems like a simple way to update ......
Read more >Add Firebase to your Apple project
For apps that use CocoaPods, the Firebase pod is deprecated in v9.0 and higher. Instead, you need to reference product pods directly in...
Read more >[Solved]-File Transfer Download with Cordova 3.4 for iOS 7
Coding example for the question File Transfer Download with Cordova 3.4 for ... not working after update to Swift 3 · React Native...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
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