Creating a Pod, Cocoapods lint source_files issue

cocoapods, ios

Solution

This was also driving me nuts for 'hours'. I then discovered that the files and tags must be present in the source git repo. So make sure you push your code and your tags to the remote repo...

Update:

You can also do a 'pod lib lint' to lint the local files not the git repo.

Problem

I am creating a static library and I want to make a podspec so it can be included in other projects as well. To generate proper pod structure I used a command : ``` pod lib create <library_name> ``` It generated the following structure - .podspec - CHANGELOG.md - Classes - Project - README.md - Rakefile - LICENSE I created a new Xcode project inside the "projects" directory. I also added two files to the project called Test1.h and Test2.h and saved them inside classes directory. Plus I added, header search path variable to xCode project settings, "../Classes/" so the classes & headers in other directories are are seen by compiler. (Is there a way to have a group in Xcode such that all classes added to it, go to Classes directory, and compiler can see them automatically ?) So now it looks like this - .podspec - CHANGELOG.md - Classes - Test1.h - Test2.m - Project - (folder) - .xcodeproj - Tests - Podfile - README.md - Rakefile - LICENSE In my podspec I have the following setting for source files s.source_files = 'Classes/*.{h,m}' But when I run : pod spec lint .podspec I get the following error : - ERROR | The `source_files` pattern did not match any file. Analyzed 1 podspec. [!] The spec did not pass validation. What is the issue here? I have been stuck on this for hours.

Original source