I have some apps that are quite similar. Therefore, I'd like to create a or some private pod(s) containing all common reusable code. My first version contains some networking functionality that uses AFNetworking and also uses KeychainItemWrapper:
Pod::Spec.new do |s|
s.name = 'CommonLib'
s.version = '0.0.1'
s.homepage = '****'
s.summary = 'My Common lib'
s.description = 'Library with common code'
s.author = { "Rens Verhage" => "*****" }
s.platform = :ios, '5.0'
s.source = { :git => "ssh://****/CommonLib.git", :tag => s.version.to_s }
s.source_files = 'CommonLib/*.{h,m}'
s.requires_arc = true
s.dependency 'AFNetworking', '~> 1.3.1'
s.dependency 'KeychainItemWrapper', '~> 1.2'
end
Running pod spec lint CommonLib.podspec gives a couple of WARN and NOTE messages:
-> CommonLib (0.0.1)
- WARN | Missing required attribute `license`.
- WARN | Missing license type.
- NOTE | [xcodebuild] AFNetworking/AFNetworking/AFHTTPClient.h:84:9: warning: SystemConfiguration framework not found in project, or not included in precompiled header. Network reachability functionality will not be available. [-W#pragma-messages]
- NOTE | [xcodebuild] AFNetworking/AFNetworking/AFHTTPClient.h:89:9: warning: MobileCoreServices framework not found in project, or not included in precompiled header. Automatic MIME type detection when uploading files in multipart requests will not be available. [-W#pragma-messages]
- NOTE | [xcodebuild] CommonLib/CommonLib/NSArray+NSArray_PerformSelector.m:19:35: warning: performSelector may cause a leak because its selector is unknown [-Warc-performSelector-leaks]
- NOTE | [xcodebuild] CommonLib/CommonLib/NSArray+NSArray_PerformSelector.m:19:51: note: used here
- WARN | [iOS] Unable to find a license file
Analyzed 1 podspec.
[!] The spec did not pass validation.
Notice there are no ERROR messages, but the spec doesn't pass validation however. I don't really no where to go from here. The message that the SystemConfiguration and MobileCoreServices frameworks are missing looks like an error to me. I tried fixing this warning by adding
s.ios.frameworks = 'MobileCoreServices', 'SystemConfiguration'
to my podspec, but that doesn't work.
So, two questions in one:
- What is the error that keeps my podspec from passing validation?
- How can I fix the warning about missing frameworks?