Create .xcframework of mediasoup 1.5.3 to add it as dependecy to my framework

Hello everyone!
I need to add mediasoup 1.5.3 to my IOS framework as dependecy. As far as I understand, i should create .xcframework file, but i can’t find a way to do it.
Now i should import it to my framework and then import both of them to my project.
Help me please!

Are you talking about IOS?

Yes, i’am

There are several third party IOS clients for this purpose you can include them in your projects. Not sure what you meant about the above line.

i wanna add it locally as in the example in the photo
Снимок экрана 2023-01-20 в 15.39.39

Not sure about that, IOS dev may help. Which mediasoup client you are using at the moment?

Maybe I didn’t say it right, I need to add the mediaoop to the SDK so that I don’t have to duplicate the mediaoop in the project where the SDK is connected. Version 1.5.3

If I am understanding it right you are saying that you have a custom built SDK for call purpose and you have added that to your project, now you want to add mediasoup to the SDK but not to the project directly right? If that is so what is the problem you are facing in doing so?

Yes, you’re understanding it right. I added mediasoup 1.5.3 to my SDK using podfile:
pod “mediasoup_ios_client”, ‘1.5.3’
And when i import my SDK to project, i have to import mediasoup too. If i dont do it i will get an error: No such module ‘WebRTC’.
i really have no idea what to do. Ready to give you more information you need.

here is SDK podfile:
target ‘MySDK’ do

use_frameworks!

pod “mediasoup_ios_client”, ‘1.5.3’

end

post_install do |pi|
pi.pods_project.targets.each do |t|
t.build_configurations.each do |config|
config.build_settings[‘BUILD_LIBRARY_FOR_DISTRIBUTION’] = ‘YES’
config.build_settings[‘ONLY_ACTIVE_ARCH’] = ‘NO’
end
end
end

here is project podfile:
platform :ios, ‘12.1’

target ‘MyProject’ do
use_frameworks!
pod ‘MySDK’
pod “mediasoup_ios_client”, ‘1.5.3’
end

So what you are saying is that mediasoup is getting included twice in your project once in SDK and once in project you have to manually add, is this right? Can you confirm that it gets included in both places? Meanwhile let me talk to one of the IOS dev, will update.

I just talked to one of senior IOS dev, he says that in SDK project don’t include pod of mediasoup client instead include raw files of mediasoup to your SDK then include your SDK in your project, it will work.

What do you mean by “raw files of mediasoup”? Can you send me something like example?
Thank you very much for helping me.

Install mediasoup in one of the projects then copy mediasoup files from there to your SDK, it is like manually installing. You got my point?

Correct me if i’m not right. Here is what i should do step-by-step:

  1. Create new xcode project
  2. Install mediasoup to this project
  3. Copy all the files from the “Pod” folder like on the screenshot
  4. Paste files to SDK folder
    Снимок экрана 2023-01-23 в 11.51.06

Yes I guess so, you will put mediasoup_ios_client where in normally install but you will put it manually. Try it out it should work.

So i copied mediasoup_ios_client folder from “Pods” folder (image 1), then put it to my SDK folder (image2) and have errors (image 3).

image 2

(post deleted by author)

Here is an error:

mediasoup_ios_client/build/mediasoup_client_ios.framework/Headers/MediasoupDevice.h:9:9: error: ‘WebRTC/RTCPeerConnectionFactoryOptions.h’ file not found
#import <WebRTC/RTCPeerConnectionFactoryOptions.h>
^
:0: error: could not build Objective-C module ‘MySDK’