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

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

Open
Rostyk opened this issue Jan 21, 2021 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Rostyk
Copy link

Rostyk commented Jan 21, 2021

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 Rostyk changed the title Apple deprecated the ability to use "fat" frameworks . Only .xcframework are allowed Apple deprecated the ability to use "fat" frameworks . Only .xcframework are allowed, however no guide hot integrate it Jan 21, 2021
@Rostyk Rostyk changed the title Apple deprecated the ability to use "fat" frameworks . Only .xcframework are allowed, however no guide hot integrate it Apple deprecated the ability to use "fat" frameworks . Only .xcframework are allowed, however no guide how to integrate it Jan 21, 2021
@Rostyk Rostyk closed this as completed Jan 23, 2021
@Rostyk
Copy link
Author

Rostyk commented Jan 23, 2021

Yep, the crash

libcpp_atomic_refcount_increment<long> 

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

@Rostyk Rostyk reopened this Jan 23, 2021
@ethand91 ethand91 added enhancement New feature or request help wanted Extra attention is needed labels Feb 17, 2021
@ethand91
Copy link
Owner

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 :/

@fedulvtubudul
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants