ios - pod lib lint fails implicit declaration of function 'DLog' is invalid in C99 -


i tried declare macro on prefix.pch file works great on xcode , passes validation on travis.

my macro looks like:

#ifndef release

#define dlog(__format__, ...) nslog((@"%s [line %d] " __format__), __pretty_function__, __line__, ##__va_args__)

#else

#define dlog(...)

#endif

my podspec file this:

pod::spec.new |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 end

when running pod lib lint myexampleproject.podspec get:

myexampleproject (1.0.1)

- error | [ios] xcodebuild: returned unsuccessful exit code. can use--verbosefor more information.

- warn | [ios] xcodebuild: ../myexampleclass.m:87:9: warning: implicit declaration of function 'dlog' invalid in c99 [-wimplicit-function-declaration]

i found answer here: apptentive-ios

i needed manually add contents of prefix.pch reason xcodebuild not reading it. in case, moved content of prefix.pch unmbrella header.

this how podspec looks now:

pod::spec.new |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.prefix_header_contents = '#import "myexampleproject.h"'

s.source_files = "myexampleproject//.{h,m}" s.public_header_files = "myexampleproject//.{h}"

s.requires_arc = true end

the full project can seen here: easydoanloadsession


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -