Kevin Kevin - 1 year ago 358
iOS Question

.podspec error - source_files` pattern did not match any file

I am integrating one of my github repos (full code here if it helps) with Cocopods, and I get this error when I run

pod spec lint

-> DropDownMenu (0.0.1)
- ERROR | [iOS] The `source_files` pattern did not match any file.

This is the relevant code of my
which I believe is causing the problem.

Looking at examples here, here, and here, I have tried the following

s.source_files = 'Classes/*.{h,m}'
s.source_files = 'Classes/DropDownMenu.{h,m}'
s.source_files = 'Classes'
s.source_files = 'Classes/**/*.{h,m}'

Is my
field incorrect? Or did I do something wrong with the
? What can I do to fix this?

My problem is similar to this question, however the solution does not work for me (my code is updated on Github).

Answer Source

The problem is that your podspec is referencing a commit that did not yet have the Classes folder,

i.e. this commit doesn't have a classes folder yet

You can fix this issue by referencing the latest commit, i.e. changing your podspec source to:

s.source       = { :git => "", :commit => "0d6761feefccff1f7d8b7c7788ceb8e9cd1314ea" }
s.source_files  = 'Classes/*.{h,m}'
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download