Automatically strip arch from webrtc framework build.

Hi!

I am using the WebRTC package for Unity ( GitHub - Unity-Technologies/com.unity.webrtc: WebRTC package for Unity ) 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

That’s right. we had provided the universal binary for iOS build in the previous version. In the latest version 2.4.0-exp.5, we removed x86_64 support from iOS framework.
https://docs.unity3d.com/Packages/com.unity.webrtc@2.4/changelog/CHANGELOG.html#240-exp5---2022-02-02

Could you try the version and give me your thought?

I tried and it is working perfectly :slight_smile: .
Thank you for all your hard work on the webrtc package !