`source_files`模式与任何文件都不匹配

在使用私有pod的情况下,指向源文件的正确方法是什么? 我想创建自己的广告连播,但无法通过 source_files 正确提及来解决此问题。

这是我现在的操作方法:

  

s.source_files =“ PromocodeTest / ** / *”

这是我尝试过的方法,但是没有用

  

s.source_files =“ PromocodeTest / Source / *。swift”

     

s.source_files =“ PromocodeTest。{h}”

这是我的项目的设置方式

`source_files`模式与任何文件都不匹配

每次运行 pod spec lint 时,都会出现上述错误: [iOS]文件模式:source_files模式与任何文件都不匹配。

帮我解决问题

bbcwch123 回答:`source_files`模式与任何文件都不匹配

在创建自己的私有POD(通过终端或Finder进行检查)时,通常会具有这种文件夹结构:

 - Example
 - README.md
 - PromocodeTest.podspec
 - LICENSE
 - PromocodeTest
   |- Classes
   |- Resources
 - _Pods.xcodeproj

如您所见,应该有一个PromocodeTest文件夹,其中包含正好两个子文件夹,即ClassesResources

假设您的.podspec或本示例中的PromocodeTest.podspec如下所示:

Pod::Spec.new do |s|
  s.name             = 'PromocodeTest'
  s.version          = '0.1.0'
  s.summary          = 'PromocodeTest summary description'

  s.homepage         = 'https://bitbucket.org/privaterepo/promocodetest'
  s.license          = { :type => 'MIT',:file => 'LICENSE' }
  s.author           = { 'PrivateAuthor' => 'private.author@company.com' }
  s.source           = { :git => 'git@bitbucket.org:privaterepo/promocodetest.git',:tag => s.version.to_s }

  s.ios.deployment_target = '10.0'

  s.source_files = 'PromocodeTest/Classes/**/*'
  s.resources = 'PromocodeTest/Resources/Assets/*.xcassets'

  s.ios.frameworks = 'UIKit'
end

PS:如果您无法正确设置它,请从头开始再次尝试创建一个pod项目,并按照此guide from CocoaPods using Pod Lib Create进行尝试,它会自动为您创建这些Classes and Resources文件夹并链接在您的pod项目(即.xcodeproj)的配置中正确设置了它们

本文链接:https://www.f2er.com/2935009.html

大家都在问