Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pod spec lint fails when pod lib lint succeeds. 'vendored_frameworks' pattern did not match any file

I made an framework for which I'd like to distribute via CocoaPods.

I'm not sure if I'm doing something stupid. I've included a completed .framework folder in the base directory and I'd like that to be the source for my pod. When I run "pod lib lint", everything seems to be fine but when I run "pod spec lint" I get:

- ERROR | [iOS] The `vendored_frameworks` pattern did not match any file.

I've tried adding preserve_paths after looking through stackoverflow but that doesn't appear to resolve my issue. From reading the cocoapods document, vendored_frameworks is "The paths of the framework bundles that come shipped with the Pod" so I think it seems fine to use it here.

Here is my podspec file:

Pod::Spec.new do |s|
  s.name             = "X"
  s.version          = "1.0"
  s.summary          = "Summary"
  s.description      = "Description here"
  s.homepage         = "http://www.valid_homepage.com/"
  s.license          = { :type => "Commercial", :text => "See https://www.license_here" }
  s.author           = { "Author" => "[email protected]" }
  s.source           = { :http => "https://storage.googleapis.com/path/to/file" }
  s.social_media_url = 'https://twitter.com/handle'
  s.platform     = :ios, '7.0'
  s.requires_arc = true
  s.preserve_paths = 'X.framework'
  s.vendored_frameworks = 'X.framework'
  s.frameworks = 'SystemConfiguration'
  s.library  = 'resolv'
end

Any insights would be greatly appreciated! Thanks!

The .framework directory has the structure

Framework
  - Headers (Shortcut)
  - LibraryFile (Shortcut)
  - Versions
    - A
      - Headers (Contains .h file)
      - LibraryFile
    - Current (Shortcut to A directory)
like image 477
wesshi Avatar asked Aug 27 '15 03:08

wesshi


1 Answers

Figured it out. Basically, the folder structure of any zip you distribute has to match the search path internally. Like if your directory structure is:

.podspec
Frameworks/
    - X.framework

where

s.vendored_frameworks = 'Frameworks/X.framework'

Then it seems that when you unzip the http: resource it should have the directory structure

Frameworks/
    - X.framework
like image 160
wesshi Avatar answered Oct 13 '22 20:10

wesshi