Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Automatically strip arch from webrtc framework build.

Discussion in 'Unity Render Streaming' started by maeln, Feb 11, 2022.

  1. maeln

    maeln

    Joined:
    Oct 20, 2021
    Posts:
    11
    Hi!

    I am using the WebRTC package for Unity ( https://github.com/Unity-Technologies/com.unity.webrtc ) in one of my project targeting iOS/iPhone.

    When building my project, I get a `webrtc` framework in `<build directory>/Frameworks/com.unity.webrtc/Runtime/Plugins/iOS/webrtc.framework/`. This framework contain both ARM64 arch *and* X86_64.
    As you probably already know, Apple doesn't allow to upload, to the App Store Connect, an app that contain anything else but ARM64.

    So every time I want to upload my app, I need to go to the build folder and strip the X86_64 arch from the framework using the command `lipo webrtc -thin arm64 -output webrtc`, which is easy to forgot and therefor make me lose a lot of time.
    I already know that you can add a build script in xcode to strip all lib automatically, but in my case, it causes issue with some of my other library.

    So, it is a minor annoyance, but is there a way to configure the package, or add a unity build step, to automatically strip (or simply not build) the x86_64 arch from the webrtc framework built ?

    Faithfully yours,
    Maël
     
  2. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
  3. maeln

    maeln

    Joined:
    Oct 20, 2021
    Posts:
    11
    I tried and it is working perfectly :) .
    Thank you for all your hard work on the webrtc package !