I am storing a pre-compiled framework in Amazon s3. "pod spec lint" fails with following errors.
- ERROR | [iOS] file patterns: The `source_files` pattern did not match any file.
- ERROR | [iOS] file patterns: The `public_header_files` pattern did not match any file.
Running it with verbose option shows that it is downloading from s3, but instead of copying the downloaded framework, Cocoapod is copying the framework from '~//Library/Caches/CocoaPods/Pods/External/' directory. This turns out to be empty framework. Because of this, "pod spec lint" fails with the above mentioned errors.
Here is the relevant part from "pod spec lint" output
Http download
$ /usr/bin/curl -f -L -o /var/folders/qv/ld8pxb7d0_s1xn1mztqktj8h0000gn/T/d20160601-3868-fmxlyy/file.tgz https://s3.amazonaws.com/framework.ios.sdk/MyFramework.framework.1.0.tar.gz --create-dirs --netrc% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed100 67562 100 67562 0 0 74480 0 --:--:-- --:--:-- --:--:-- 74407
$ /usr/bin/tar xfz /var/folders/qv/ld8pxb7d0_s1xn1mztqktj8h0000gn/T/d20160601-3868-fmxlyy/file.tgz -C /var/folders/qv/ld8pxb7d0_s1xn1mztqktj8h0000gn/T/d20160601-3868-fmxlyy Copying MyFramework from
/Users/xxx/Library/Caches/CocoaPods/Pods/External/MyFramework/01a6da9f1381e3dbc8db63de5409d451-2eea2to../../../../private/var/folders/qv/ld8pxb7d0_s1xn1mztqktj8h0000gn/T/CocoaPods/Lint/Pods/MyFrameworkRunning pre install hooks
When I manually copied the framework to '~/Library/Caches/CocoaPods/Pods/External' directory validation goes through.
Here is the podspec file.
Pod::Spec.new do |s|
s.name = 'MyFramework'
s.version = '1.0'
s.summary = 'MyFramework'
s.description = 'MyFramework'
s.source = { "http"=> "https://s3.amazonaws.com/framework.ios.sdk/MyFramework.1.0.tar.gz"}
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
s.platform = :ios, "8.0"
s.source_files = 'MyFramework/Classes/**/*','MyFramework.framework/Headers/*.h'
s.ios.public_header_files = 'MyFramework.framework/Headers/*.h'
s.ios.vendored_frameworks = 'MyFramework.framework'
s.ios.frameworks = 'CoreGraphics', 'Foundation', 'MobileCoreServices', 'Security', 'SystemConfiguration', 'UIKit'
s.dependency 'AFNetworking', '~> 3.0'
s.dependency 'Mantle', '~>2.0.4'
s.dependency 'AWSCore'
s.dependency 'AWSS3'
end
Is there anything that I am missing in the podspec file. Any help is greatly appreciated.
Thanks!