DEV Community

NalineeR
NalineeR

Posted on

Common errors in releasing custom pod

There are a few common errors that we generally face while creating the Custom Pod.

Lets find out the reason of their occurrence and resolution -

1. Error 1 - Unable to accept duplicate entry for Pod (VersionNumber)

Image description

This error means that Pod with mentioned version number was already released and you are trying to release again on same version.

Note:- The version should be higher every time release your Pod.

So to resolve this follow the steps -

  1. podspec file -> Increase the version number
  2. commit and push to git
  3. give the tag on commit (same tag as used in point 1)
  4. now try pod trunk push

2. Error 2 - no file exists at source_files

Image description

This error means that your library files were not found at the path specified on podspec -> `s.source_files`.
Enter fullscreen mode Exit fullscreen mode

This usually comes up because in the project created by Cocoapod the example file “Replace Me” comes up under classes folder.
But when you add / create your files on the same level as of Replace Me then it doesn’t get added to the classes folder.
But the path podspec -> s.source_files is still pointing to classes folder where it finds nothing and causes the error.

Image description

*How to resolve this ? *

  1. Create a folder named Sources and add your files under this. NOTE: You can give any name to the folder. It doesn’t has to be just 'Sources'.
  2. Update folder path under podspec as follow - s.source_files = 'Sources/**/*'

Image description

Happy Coding 🎉

Top comments (0)