1
votes

I made a Swift framework I want to make a CocoaPods for it.
I've followed all the instructions:

  • created podspec file, added version tag, pushed it to github When I run pod lib lint it passes but when I run pod spec lint it fails.

Here is my podspec file

Pod::Spec.new do |s|

  s.name         = "Seru"
  s.version      = "0.0.3"
  s.summary      = "Seru is Simple Core Data stack"
  s.description  = <<-DESC
                   Seru is Swift framework for working wit Core Data. It setup your core data stack and 
                   gives you nica actions to work with it
                   DESC

  s.homepage     = "https://github.com/kostiakoval/Seru"
  s.license      = { :type => "MIT", :file => "LICENSE" }
  s.author             = { "Kostiantyn Koval" => "[email protected]" }
  s.social_media_url   = "http://twitter.com/kostiakoval"

  s.platform     = :ios, "8.0"
  s.source       = { :git => "https://github.com/kostiakoval/Seru.git", :tag => s.version }

  s.source_files  = "Seru/Source", "Seru/Source/**/*.{swift}"
  s.requires_arc = true
  s.ios.vendored_frameworks = 'Carthage/Build/iOS/Sweet.framework'

end

It has external framework dependency. I'm guessing this is a problem. When I do pod speck lint, it says that I can't find that external framework

1

1 Answers

1
votes

The problem was that CocoaPods don't include vendored_frameworks folder.
To fix it is to specify that this folder should be included to a CocoaPod by using preserve_paths.

s.preserve_paths = 'Carthage/Build/iOS/Sweet.framework'