ios - CocoaPods spec fails even when problems are fixed -
recently i've released networking wrapper cocoapods. since have released few versions , of them released without problem. when try validate .podspecs file fails following errors:
-> jbmessage (1.0.6) - error | [xcodebuild] jbmessage/jbmessage/jbmessage/jbmessage.m:237:39: error: incompatible block pointer types sending 'void (^)(nsuinteger, nsinteger, nsinteger)' parameter of type 'void (^)(nsuinteger, long long, long long)' - note | [xcodebuild] afnetworking/afnetworking/afurlconnectionoperation.h:262:133: note: passing argument parameter 'block' here - error | [xcodebuild] jbmessage/jbmessage/jbmessage/jbmessage.m:244:41: error: incompatible block pointer types sending 'void (^)(nsuinteger, nsinteger, nsinteger)' parameter of type 'void (^)(nsuinteger, long long, long long)' - note | [xcodebuild] afnetworking/afnetworking/afurlconnectionoperation.h:269:128: note: passing argument parameter 'block' here
problem related setting incompatible block type afurlconnectionoperation. have changed problematic code , latest version 1.0.6 builds without errors / warnings pod spec lint
still complains. did have similar problems?
this .podspec:
pod::spec.new |s| s.name = "jbmessage" s.version = "1.0.6" s.summary = "jbmessage simple ios networking wrapper based on afnetworking" s.homepage = "https://github.com/josipbernat/jbmessage" s.license = { :type => 'mit', :file => 'license' } s.author = { "josip bernat" => "josip.bernat@gmail.com" } s.social_media_url = "https://twitter.com/josipbernat" s.platform = :ios, "6.0" s.source = { :git => "https://github.com/josipbernat/jbmessage.git", :commit => "41efff908c7f77e3b7b6097c4197558cfb41eb67", :tag => "1.0.6" } s.source_files = 'jbmessage/jbmessage/*.{h,m}' s.requires_arc = true s.dependency "afnetworking", "~> 2.2.1" end
this line culprit:
s.source = { :git => "https://github.com/josipbernat/jbmessage.git", :commit => "41efff908c7f77e3b7b6097c4197558cfb41eb67", :tag => "1.0.6" }
you refer 1.0.6 tag. when go repository, release/tag not include latest commit (41efff908c7f77e3b7b6097c4197558cfb41eb67
) solves incompatible blocks problem. define source commit tag, suspect specifying tag overwrites commit.
you have 2 options:
- create new tag, remove commit specification podspec, , update tag specification newly created tag
- remove tag specification podspec , use commit
i go number 1, because cocoapods release equals repository release, that's you.
Comments
Post a Comment