Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ed41875

Browse filesBrowse files
authored
Add building instructions
1 parent 58790c8 commit ed41875
Copy full SHA for ed41875

File tree

Expand file treeCollapse file tree

1 file changed

+49
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+49
-0
lines changed

‎README.md

Copy file name to clipboardExpand all lines: README.md
+49Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,52 @@ All you need to do is add the import statement to use for Swift:
2121
```
2222
import WebRTC
2323
```
24+
25+
## Building
26+
To Build your own WebRTC Framework, similar to the one I have build,
27+
the instructions are as follows:
28+
29+
Clone the WebRTC Source:
30+
31+
```
32+
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
33+
export PATH=$PATH:/path/to/depot_tools
34+
35+
fetch --nohooks webrtc_ios
36+
37+
gclient sync
38+
```
39+
40+
Generate the macOS Targets (x86_64 and arm64)
41+
42+
```
43+
gn gen out/mac_x64 --args='target_os="mac" target_cpu="x64" is_component_build=false is_debug=false rtc_libvpx_build_vp9=false enable_stripping=true rtc_enable_protobuf=false'
44+
45+
gn gen out/mac_arm64 --args='target_os="mac" target_cpu="arm64" is_component_build=false is_debug=false rtc_libvpx_build_vp9=false enable_stripping=true rtc_enable_protobuf=false'
46+
47+
```
48+
49+
Build both frameworks:
50+
51+
```
52+
ninja -C out/mac_x64 mac_framework_objc
53+
54+
ninja -C out/mac_arm64 mac_framework_objc
55+
```
56+
57+
Merge the frameworks using `lipo`:
58+
59+
```
60+
cd ..
61+
62+
cp -R src/out/mac_x64/WebRTC.framrwork WebRTC.framework
63+
64+
lipo -create -output WebRTC.framework/WebRTC src/out/macos_x64/WebRTC.framework/WebRTC src/out/macos_arm64/WebRTC.framework/WebRTC
65+
```
66+
The outputted `WebRTC.franework` can be imported into an Xcode Project and will support both Intel and Apple Silicon Macs
67+
68+
## Licensing
69+
70+
- This port of WebRTC, and any changes that maybe made by me will fall under the [MIT License](https://github.com/tmthecoder/WebRTC-macOS/blob/main/LICENSE)
71+
72+
- WebRTC's license can be found [here](https://github.com/tmthecoder/WebRTC-macOS/blob/main/LICENSE)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.