Tarek hemdan
Tarek hemdan

Reputation: 874

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

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

Upvotes: 13

Views: 19115

Answers (5)

Akash Shindhe
Akash Shindhe

Reputation: 576

It's a weird one. For me uninstalling and installing again worked. Steps -

  1. Comment(#) the error causing pod in pod file
  2. Pod install
  3. Uncomment the line in pod file and save
  4. Pod install

Upvotes: 1

Pranav Gupta
Pranav Gupta

Reputation: 811

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

It worked for me.!!

Upvotes: 19

Ali
Ali

Reputation: 2487

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

Upvotes: 2

Lucas Huang
Lucas Huang

Reputation: 4016

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.

Upvotes: 1

Tarek hemdan
Tarek hemdan

Reputation: 874

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)

Upvotes: 1

Related Questions