3

I've created a podspec file for my project, which itself has a podfile.

Podfile looks something like this:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!

pod 'FLAnimatedImage', '~> 1.0'

Podspec file is also a standard setup:

Pod::Spec.new do |s|
  s.name         = "ConversationVC"
  s.version      = "1.0.1"
  s.summary      = "ConversationViewController, for messaging"
  s.homepage     = "[HOMEPAGE URL]"
  s.author       = { "Andrew Hart" => "[EMAIL ADDRESS]" }
  s.license      = { :type => 'MIT', :file => 'LICENSE'  }
  s.source       = { :git => "[GIT URL]", :tag => s.version.to_s }
  s.platform     = :ios, '9.0'
  s.requires_arc = true
  s.source_files  = 'Source/**/*.swift'
  s.frameworks   = 'UIKit'
  s.ios.deployment_target = '9.0'
end

I'm using the pod lib lint command to make sure it passes the Podspec tests, and I'm getting this error:

ERROR | xcodebuild: /Users/Andrew/Code/ConversationVC/Source/View/ConversationImageCell.swift:10:8: error: no such module 'FLAnimatedImage'

That file does have a import FLAnimatedImage line, referencing one of my pods, as do many other files in my project.

I did try using the pod in another project, giving the git url, and it succeeded, but when I built the workspace in Xcode, it gave me the same error to do with the missing framework of FLAnimatedImage.

I'm wondering how I'm supposed to handle this situation?

Andrew
  • 7,693
  • 11
  • 43
  • 81
  • I'm having a similar issue. My Xcode doesn't throw any errors, but `pod spec lint` always fails saying `error: no such module`. – Sakiboy Jan 06 '16 at 00:08

1 Answers1

4

You should declare your dependencies in your podspec file too, like this:

s.dependecy "FLAnimatedImage", "~> 1.0"
Gauthier JACQUES
  • 655
  • 5
  • 15