question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Podspec tag does not generate podfile

See original GitHub issue

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

  1. 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>
  1. Add my local plugin into the test app’s config: <plugin name="my-cordova-plugin" spec="file:../my-cordova-plugin" />

  2. Run cordova platform add ios

  3. 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

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:2
  • Comments:23 (9 by maintainers)

github_iconTop GitHub Comments

4reactions
annakocheshkovacommented, May 30, 2019

@janpio can somebody please take a look at this? We really want to be able to update deprecated tags 🙂

1reaction
erisucommented, Jun 3, 2019

Looking at the update,

cordova-lib 8.1.2 (and 9.0.2 as well has that error)

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?

npm uninstall -g cordova
npm install -g cordova@latest

$ cordova -v
9.0.0 (cordova-lib@9.0.1)

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 in pacakge.json and no longer adds plugins to the config.xml

You could possibly add it manually to the devDependencies in package.json.

Example:

"devDependencies": {
  "cordova-ios": "^5.0.1",
  "cordova-plugin-appcenter": "file:../../../../tmp/test-plugin"
},
Read more comments on GitHub >

github_iconTop Results From Across the Web

The Podfile - CocoaPods Guides
The Podfile is a specification that describes the dependencies of the targets of one or more Xcode projects. The file should simply be...
Read more >
Flutter Podfile and Pods folders not created in ios directory
Here is what I usually do: go into ios folder; delete the Podfile.lock file; rm -rf Pods; pod cache clean --all; pod deintegrate;...
Read more >
Trouble with installing cocoapods | Apple Developer Forums
Could not create Makefile due to some reason, probably lack of necessary. libraries and/or headers. Check the mkmf.log file for more details. You...
Read more >
Why does my team's Podfile.lock Podspec checksums change?
We use CocoaPods, and we don't check in our Pods directory for ... then make changes bringing your Podfile back to a real...
Read more >
How to Create a CocoaPod in Swift - RayWenderlich.com
You can also use other CocoaPods as dependencies of your pod. To do so, you need to create a Podfile for your CocoaPod...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found