Contents

stasel/webrtc

This repository contains a community-driven distribution of WebRTC framework binaries for iOS and macOS.

πŸ“¦ Releases

The binary releases correspond with official Chromium releases and branches as specified in the Chromium dashboard.

πŸ’‘ Things to know

  • All binaries in this repository are compiled from the official WebRTC source code .
  • No modifications are made to the source code or the output binaries.
  • The build process is open source using GitHub actions.
  • Dynamic framework (xcframework format) which contains multiple binaries for macOS and iOS.
  • Since Xcode 14, bitcode is deprecated. Version M103 and above does not include bitcode.
  • Added support for extra encodings: VP9, H264, H265 (HEVC)

πŸ“’ Requirements

  • iOS 12+
  • macOS 10.11+
  • macOS Catalyst 11.0+

πŸ“€ Binaries included

| Platform / arch | arm64 | x86_x64 | |---------------------|--------|---------| | iOS (device) | βœ… | N/A | | iOS (simulator) | βœ… | βœ… | | macOS | βœ… | βœ… | | macOS Catalyst | βœ… | βœ… |

Looking for 32 bit binaries? Please use Version M94 or lower

🚚 Installation

Swift package manager

Xcode has a built-in support for Swift package manager. You can easily add the package by selecting File > Swift Packages > Add Package Dependency. Read more in Apple documentation.

Or, you can add the following dependency to your Package.swift file:

dependencies: [
    .package(url: "https://github.com/stasel/WebRTC.git", .upToNextMajor("147.0.0"))
]

Use the latest branch to get the most up to date binary:

dependencies: [
    .package(url: "https://github.com/stasel/WebRTC.git", branch: "latest")
]

Cocoapods

Add the following line to your Podfile:

pod 'WebRTC-lib'

And then run

pod install

Read more about Cocoapods: https://cocoapods.org

Carthage

Add the following dependency to the Cartfile in your project:

binary "https://raw.githubusercontent.com/stasel/WebRTC/latest/WebRTC.json"

Then update the dependencies using the following command:

carthage update --use-xcframeworks

And finally, add the xcframework located in ./Carthage/Build/WebRTC.xcframework to your target(s) embedded frameworks.

Read more about Carthage: https://github.com/Carthage/Carthage

Manual

  1. Download the framework from the releases section.
  2. Unzip the file.
  3. Add the xcframework to your target(s) embedded frameworks.

πŸ‘· Usage

To import WebRTC to your code add the following import statement

import WebRTC

If you wish to see how to use WebRTC I highly recommend checking out my WebRTC demo iOS app: https://github.com/stasel/WebRTC-iOS

πŸ›  Compile your own WebRTC Frameworks

If you wish to compile your own WebRTC binary framework, please refer to the following official guide: https://webrtc.googlesource.com/src/+/refs/heads/main/docs/native-code/ios/README.md

You can also take a look at the build script I created for more details.

πŸ“ƒ License

  • BSD 3-Clause License
  • WebRTC License: https://webrtc.org/support/license

Package Metadata

Repository: stasel/webrtc

Default branch: main

README: README.md