cordova-ios: Podspec tag does not generate podfile
Bug Report
Problem
What is expected to happen?
Noticed this warning in customers’ apps: "framework" tag with type "podspec" is deprecated and will be removed. Please use the "podspec" tag
.
Updated my plugin’s plugin.xml
with podspec tag instead of framework tag and installed the plugin. Podfile should be created and filled with referenced frameworks, pods should be installed.
What does actually happen?
Podfile is created but it is empty. No Pods folder inside platforms/ios.
STR
plugin.xml
:
...
<platform name="ios">
...
<podspec>
<config>
<source url="https://github.com/CocoaPods/Specs.git"/>
</config>
<pods use-frameworks="true">
<pod name="AppCenter" spec="~> 2.0.1" />
</pods>
</podspec>
</platform>
-
Add my local plugin into the test app’s config:
<plugin name="my-cordova-plugin" spec="file:../my-cordova-plugin" />
-
Run
cordova platform add ios
-
Observe the Podfile inside platforms/ios:
# DO NOT MODIFY -- auto-generated by Apache Cordova
platform :ios, '9.0'
target 'TestApp' do
project 'TestApp.xcodeproj'
end
Environment, Platform, Device
macOS High Sierra
Version information
cocoapods 1.6.0
cordova-ios 5.0.1
node 10.15.1
cordova-lib 8.1.2
(and 9.0.2
as well has that error)
dsymutil -v
Apple LLVM version 10.0.0 (clang-1000.11.45.5)
Optimized build.
Default target: x86_64-apple-darwin17.7.0
Host CPU: ivybridge
Checklist
- I searched for existing GitHub issues
- I updated all Cordova tooling to most recent version
- I included all the necessary information above
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 2
- Comments: 24 (10 by maintainers)
@janpio can somebody please take a look at this? We really want to be able to update deprecated tags 🙂
Looking at the update,
I suspect you are still using an older version of Cordova CLI, based from the lib version. Also, there is currently no
9.0.2
cordova-lib release.The new pod tags were introduced in Cordova CLI 9.x.
First, could you try and upgrade your Cordova CLI?
Also, for adding plugins, I would recommend using the Cordova command:
cordova plugin add /path/to/plugin
. Cordova CLI 9.x also manages plugins now inpacakge.json
and no longer adds plugins to theconfig.xml
You could possibly add it manually to the
devDependencies
inpackage.json
.Example: