其中一个类使用#import <Cocoa/Cocoa.h>
。所以,在我的Podspec
,我包括 framework
Cocoa
我的Podspec
是
Pod::Spec.new do |s|
s.name = "MyCBDLumberJack"
s.version = "0.0.1"
s.summary = "A customization of CocoaLumberJack"
s.description = <<-DESC
A customization of CocoaLumberJack
DESC
s.author = { "Me" => "me@gmail.com" }
s.homepage = "https://www.facebook.com/me"
s.license = { :type => 'MIT',
:text => <<-LICENSE
Copyright 2014. Me.
LICENSE
}
s.source = { :git => 'https://me@bitbucket.org/me/mycbdlumberjack.git',
:tag => "#{s.version}" }
s.source_files = 'MyCBDLumberJack/My Lumberjack/**/*.{h,m}'
s.requires_arc = true
s.framework = 'Cocoa'
s.prefix_header_contents = '#import "DDLog.h"', 'static const int ddLogLevel = LOG_LEVEL_VERBOSE;'
s.dependency 'CocoaLumberjack', '~>1.8'
end
为什么会这样呢?我应该如何进行?
最佳答案
这是因为,默认情况下,您没有包含任何 platform
当您运行 pod spec lint 时,它会检查 OS X 和 iOS 上的系统。由于 iOS 没有 Cocoa.Framework
这会引发错误。
关于 cocoa 足类。规范未通过验证 : 'Cocoa/Cocoa.h' file not found but I have declared the Cocoa library,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21581525/