Gist 785d5d6a4bd9ed9227e9477a432b092f
This example shows a shell script that automates building dynamic XCFrameworks for WebRTC-based libraries across multiple Apple platforms, including tvOS, visionOS (xrOS), and Mac Catalyst. It demonstrates how to configure builds for device and simulator targets using GN and Ninja, with settings like `rtc_objc_prefix = "LK"`, deployment targets, and enabled codecs like libaom and dav1d. The script generates platform-specific framework bundles by invoking `gn gen` with different `target_environment` values, then runs `ninja` to compile each variant. It also toggles debug symbols and stripping based on the input mode, highlighting a structured approach to cross-compiling and packaging iOS-family frameworks.