我试图创建一个pod,依靠其他pod进行编译(JSQSystemSoundPlayer
,JSQMessagesViewController
,XMPPFramework
)
我必须补充一点,源代码是用Swift (1.2)
写在Xcode 6.3.2
上的,我使用cocoapod 0.34.4
(XMPPFramework
无法编译最新版本(循环导入))
当我使用以下命令pod trunk push podname.podspec --verbose
时,我收到这样的错误: podname已更改
error: use of undeclared type 'NSFetchedResultsControllerDelegate'
error: use of undeclared type 'UIWindow'
[!] The podspec does not validate.
这是我的pod: podname已更改
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
感谢所有帮助
答案 0 :(得分:0)
这些错误与libxml
中任何位置Podspec
的缺失有关,我通过在Podspec
文件中添加以下内容来修复错误:
s.libraries = 'xml2'
s.xcconfig = {
'HEADER_SEARCH_PATHS' => '$(SDKROOT)/usr/include/libxml2'
}