由于未声明的类型错误,无法 pod spec lint

Cannot pod spec lint because of undeclared type errors

我正在尝试创建一个 pod, 依赖其他 pod 进行编译(JSQSystemSoundPlayerJSQMessagesViewControllerXMPPFramework

我必须补充一点,源代码是用 Swift (1.2) 编写的,在 Xcode 6.3.2 上,我正在使用 cocoapod 0.34.4XMPPFramework 不会在最新的编译构建(循环导入))

我在使用以下命令时遇到这样的错误 pod trunk push podname.podspec --verbosepodname 已更改

error: use of undeclared type 'NSFetchedResultsControllerDelegate'
error: use of undeclared type 'UIWindow'
[!] The podspec does not validate.

这是我的播客:播客名称已更改

source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!

target 'target_example', :exclusive => true do
  pod "podname", :path => "../"
    pod "JSQSystemSoundPlayer"
    pod "JSQMessagesViewController"
    pod "XMPPFramework"
    pod "FMDB"
end

这是我的 podSpec:podname 已更改

#
# Be sure to run `pod lib lint pod.podspec' to ensure this is a
# valid spec and remove all comments before submitting the spec.
#
# Any lines starting with a # are optional, but encouraged
#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
#

Pod::Spec.new do |s|
  s.name             = "podname"
  s.version          = "0.1.0"
  s.summary          = "Summary"
  s.description      = <<-DESC
                       desc
                       DESC
  s.homepage         = "https://github.com/company/project"
  s.license          = 'MIT'
  s.author           = { "company" => "mail" }
  s.source           = { :git => "https://github.com/company/project.git", :tag => "master" }

  s.platform     = :ios, '8.0'
  s.requires_arc = true

  s.source_files = 'Pod/Classes/**/*'
  s.frameworks = 'Foundation', 'CoreData', 'UIKit'
  s.dependency 'FMDB', '~> 1.0'
  s.dependency 'JSQMessagesViewController', '~> 6.1.3'
  s.dependency 'JSQSystemSoundPlayer', '~> 2.0.0'
  s.dependency 'XMPPFramework'

end

感谢所有帮助

这些错误与 Podspec 中任何地方缺少 libxml 有关,我通过将以下内容添加到我的 Podspec 文件来修复它:

s.libraries = 'xml2'
s.xcconfig = {
'HEADER_SEARCH_PATHS' => '$(SDKROOT)/usr/include/libxml2'
}