mediasoup-ios-client icon indicating copy to clipboard operation
mediasoup-ios-client copied to clipboard

Apple deprecated the ability to use "fat" frameworks . Only .xcframework are allowed, however no guide how to integrate it

Open Rostyk opened this issue 3 years ago • 3 comments

Fat library issues It would be great to be able to use a .xcframework rather than a "fat" .framework containing an iOS and iOS simulator slice.

Building a "Fat" framework (as mentioned in the build guide of mediasoup) cannot be built directly by Xcode, and is not supported any more: apple support discussion here

I made a "fat" library as in the guide here, then dragged libwebrtc.a, libmediasoup.a, libsdptransform.a and 15 public headers to xCode 12 hello world project and did not manage to make the linker work.

Always getting Undefined symbols for architecture arm64: "_OBJC_CLASS_$_MediasoupDevice", referenced from: objc-class-ref in ViewController.o ld: symbol(s) not found for architecture arm64

So as of now unfortunately it is not possible to make it work using the Install guide.

xcframework I built a mediasoup client xcframework and dragged it to xCode 12/11 project. (Checked all the embed settings). The app compiles and start however immediately crashes with

  EXC_BAD_INSTRUCTION
  mediasoup_client_ios`std::__1::__libcpp_atomic_refcount_increment<long>:

Link to image with xCode stack

Any input would be appreciated, thanks

Rostyk avatar Jan 21 '21 17:01 Rostyk

Yep, the crash

libcpp_atomic_refcount_increment<long> 

is permanent when you try to use mediasoup_client_ios .xcframework in xCode 11/12

Rostyk avatar Jan 23 '21 12:01 Rostyk

Since simulator doesn't support camera, at some point I would like to remove the simulator archs from the library.

Yes xcframework does need to be supported... I just wish the webrtc library wasn't so huge :/

ethand91 avatar Feb 17 '21 06:02 ethand91

I've managed to build XCFramework that works on all modern devices and simulators. You can find the project and build scripts for dependencies in our fork: https://github.com/VLprojects/mediasoup-ios-client/blob/master/build.sh

fedulvtubudul avatar Oct 19 '21 04:10 fedulvtubudul