Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sockets/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios cocoapods中源文件的问题_Ios_Cocoapods_Podspec - Fatal编程技术网

Ios cocoapods中源文件的问题

Ios cocoapods中源文件的问题,ios,cocoapods,podspec,Ios,Cocoapods,Podspec,我是iOS编程和cocoapod的新手,我对“pod lib lint”有一个问题(事实上,我有很多问题,因为我还在学习:p)。 问题是我的podspec文件在两个不同的文件中,在不同的文件夹中。在第一个示例中,当我执行“pod lib lint”时,它表示一切正常,但在第二个示例中(它是第一个示例的副本,但在cocoaPods项目中,准备执行拉请求)抛出以下错误: - ERROR | The `source_files` pattern did not match any file. - WA

我是iOS编程和cocoapod的新手,我对“pod lib lint”有一个问题(事实上,我有很多问题,因为我还在学习:p)。 问题是我的podspec文件在两个不同的文件中,在不同的文件夹中。在第一个示例中,当我执行“pod lib lint”时,它表示一切正常,但在第二个示例中(它是第一个示例的副本,但在cocoaPods项目中,准备执行拉请求)抛出以下错误:

- ERROR | The `source_files` pattern did not match any file.
- WARN  | Unable to find a license file
我在谷歌上搜索了一下,很多人对这个错误都有疑问,但是没有人说根据路径的不同会有问题

我的podspec文件中“有趣”的部分是

Pod::Spec.new do |s|
  s.name             = "countdown"
  s.version          = "0.2.1"
  s.summary          = "Countdown is a class to implement a timer used to do a countdown"
  s.description      = <<-DESC
                       Countdown was created to provide a simple and fast way to create our own countdown in apps that need this feature. This countdown counts in seconds, but when the remaining time is less than one minute it counts in tenths.

As you will see, right now is a very simple class, with just some methods to use, but we will upload more methods as soon as somebody need it.

Please, if you want to help us to improve Countdown, send us your opinion to info@omitsis.com or just comment here ;-)
                       DESC
  s.homepage         = "http://www.omitsis.com/"
  s.license          = 'MIT'
  s.author           = { "Omitsis Consilting S.L." => "info@omitsis.com" }
  s.source           = { :git => "https://github.com/omitsis/countdown-ios.git", :tag => "v0.2.1" }
  s.social_media_url = 'https://twitter.com/omitsis'

  s.requires_arc = true

  s.source_files = 'Classes/ios/*.{h,m}'

  s.ios.exclude_files = 'Classes/osx'
  s.frameworks  = 'XCTest', 'Foundation'
end
Pod::Spec.new do|s|
s、 name=“倒计时”
s、 version=“0.2.1”
s、 summary=“Countdown是一个实现用于倒计时的计时器的类”
s、 说明=”https://github.com/omitsis/countdown-ios.git“,:tag=>“v0.2.1”}
s、 社交媒体https://twitter.com/omitsis'
s、 需要_弧=真
s、 source_files='Classes/ios/*.{h,m}'
s、 ios.exclude_文件='Classes/osx'
s、 框架='XCTest','Foundation'
结束
有人能帮我解决这个问题吗?
感谢大家,如果这个问题相当“noob level”,我很抱歉。

我相信您正试图通过CocoaPods Specs将您的倒计时添加到公共播客中?太棒了,这就是方法

目前,这是一个手动过程(从)

  • 本地克隆CoCoapod/规格
  • 在一次提交中,将Pod文件夹添加到主列表中,并按照创建Pod Repo部分中描述的格式添加规范
  • 运行
    pod spec lint
    检查错误
  • 如果过梁产生错误或警告,请修复它们并返回步骤3。如果没有,请继续
  • 向主人问好

但是在未来的版本中,您应该能够使用新的
pod trunk
命令轻松完成这一任务。

最好将整个pod spec文件添加到这个问题中。当然!我刚刚编辑了原文:D。谢谢你的快速回答!两件事。我相信你应该用“吊舱规格线头”来测试你的吊舱规格。我试过你的代码,验证得很好。见下面我的答案。其次,不要用非正式的方式写你的SO问题。阅读起来很麻烦,给问题增加了噪音,可能会被有帮助的人跳过。这也有助于让非英语使用者难以阅读。要正式、准确、简洁。谢谢你对我的帮助和关于非正式语言的建议。我真的很感激,没问题。祝你好运,谢谢!我终于在没有错误的情况下制作了podspec,并提出了拉取请求!