Ios “源文件”模式与任何文件都不匹配
如果是私有pod,指向源文件的正确方式是什么? 我想创建自己的pod,但无法解决源文件的问题 我现在是这样做的: s、 source_files=“PromocodeTest/***” 这是我尝试过的方法,但没有任何效果 s、 source\u files=“PromocodeTest/source/*.swift” s、 source_files=“PromocodeTest.{h}” 下面是如何设置我的项目 每次运行pod spec lint时,我都会遇到上述错误:[iOS]文件模式:Ios “源文件”模式与任何文件都不匹配,ios,swift,cocoapods,Ios,Swift,Cocoapods,如果是私有pod,指向源文件的正确方式是什么? 我想创建自己的pod,但无法解决源文件的问题 我现在是这样做的: s、 source_files=“PromocodeTest/***” 这是我尝试过的方法,但没有任何效果 s、 source\u files=“PromocodeTest/source/*.swift” s、 source_files=“PromocodeTest.{h}” 下面是如何设置我的项目 每次运行pod spec lint时,我都会遇到上述错误:[iOS]文件模式:源文
源文件
模式与任何文件都不匹配。
帮助我解决这个问题当您创建自己的专用POD时,通常会有一个这样的文件夹结构(通过终端或Finder检查): 如您所见,应该有一个
PromocodeTest
文件夹,其中正好包含两个子文件夹,即Classes
和Resources
假设您的.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项目,然后再尝试,这将自动为您创建这些类和资源文件夹,并在pod项目的配置中正确链接它们(即.xcodeproj
)
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