Write iOS apps using RTCMultiConnection

Please check all open-sourced apps here: http://webrtcweb.com/cordova-apps/

Download any application

Download any application from this page, for example video-conferencing app:


You should download the ZIP file; and extract on MacOSX. (you must use MacOSX)

How to compile iOS app?

You can use following command to compile for iOS:

cordova build ios

Open XCode, select your real iPhone6 (or an emulator) and then click "Build and then run current scheme" button from the tool-box.

It will auto-install your iOS app on your real iPhone device or on emulators.

Do you want to test on emulators?

cordova emulate ios

For more information, please check: how-to-test.txt

Development Environment Prerequisites

MacOSX 10.11 or higher
xCode 7.3 or higher
iOS 9.2 or higher

Cordova Prerequisites

npm install -g cordova

Check if your system is ready

cordova requirements

Above command will/should display a result similar to this:

Apple OS X: installed darwin ---- OSX should be 10.11 or higher
Xcode: installed 7.3         ---- MUST always be 7.3
ios-deploy: installed 1.8.4  ---- optional
ios-sim: installed 5.0.6     ---- optional

Please make sure to re-install the prerequisites if you get different result.

Modify Config.xml

<?xml version='1.0' encoding='utf-8'?>
<widget id="com.yourdomain" version="3.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"
    <icon src="www/img/icon.png" />

Please modify following XML attributes:

descriptionexample code
"id" attribute: It should be something like this:
<widget id="com.yourdomain"
"name" attribute: Name should NOT have spaces or special characters. Consider it as a "username":
"icon" attribute: You can replace "icon.png" file with your own app-icon.

Now Re-Add Cordova-based iOS platform

First of all remove old platforms, then re-add them:

# first of all, remove old iOS platforms
cordova platform remove ios

# now re-add the platform
cordova platform add ios --save

It will re-generate iOS application according to your app's new name, id, and icon.

Test on a Real iPhone device

(Use USB cable) Plugin your iPhone (6p or 7) device to your MacBook

Open XCode and click "Generic iOS Device" from the tool-bar

Select your real iPhone device

Click "Run" button from the same tool-bar

It will generate iOS app, automatically install it on your real iPhone device and automatically open it as well.

How to Modify Codes

File pathdescription
www/js/index.js this is your file; this is your code; everything goes here; open or join rooms, manage videos or layout, manage everything using this file.
www/index.html this is your HTML file; all the layout code goes here; your css+javascript will be linked through this file.
config.xml cordova relies totally on this file; cordova will check and compile plugins and platforms via this file.
www/js/RTCMultiConnection.js here goes RTCMultiConnection; you can always replace it with latest (recent) versions.
platforms/android/AndroidManifest.xml your android APK requires this file; you must enable permissions for camera+microphone through this file.