Giter VIP home page Giter VIP logo

webrtc's Introduction

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

webrtc's People

Contributors

alexkmdev avatar tomashubelbauer avatar

Watchers

James Cloos 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.