I'm creating my first CocoaPod project (ObjC) which requires a Swift dependency. When I try to lint the project I get the error:
Pods written in Swift can only be integrated as frameworks; add
use_frameworks!
to your Podfile or target to opt into using it.
I understand how to do this when including a CocoaPod in a regular xcode project, but how do I solve this issue when the project is a CocoaPod? I tried adding the 'use_frameworks!' declaration in the podspec file but that doesn't seem to be correct.
Here is my podspec file:
Pod::Spec.new do |s|
s.name = "my-custom-pod"
s.version = "0.0.1"
s.summary = "totally awesome stuff"
s.description = <<-DESC
more details about the totally awesome stuff, if only it worked :(
DESC
s.homepage = "https://awesomestuff.com"
# s.screenshots = "www.example.com/screenshots_1", "www.example.com/screenshots_2"
s.license = 'MIT'
s.author = { "Me" => "me@awesomestuff.com" }
s.source = { :git => "https://awesome.com/awesome/my-custom-pod.git", :tag => s.version.to_s }
s.social_media_url = 'https://twitter.com/awesomestuff'
s.platform = :ios, '8.0'
s.requires_arc = true
s.source_files = 'Pod/Classes/**/*'
s.resource_bundles = {
'my-custom-pod' => ['Pod/Assets/*.png']
}
# s.public_header_files = 'Pod/Classes/**/*.h'
s.frameworks = 'CoreLocation', 'MapKit'
s.dependency 'SSKeychain', '~> 1.2.3'
s.dependency 'FMDB', '~> 2.5'
s.dependency 'GoogleMaps', '~> 1.10.4'
s.dependency 'Socket.IO-Client-Swift', '~> 4.0.4'
end
Here, the socket io client is the issue. I'm able to import the socket io framework into my other ObjC projects no problem, but I've never tried to do it into a custom cocoa pod.
Any help is much appreciated. Thanks in advance.