我正在整合我的一个github repos(这里有完整的代码,如果它有帮助)和Cocopods,我跑的时候会收到这个错误pod spec lint
.
-> DropDownMenu (0.0.1) - ERROR | [iOS] The `source_files` pattern did not match any file.
这是.podspec
我认为导致问题的相关代码.
看一下这里的例子,这里和这里,我尝试了以下内容
s.source_files = 'Classes/*.{h,m}' s.source_files = 'Classes/DropDownMenu.{h,m}' s.source_files = 'Classes' s.source_files = 'Classes/**/*.{h,m}'
我的s.source_files
领域不正确吗?或者我做错了.podspec
什么?我该怎么做才能解决这个问题?
我的问题类似于这个问题,但解决方案对我不起作用(我的代码在Github上更新).
问题是你的podspec引用了一个还没有Classes文件夹的提交,
即此提交没有类文件夹,但https://github.com/kevinrandrup/DropDownMenu/tree/09c9b3d515b78550557eabc0a8542f9f6f2623cf
您可以通过引用最新提交来修复此问题,即将podspec源更改为:
s.source = { :git => "https://github.com/kevinrandrup/DropDownMenu.git", :commit => "0d6761feefccff1f7d8b7c7788ceb8e9cd1314ea" } s.source_files = 'Classes/*.{h,m}'
在CocoaPods为我的版本1.1.0 RC3自动生成podspec文件后,我遇到了这个问题.
Podspec文件中的原始行是:
s.source_files = 'Pod/Classes/**/*'
我修改它来修改它:
s.source_files = 'NAME_OF_POD/Classes/**/*'