pristineio / webrtc-build-scripts

A set of build scripts useful for building WebRTC libraries for Android and iOS.
BSD 3-Clause "New" or "Revised" License
1.13k stars 447 forks source link

Getting Conflicts with Twilio SDK when using libjingle_peerconnection using CocoaPods #112

Open Vidhyanand-K opened 9 years ago

Vidhyanand-K commented 9 years ago

I have installed Twilio SDK and Libjingle_Peerconnection using cocoa pods as below

pod 'TwilioSDK', '~>1.2.2' pod "libjingle_peerconnection" post_install do |installer_representation| installer_representation.project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO' config.build_settings['VALID_ARCHS'] = ['armv7', 'i386'] end end end

Then I am getting conflicts with libwebrtc.a with twilio libraries like libcrypto.a, libssl.a and libTwilioClient.a

If I remove any one from the project then it is working fine. Twilio is working fine if I remove libjingle_peerconnection or libwebrtc.a is working fine if I remove Twilio SDK.

Please check below link about the error

http://stackoverflow.com/questions/31402829/twilio-crash-while-building-the-app-in-device-in-ios

How to fix above error. How can I remove dependencies from libwebrtc.a to fix it.

Thanks.

ceaglest commented 9 years ago

@Vidhyanand-K the Twilio Client SDK for iOS uses WebRTC internally, so you are including two copies of the symbols. Renaming the conflicted symbols might solve your problem, but ideally you shouldn't be using two versions of WebRTC inside a single app.

ArikYa commented 9 years ago

@Vidhyanand-K as @ceaglest said, you probably shouldn't try to include both libraries in your project. Do you have a special case that needs both? What is it?

ceaglest commented 9 years ago

Definitely interested in hearing the use case @Vidhyanand-K.

At the risk of spreading misinformation, I should point out that my previous post was incorrect. The Twilio Client SDK does not use WebRTC on iOS, but does share some of the same dependencies (their JS SDK does use WebRTC however).

Vidhyanand-K commented 9 years ago

Yes, I need both the libraries in my project.

I am implementing video chat in my project. For that I need AppRTC with libjingle_peerconnection.

Use Case:

I need libjingle_peerconnection & AppRTC for video chat. I am using Twilio SDK as well for making calls.

So I have installed both libraries using cocoapods as below

pod 'TwilioSDK', '~>1.2.2' pod "libjingle_peerconnection"

I included the files in my project that comes with AppRTC https://github.com/ISBX/apprtc-ios

The issues rises with libwebrtc.a that internally uses libcrypto.a, libssl.a files. libTwilioClient.a is also using libcrypto.a, libssl.a files

The usage of TwilioSDK & WebRTC of above libraries is different so I am getting Conflicts.

Both are individually working fine without any issues. But integrated both in one project getting conflicts.

Below are the issues I am getting

http://stackoverflow.com/questions/31402829/twilio-crash-while-building-the-app-in-device-in-ios

Can u clarify why below error is getting while building my project.

screen shot 2015-08-17 at 10 12 07 am

Thanks,

ArikYa commented 9 years ago

@Vidhyanand-K I'm sorry I can't help further, I'm just not sure your issue is with the build scripts. You can try to use the scripts to build the libraries instead of using Cocoa Pods, and then don't include libcrypto and libssl in the libraries you include into your project.

Ewg777 commented 9 years ago

@Vidhyanand-K try to create a custom podspec based on https://github.com/CocoaPods/Specs/blob/master/Specs/TwilioSDK/1.2.4/TwilioSDK.podspec.json but without

 "vendored_libraries": [
    "Libraries/libcrypto.a",
    "Libraries/libssl.a"
  ],
HanTsing commented 8 years ago

@Vidhyanand-K how do you fix this issue?

ceaglest commented 8 years ago

@HanTsing @Ewg777 There is no guarantee that the versions of libcrypto and libssl provided by your WebRTC build will be compatible with what Twilio Client needs. The only way to ensure these two libraries can run side by side is to rename the conflicting symbols on either Client or lib jingle_peerconnection.

I know this doesn't directly solve your problem, but I should mention that our Conversations SDK (powered by WebRTC) can run side by side with Client. Have a look at:

https://www.twilio.com/video