Creating a Pod Object, Cocoapods lint source_files

I am creating a static library, and I want to make podspec so that it can be included in other projects. To create the correct structure, I used the command:

pod lib create <library_name> 

He generated the following structure

  • .podspec
  • CHANGELOG.md
  • Classes
  • Project
  • README.md
  • Rakefile
  • LICENSES

I created a new Xcode project inside the "projects" directory. I also added two files to the project Test1.h and Test2.h and saved them in the class directory. In addition, I added a header search path variable to the xCode project settings "../Classes/", so classes and headers in other directories are visible to the compiler. (Is there a way to have a group in Xcode so that all classes added to it go to the Classes directory and the compiler can see them automatically?)

So now it looks like

  • .podspec
  • CHANGELOG.md
  • Classes
    • Test1.h
    • Test2.m
  • Project
    • (folder)
    • .xcodeproj
    • Test
    • Podfile
  • README.md
  • Rakefile
  • LICENSES

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 template source_files not match any files.

1 podspec analyzed.

[!] The specification did not pass verification.

What is the problem? I'm stuck on this for hours.

+8
ios cocoapods
source share
1 answer

It also made me throw the clock. Then I discovered that the files and tags must be present in the original git repository. So make sure you push your code and your tags to the remote repo ...

Update:

You can also do "pod lib lint" to use local files, not the git repository.

+10
source share

All Articles