Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 826
Tarek hemdan Avatar asked Apr 05 '17 16:04

Tarek hemdan


People also ask

Which is necessary to import them from Swift when building as static libraries?

To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.)

How do I add pods dependencies?

You can add dependencies on subspecs. Specify the minimum deployment target version for the Pod library. Re-import the project.

What is Use_frameworks?

use_frameworks! declares that you want to use dynamic frameworks, instead of static libraries. With Xcode 9.0 and CocoaPods 1.5. 0 released, you could use static libraries with swift if you do not use use_frameworks! . One problem with use_frameworks! is that all your framework in Pods/Products are frameworks.

How do I update my Mac from CocoaPods?

From the macOS Terminal run carthage update --platform iOS to build the framework then drag Updates. framework into your Xcode project.


2 Answers

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

It worked for me.!!

like image 182
Pranav Gupta Avatar answered Sep 23 '22 18:09

Pranav Gupta


To fix this issue you just need to in .podspec set static_frameworkproperty to true, so.podspec` it's seems like code below:

s.static_framework = true

s.dependency 'Firebase'
s.dependency 'Firebase/Core'
like image 28
Paresh Mangukiya Avatar answered Sep 23 '22 18:09

Paresh Mangukiya