我试图在我的prefix.pch
文件上声明这个宏,该文件在XCode上运行良好,并在travis上传递验证。
我的宏看起来像:
#ifndef RELEASE
#define DLog(__FORMAT__, ...) NSLog((@"%s [Line %d] " __FORMAT__), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
#else
#define DLog(...)
#endif
我PodSpec
提交此文件:
Pod :: Spec.new do | s |
s.name =“MyExampleProject” s.version =“1.0.1” s.summary =“XXX”
s.homepage =“XXXXXX”
s.license = {:type => 'MIT',:file => 'LICENSE.md'}
s.author = {“XX”=> “XX@XX.com”}
s.platform =:ios,“8.0”
s.source = {:git => “https://github.com/XX/XX.git”,:branch => “master”,:tag => s.version}
s.source_files =“MyExampleProject / / 。{h,m}” s.public_header_files =“MyExampleProject / / 。{h}”
s.requires_arc = true 端
运行pod lib lint MyExampleProject.podspec
时,我得到:
MyExampleProject (1.0.1)
- ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code. You can use
- {冗长{1}}
for more information.
答案 0 :(得分:0)
我终于找到了答案: apptentive-ios
我需要手动添加- WARN | [iOS] xcodebuild: ../MyExampleClass.m:87:9: warning: implicit declaration of function 'DLog' is invalid in C99 [-Wimplicit-function-declaration]
的内容,因为xcodebuild没有从中读取它。就我而言,我将prefix.pch
的内容移到了伞形标题中。
这就是我的prefix.pch
现在的样子:
Pod :: Spec.new do | s |
s.name =“MyExampleProject” s.version =“1.0.1” s.summary =“XXX”
s.homepage =“XXXXXX”
s.license = {:type => 'MIT',:file => 'LICENSE.md'}
s.author = {“XX”=> “XX@XX.com”}
s.platform =:ios,“8.0”
s.source = {:git => “https://github.com/XX/XX.git”,:branch => “master”,:tag => s.version}
podspec
s.source_files =“MyExampleProject / / 。{h,m}” s.public_header_files =“MyExampleProject / / 。{h}”
s.requires_arc = true 端
完整项目可以在这里看到:EasyDoanloadSession