Cocoapods : target has transitive dependencies tha

2020-08-16 03:09发布

I'm trying to install an objective-c Wrapper for Jsip 'VialerSIPLib' and use it in my swift project here is my pod

platform :ios, ’10.0’

use_frameworks!
target 'EMedicalAdmin' do
pod 'ObjectMapper', '~> 2.1'
pod 'Alamofire', '~> 4.3'
pod 'SwiftyAvatar', '~> 1.0'
pod 'AlamofireImage', '~> 3.1'
pod 'Eureka', '~> 2.0.0-beta.1'
pod 'JSQMessagesViewController', :git => 'https://github.com/jessesquires/JSQMessagesViewController.git', :branch => 'develop'
pod 'PKHUD', '~> 4.0'
pod 'Firebase/Core'
pod 'Firebase/Messaging'
pod 'ImageSlideshow', '~> 1.1.0'
pod 'SwiftyJSON'
pod "FlexibleSteppedProgressBar"
pod 'BTNavigationDropdownMenu', :git => 'https://github.com/PhamBaTho/BTNavigationDropdownMenu.git', :branch => 'swift-3.0'
pod 'VialerSIPLib'
end

but i get this error when installing :-

target has transitive dependencies that include static binaries:

and if i remove

use_frameworks!

from my podfile it would work but all my other swift based pods won't work

so, i'm left with using only this one pod (VialerSIPLib) or Use all my other pods except it

4条回答
手持菜刀,她持情操
2楼-- · 2020-08-16 03:47

Please add this to your podspec: s.static_framework = true This is available from cocoapods version 1.4.0.

It worked for me.!!

查看更多
我只想做你的唯一
3楼-- · 2020-08-16 03:58

use_frameworks! should be enough but sometimes the pod.lock file gets corrupted.

So you can delete the pod.lock file and then do pod repo update and pod install

查看更多
我欲成王,谁敢阻挡
4楼-- · 2020-08-16 04:01

if any one is Still wondring ,it can't be Done

Using dynamic vendored frameworks shouldn't be a problem even if the developer isn't using CocoaPods with use_frameworks!, unless they for some reason need a static lib, such as if building a command line tool, where static linking is preferable.

So .You Could add the static library manually and link it in you project or wait for the vendor to Change the library into a dynamic Framework

More info here

For me this is how i solved it :-

1- Downloaded the static library using Cocoapods without use_frameworks!

2- used Carthage for Adding other libraries

3- and if a library Doesn't have a Carthage support i would do it manually (Not advised since alot of Duplicate dependencies may Appear)

查看更多
男人必须洒脱
5楼-- · 2020-08-16 04:04

I put up a repo to show how to do: https://github.com/Lucashuang0802/CocoaPodsWithCarthage

There are a couple things to do: - install your objective-c lib via CocoaPods without indicating use_framework! in the Podfile - install your pure Swift module via Carthage

You should be able to compile fine with this solution.

查看更多
登录 后发表回答