Giter Club home page Giter Club logo

webrtc_arm64_ios's Introduction

Build of Webrtc for arm64 sim

Casue the google webrtc.xcfrmaework install by pod only compiled in x64, we can't run simulator in m1/m2 mac, also we did't want run xcode in Rosetta mode. so build it ourself. hopes can help you.

在使用m1,m2 mac电脑开发ios时候如果用到google的webrtc库,直接使用pod安装会运行不起来,因为他上传的库只有x64的编译,所以我们为了不在打开Rosetta的情况下使用Xcode,自己编译可以提供给arm64模拟器以及真机都可以运行的库

simulator and arm64 for m1 mac (including m1 pro,m1 max,m2... all Mac computers with Apple silicon)

step 1: get tools

git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=`pwd`/depot_tools:"$PATH"

step 2: get source of Webrtc

mkdir -p build-webrtc
cd build-webrtc
fetch --nohooks webrtc_ios  #this will take a long time
gclient sync

step 3: build

# for true device
./src/tools_webrtc/ios/build_ios_libs.sh --build_config release --arch arm64 -o ./src/out_ios_libs_arm64

# for simulator
./src/tools_webrtc/ios/build_ios_libs.sh --build_config release --arch simulator:arm64 -o ./src/out_ios_libs_sim_arm64

# merge
xcodebuild -create-xcframework -framework ./src/out_ios_libs_arm64/WebRTC.xcframework/ios-arm64/WebRTC.framework \
  -framework ./src/out_ios_libs_sim_arm64/WebRTC.xcframework/ios-arm64-simulator/WebRTC.framework \
  -output src/WebRTC.xcframework

step 4: use

drag src/WebRTC.xcframework to xcode and start build

thanks

https://github.com/pnoyelle/WebRTC_IOS

webrtc_arm64_ios's People

Contributors

echokk11 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.