其中一个课程使用#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
为什么会这样?我该怎么办?
答案 0 :(得分:2)
这是因为,默认情况下,由于您在运行pod spec lint
时未包含任何platform
属性,因此它会在OS X和iOS上检查系统。由于iOS没有Cocoa.Framework
,因此会引发错误。