Cocoapods : target has transitive dependencies that include static binaries when installing 'VialerSIPLib'

ⅰ亾dé卋堺 提交于 2019-12-06 20:24:55

问题


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


回答1:


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

It worked for me.!!




回答2:


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)




回答3:


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:


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.



来源:https://stackoverflow.com/questions/43236176/cocoapods-target-has-transitive-dependencies-that-include-static-binaries-when

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!