Ios pod lib lint函数的隐式声明失败';DLog';在C99中无效

Ios pod lib lint函数的隐式声明失败';DLog';在C99中无效,ios,objective-c,xcode,cocoapods,xcodebuild,Ios,Objective C,Xcode,Cocoapods,Xcodebuild,我试图在我的prefix.pch文件中声明这个宏,该文件在XCode上运行良好,并在travis上通过了验证 我的宏看起来像: #ifndef发布 #定义DLog(uuuu格式,…)NSLog(@“%s[行%d]”“uuu格式”)、uu漂亮的函数、uuu行、35; VA_u参数) #else #定义DLog(…) #endif 我的PodSpec文件: Pod::规格新do | s| s、 name=“MyExampleProject” s、 version=“1.0.1” s、 summary

我试图在我的
prefix.pch
文件中声明这个宏,该文件在XCode上运行良好,并在travis上通过了验证

我的宏看起来像:

#ifndef发布

#定义DLog(uuuu格式,…)NSLog(@“%s[行%d]”“uuu格式”)、uu漂亮的函数、uuu行、35; VA_u参数)

#else

#定义DLog(…)

#endif

我的
PodSpec
文件:

Pod::规格新do | s|

s、 name=“MyExampleProject” s、 version=“1.0.1” s、 summary=“XXX”

s、 主页=“XXXXXX”

s、 许可证={:type=>'MIT',:file=>'license.md'}

s、 作者={“XX”=>“XX@XX.com“}

s、 平台=:ios,“8.0”

s、 source={:git=>“”,:branch=>“master”,:tag=>s.version}

s、 source_files=“MyExampleProject//.{h,m}” s、 public_header_files=“MyExampleProject//。{h}”

s、 需要_弧=真 结束

运行
pod lib lint MyExampleProject.podspec时,我得到:

MyExampleProject(1.0.1)

-错误|[iOS]xcodebuild:返回了不成功的退出代码。您可以使用--verbose
了解更多信息。


-WARN |[iOS]xcodebuild:../MyExampleClass.m:87:9:警告:函数“DLog”的隐式声明在C99[-Wimplicit函数声明]中无效。

我终于在这里找到了答案:

我需要手动添加我的
前缀.pch
的内容,因为某些原因xcodebuild没有从中读取。在我的例子中,我将
prefix.pch
的内容移动到unmbrella头中

这就是我的
podspec
现在的样子:

Pod::规格新do | s|

s、 name=“MyExampleProject” s、 version=“1.0.1” s、 summary=“XXX”

s、 主页=“XXXXXX”

s、 许可证={:type=>'MIT',:file=>'license.md'}

s、 作者={“XX”=>“XX@XX.com“}

s、 平台=:ios,“8.0”

s、 source={:git=>“”,:branch=>“master”,:tag=>s.version}

s.prefix_header_contents='#导入“MyExampleProject.h”

s、 source_files=“MyExampleProject//.{h,m}” s、 public_header_files=“MyExampleProject//。{h}”

s、 需要_弧=真 结束

完整的项目可以在这里看到: