pid lib lint失败函数'DLog'的隐式声明在C99中无效
我试图在我的prefix.pch
文件上声明此宏,该文件在XCode上非常好用,并通过了travis上的验证。pid lib lint失败函数'DLog'的隐式声明在C99中无效
我的宏如下所示:
#ifndef RELEASE
#define DLog(__FORMAT__, ...) NSLog((@"%s [Line %d] " __FORMAT__), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
#else
#define DLog(...)
#endif
MY PodSpec
file:
Pod:Spec.new do | s |
s.name = “MyExampleProject” s.version = “1.0.1” s.summary = “XXX”
s.homepage = “XXXXXX”
s.license = {:类型=> 'MIT',:文件=> 'LICENSE.md'}
s.author = { “XX”=> “[email protected]”}
s.platform =:IOS, “8.0”
s.source = {:GIT中=> “https://github.com/XX/XX.git”:分支=> “主”,是:标签=> s.version}。
s.source_files =“MyExampleProject//{H,M} “ s.public_header_files = ”MyExampleProject// {H}“
s.requires_arc =真 结束
当运行pod lib lint MyExampleProject.podspec
我得到:
MyExampleProject (1.0.1)
- ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code. You can use
--verbose for more information.
- WARN | [iOS] xcodebuild: ../MyExampleClass.m:87:9: warning: implicit declaration of function 'DLog' is invalid in C99 [-Wimplicit-function-declaration]
我终于在这里找到了答案: apptentive-ios
我需要手动添加的我prefix.pch
的内容出于某种原因xcodebuild联编不从它读取。就我而言,我将prefix.pch
的内容移到了unmbrella标题中。
这是我现在podspec
的样子:
波德:: Spec.new做| S |
s。NAME = “MyExampleProject” s.version = “1.0.1” s.summary = “XXX”
s.homepage = “XXXXXX”
s.license = {:类型=> 'MIT' ,:文件=> 'LICENSE.md'}
s.author = { “XX”=> “[email protected]”}
s.platform =:IOS, “8.0”
s.source = {:git =>“https://github.com/XX/XX.git”,:branch =>“master”,:tag => s.version}
s.prefix_header_contents = '#import "MyExampleProject.h"'
s.source_files = “MyExampleProject//。{H,M}” s.public_header_files = “MyExampleProject//。{H}”
s.requires_arc =真正 结束
整个项目可以在这里看到:EasyDoanloadSession