Skip to content

evasyst/WebRTC

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebRTC iOS framework

[!] Please report all WebRTC related (not specific to this binary build) bugs and questions to discussion group or official bug tracker. You more likely to find professional help there.

Contents

Installation

[!] Bitcode is supported by the upstream, but Google source code builder (GN) produces ~700Mb binary with enabled bitcode, so it's hardly possible to distribute as a framework via CocoaPods/Carthage and that's why bitcode is disabled in my build. Follow corresponding issue there: https://bugs.chromium.org/p/webrtc/issues/detail?id=5085

Make sure to disable bitcode for your project: Go to your project's settings and find the Build settings tab, check All and search for bitcode, then set it to No.

If you encounter linker errors, try to add the framework to embedded binaries section.

CocoaPods (add to Podfile):

pod "WebRTC"

Carthage (add to Cartfile):

github "Anakros/WebRTC"

Manual: just download framework from the latest release and copy it to your project

You can only use the binary release, because the whole WebRTC repository takes ~12Gb of disk space

Usage

Swift

import WebRTC

let device = UIDevice.string(for: UIDevice.deviceType())

print(device)
print(RTCInitializeSSL())

Objective-C

@import WebRTC;

NSString *device = [UIDevice stringForDeviceType:[UIDevice deviceType]];

NSLog(@"%@", device);
NSLog(@"%d", RTCInitializeSSL());

Check out Official Example App!

Information

Built from https://chromium.googlesource.com/external/webrtc/ using tools_webrtc/ios/build_ios_libs.py script with following modifications (to enable x86 architecture):

diff --git a/tools_webrtc/ios/build_ios_libs.py b/tools_webrtc/ios/build_ios_libs.py
index 734f3e216..e6f250c97 100755
--- a/tools_webrtc/ios/build_ios_libs.py
+++ b/tools_webrtc/ios/build_ios_libs.py
@@ -165,8 +165,6 @@ def main():

   # Ignoring x86 except for static libraries for now because of a GN build issue
   # where the generated dynamic framework has the wrong architectures.
-  if 'x86' in architectures and args.build_type != 'static_only':
-    architectures.remove('x86')

   # Build all architectures.
   for arch in architectures:

Links

Official Example App

Official WebRTC Source Code Repository

WebRTC Homepage

WebRTC Discussion Group

WebRTC Bug Tracker

CocoaDocs

CocoaPods Page

About

Unofficial builds of Google WebRTC iOS Framework

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 93.3%
  • Objective-C++ 6.0%
  • Other 0.7%