Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflict between Crisp SDK and Stasel's WebRTC Package on iOS #103

Open
stormphlegyas opened this issue Oct 28, 2024 · 3 comments
Open

Conflict between Crisp SDK and Stasel's WebRTC Package on iOS #103

stormphlegyas opened this issue Oct 28, 2024 · 3 comments

Comments

@stormphlegyas
Copy link

stormphlegyas commented Oct 28, 2024

I’m currently developing an iOS application and have encountered a conflict when trying to integrate the Crisp SDK alongside a WebRTC package compiled by the GitHub user Stasel, which is a build of the official Google WebRTC specifically for iOS.

Issue:
The Crisp SDK appears to use a package named “webrtc” that conflicts with the WebRTC package compiled by Stasel : https://github.com/stasel/WebRTC.git). Although I am not using the CrispWebRTC package, the conflict arises due to the Crisp SDK’s inclusion of a binary target also named "WebRTC." This naming overlap prevents both packages from coexisting in my app when imported via Swift Package Manager.

Steps to Reproduce:

  1. Import Stasel's WebRTC package (https://github.com/stasel/WebRTC.git) into an iOS project.
  2. Import the Crisp SDK via Swift Package Manager.
  3. Attempt to build the project.

Expected Behavior:
The project should build successfully with both Stasel's WebRTC package and the Crisp SDK integrated.

Actual Behavior:
A conflict error occurs due to both packages containing a "WebRTC" dependency with the same name, despite not using CrispWebRTC.

Request:
Would it be possible for Crisp to rename their WebRTC binary or otherwise adjust the package structure to avoid this naming conflict? This would greatly assist developers who need both the Crisp SDK and an external WebRTC package in their projects.

Thank you for any guidance you can provide on this issue!

@jmugicagonz
Copy link

jmugicagonz commented Feb 17, 2025

I have the same problem. Is there a solution?

@eliottvincent
Copy link
Member

eliottvincent commented Feb 17, 2025

Hey!

This is a problem with Swift and can happen for any two packages that have the same name.

We are working on a solution, in the mean time if you are declaring your dependencies by adding a local Swift package, instead of adding them directly in Xcode, you could alias the name themselves. See:

EDIT: Actually, it will not really fix the issue, since both frameworks contain the same C++ code (although they might be using a different revision) the next problem would be duplicate symbols. The only solution that comes to our iOS developper mind is that you'd only depend on our framework. It should work.

@stormphlegyas
Copy link
Author

Hello,

Thank you for your response and suggestions.

In my case, I am using a fork of WebRTC, which means I cannot simply rely on the WebRTC framework included in Crisp. The issue is that even though I do not need CrispWebRTC, the Crisp SDK still fetches the WebRTC package, causing a conflict with my fork.

Would it be possible to adjust the Crisp SDK structure so that WebRTC is not automatically retrieved when CrispWebRTC is not used? This would prevent conflicts and provide more flexibility for developers using a fork or an alternative version of WebRTC.

For now, I have created a fork of the Crisp SDK that does not include CrispWebRTC, which you can find here:
https://github.com/stormphlegyas/crisp-sdk-ios

I would appreciate any insights or potential solutions on this issue.

Thank you in advance for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants