mobile-messaging-sdk-ios icon indicating copy to clipboard operation
mobile-messaging-sdk-ios copied to clipboard

Conflict with another SPM package because of WebRTC

Open Lopdo opened this issue 1 year ago • 4 comments

  • MobileMessaging SDK version: 12.3.3
  • Xcode version: 15.2
  • Your application language: Swift
  • Cocoapods version: Using SPM, not CocoaPods

I am trying to add mobile-message-sdk-ios to my project, but I am getting conflicts on WebRTC during package dependency resolution, because I already have a package that uses WebRTC (Sendbird). They both include it as binaryTarget, so I am not sure if there is anything I can do to resolve this. Would renaming one WebRTC to something unique help? I am assuming that's not something I can do, but has to be done by vendor

Lopdo avatar Feb 09 '24 09:02 Lopdo

Hi @Lopdo,

I am afraid we won't be able to prepare a workaround for this (if it is even possible) in a short period of time. There are many different versions of WebRTC binaries released regularly, and we strip anything but what we need in order to have a size as reduced as possible. It would be tricky to have two independent SDK in sync.

That being said, I could not reproduce any problem when trying to add both SDKs, so please help us with that:

  1. I did create a new clean project.
  2. Imported Infobip's Mobile Message SDK (with all its sub-libraries, WebRTCUI included,) and Sendbird SDK, from Xcode package dependency.
  3. Built and run the mostly empty app without issues.

Is there any extra step required, like actually using the Sendbird SDK, or defining the dependencies in a special manner, that you consider necessary to reproduce the problem?

fortesdev avatar Feb 13 '24 08:02 fortesdev

Hi @fortesdev, my apologies, I should have been more specific about the Sendbird package. The issue is with the sendbird-calls-ios package, not the sendbird-ios-framework which I am assuming you tried. sendbird-calls-ios has the WebRTC dependency because of the VoIP and video calls, sendbird-ios-framework does not have that dependency.

Would renaming WebRTC module using moduleAliases in your target's dependency help or would that just compile issues down the line?

Lopdo avatar Feb 13 '24 08:02 Lopdo

@Lopdo Ok, we can repro. We'll research the use of modulaAlias and evaluate the potential impact in existing customers. It may take a few weeks for us to have some results, though. All in all, thanks for pointing this out and I hope the outcome is satisfactory.

fortesdev avatar Feb 13 '24 10:02 fortesdev

Sounds good, thanks for checking it out.

As for my project, I was able to add both packages when one of them was added using CocoaPods. Since we already have both CocoaPods and SPM in place, it wasn't a huge deal, but it's still not ideal solution. I am hoping for some kind of fix in near future, but at least, I am not stuck anymore

Lopdo avatar Feb 13 '24 12:02 Lopdo

We decided not to support the scenario described above (for the time being) due to lack of demand for our customers.

fortesdev avatar Aug 16 '24 10:08 fortesdev