错误| [iOS]文件模式:`source_files`模式与任何文件都不匹配

Kir*_*nee 3 iphone ios cocoapods swift swift3

我将我的现有库重命名为github,我改变了一切,除了现在没有验证我的库之外,其他工作正常 - pod spec lint KJCircularSlider.podspec for trunk push.我检查了我的文件夹结构,它看起来很完美,任何人都可以帮助我实际的问题是什么?
如果你想检查文件夹结构,这是我的库 - KJCircularSlider

这是我的podspec文件.

Pod::Spec.new do |s|
  s.name             = 'KJCircularSlider'
  s.version          = '0.1.0'
  s.summary          = 'Circular slider - to slide from 0 to 100 in circular shape'

# This description is used to generate tags and improve search results.
#   * Think: What does it do? Why did you write it? What is the focus?
#   * Try to keep it short, snappy and to the point.
#   * Write the description between the DESC delimiters below.
#   * Finally, don't worry about the indent, CocoaPods strips it!

  s.description      = <<-DESC
TODO: Add long description of the pod here.
It's circular slider, It provides circular shape to slide around from 0 to 100 percent, You can use it when you required a circular shape on slider rather than traditional iOS line shape slider.
                       DESC

  s.homepage         = 'https://github.com/KiranJasvanee/KJCircularSlider'
  # s.screenshots     = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
  s.license          = { :type => 'MIT', :file => 'LICENSE' }
  s.author           = { 'Kiran Jasvanee' => 'kiran.jasvanee@yahoo.com' }
  s.source           = { :git => 'https://github.com/KiranJasvanee/KJCircularSlider.git', :tag => s.version.to_s }
  # s.social_media_url = 'https://twitter.com/KiranJasvanee'

  s.ios.deployment_target = '9.0'

  s.source_files = 'Classes/**/*'

  # s.resource_bundles = {
  #   'KJCircularSlider' => ['KJCircularSlider/Assets/*.png']
  # }

  # s.public_header_files = 'Pod/Classes/**/*.h'
  # s.frameworks = 'UIKit', 'MapKit'
  # s.dependency 'AFNetworking', '~> 2.3'
end
Run Code Online (Sandbox Code Playgroud)

Kir*_*nee 8

我通过改变version number我的吊舱解决了我的问题.
我已将我的KJCurveSlider库重命名为KJCircularSlider,因为库中的重大更改我将无法使用它pod trunk push.我经常收到,当我试图使用验证以下的错误pod spec lint library.podspec,但我不得不提的完美路径s.source_filespodspec
- ERROR | [iOS] file patterns: TheSOURCE_FILES pattern did not match any file.
从此我更新的版本0.1.00.2.0,它成功验证

  • 也为我工作。 (2认同)

Tai*_* Le 7

我清除了我的 Pod 的缓存并且它起作用了!

pod cache clean YOUR_POD_NAME


Zap*_*ndr 5

  1. 如果您的 pod 源(类)和 .podspec 嵌套在某个目录(例如/RepositoryName/Classes)中,则可能会出现此问题。因此pod spec lint,无论 .podspec 文件位于 /Classes 文件夹附近,都找不到它。所以,你可以选择这样做:

s.source_files = '**/Classes/**/*.{swift}'

所以**/这部分确实在嵌套文件夹内进行搜索。

  1. 另一种选择是 pod 缓存,你可以这样做

    Pod 缓存清理 YOUR_POD_NAME

或清理 Pods 缓存目录

/Users/<#ur user name#>/Library/Caches/CocoaPods/Pods 
Run Code Online (Sandbox Code Playgroud)

PS 我不认为更改 pod 的版本是正确的答案,因为它所做的可能就是强制 pod 使用新的缓存。这不是正确的答案,因为您可能不想推送新版本,但仍然解决问题?