I tried to create my first podspec combining ObjC and Swift code, but soon came across a stubborn error that I could not solve when loading
Copying MyLibrary from /Users/lukasschwoebel/Library/Caches/CocoaPods/Pods/External/MyLibrary/540307feb534d63ad9015f3f6452b3ad-be661
to ../../../../../../private/var/folders/2p/_pc_vts51b3_pfydgm7_2n200000gn/T/CocoaPods/Lint/Pods/MyLibrary
- Launching pre-installed hooks -> MyLibrary (0.1.0) - ERROR | [iOS] An unknown error was detected (Pods written in Swift can only be integrated as frameworks, this function is still in beta. Add use_frameworks!
to your subfile or target to use it. Using Swift Pod: MyLibrary) during checks.
Here is the command I'm using:
pod repo push test-podspecs MyLibrary/MyLibrary.podspec --use-libraries --allow-warnings --verbose
As you can see, this is the smallest untouched sample project from CocoaPods, as described here: https://guides.cocoapods.org/making/using-pod-lib-create.html
Since I cannot even run this sample, I suspect that something is wrong with my cocoapods configuration.
I made sure that there is not a single Objective-C line in the container that needs to be loaded (although in the end I would like to have a hook with the combined code of ObjC and Swift, but at this time I just want to have a working subspecial with Swift).
I can’t even load this simple pod using pure Swift. First I tried CocoaPods v0.39.0, then it was downgraded to 0.38.2, and then 0.38.0, even 0.36.0. Even with a full installation of CocoaPods.
, - CocoaPods, Swift podspec? , , , , Podfile use_frameworks! . , CocoaPods pod podspec?
, Xcode 7.0.1 OSX 10.10.5, Swift 2.0.
!
podspec, MyLibrary.podspec( , Podspec-Repo, / )
Pod::Spec.new do |s|
s.name = "MyLibrary"
s.version = "0.1.0"
s.summary = "A short description of MyLibrary."
s.description = 'Sample Description'
s.license = 'MIT'
s.author = { "Luke A." => "ls@mymail.to" }
s.source = { :git => "file:///Users/.../test/MyLibrary/", :tag => s.version.to_s }
s.platform = :ios, '8.0'
s.requires_arc = true
s.source_files = 'Pod/Classes/**/*'
s.resource_bundles = {
'MyLibrary' => ['Pod/Assets/*.png']
}
s.frameworks = 'UIKit'
end