Skip to content

Latest commit

 

History

History
132 lines (90 loc) · 3.37 KB

BUILD_WEBRTC.md

File metadata and controls

132 lines (90 loc) · 3.37 KB

Build WebRTC

1. Prerequisites

  • At least 30 GB of free disk space

  • Matching macOS and Xcode version (see Versions)

2a. Setup Fresh Build

  1. Change to your iOS-Project folder

    cd /path/to/your/ios-project
  2. Create a new folder and go into it

    mkdir WebRTC-build
    cd WebRTC-build
  3. Clone depot tools and add them to your current PATH

    git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
    export PATH=$(PWD)/depot_tools:$PATH
  4. Choose and set WebRTC and patch commit to use (see Versions below)

    export COMMIT=commit_id
    export PATCH_COMMIT=patch_commit_id
    
    # e.g.
    # export COMMIT=b83487f08ff836437715b488f73416215e5570dd
    # export PATCH_COMMIT=e8c6ee36392fb167a96d9c808f6d4638510c3178
  5. Fetch a regular WebRTC checkout with the iOS-specific parts added. (This might take a while...)

    fetch --nohooks webrtc_ios
  6. Get patches

    git clone https://github.com/threema-ch/webrtc-build-docker.git
    cd webrtc-build-docker

    (The patches are part of our WebRTC PeerConnection Build Script.)

2b. Setup Rebuild

  1. Reset applied patches

    cd WebRTC-build/src
    git reset --hard
  2. Add depot_tools to your current PATH

    export PATH=$(PWD)/depot_tools:$PATH
  3. Choose and set WebRTC and patch commit to use (see Versions below)

    export COMMIT=commit_id
    export PATCH_COMMIT=patch_commit_id
  4. Update patches

    cd ../webrtc-build-docker
    git checkout master && git pull origin master

3. Checkout and Apply Patches

  1. Check out patch commit

    git checkout $PATCH_COMMIT
  2. Go into src folder and checkout WebRTC. (This might take a while...)

    cd ../src
    git checkout master && git pull && git checkout $COMMIT && gclient sync
  3. Apply patches

    for i in ../webrtc-build-docker/patches/*.patch; do patch -p1 < $i; done

4. Build

  1. Build

    tools_webrtc/ios/build_ios_libs.py --output-dir ../out/
  2. Remove existing framework and move to correct location

    rm -r ../../WebRTC.xcframework
    mv ../out/WebRTC.xcframework ../../
    

5. (Optional) Remove temporary build folder WebRTC-build

cd ../..
rm -r WebRTC-build

Versions

iOS App Version WebRTC Commit Patch Commit macOS Version Xcode Version WebRTC Binary Version
4.8.0 (2741) ffd9187dc0d9211ad52173bf0daa5001ca7d45ee (m100) 92e9bfefac342b2c2547cd860844f9bf7fd36252 12.4 (21F79) 13.2.1 (13C100) 100.0.0