openvidu-ios 🔗
An iOS native OpenVidu application built with Swift using official Google WebRTC library.
If it is the first time you use OpenVidu, it is highly recommended to start first with openvidu-hello-world tutorial due to this being a native iOS app and being a little more complex for OpenVidu beginners.
openvidu-ios features 🔗
Feature | Enable |
---|---|
OpenVidu compatibility | from 2.15.0 |
Latest iOS versions | |
OpenVidu RPC protocol | |
Mute / Unmute video | |
Mute / Unmute audio | |
Toggle speaker / headset | |
Subscribe / unsubscribe stream |
Running this tutorial 🔗
To run the iOS app you need a Mac device with Xcode installed and an iOS device. You can download Xcode here.
After we have set Xcode up, we need the three components stated in OpenVidu application architecture: an OpenVidu deployment, your server application and your client application. To facilitate the first execution of the tutorial, it is configured by default to use the official OpenVidu demos (demos.openvidu.io), so both the OpenVidu deployment and the server application are provided. We just need to run the client application (i.e., openvidu-ios app):
-
Install dependencies under
./openvidu-ios/openvidu-ios
pod update pod install
-
Open Xcode and import the project (openvidu-ios.xcworkspace)
-
Run the application in your device. Check out official Xcode docs.
WARNING: the OpenVidu demos deployment is not secure and is only intended for a first quick test. Anyone could access to your video sessions. To run the tutorial in your own network, see Running this tutorial in your network
Running this tutorial in your network 🔗
Real Android and iOS devices will require a valid SSL certificate in your OpenVidu deployment to work. By default openvidu-ios tutorial uses the official demos OpenVidu deployment (demos.openvidu.io), so you can quickly test the app without having to worry about this.
But this OpenVidu deployment is not secure and anyone could access your video sessions. At some point you will need one of two things to securely develop your application:
- A real OpenVidu deployment with a valid domin name and SSL certificate.
- A local OpenVidu deployment available in your LAN network with a valid self-signed SSL certificate.
Option 1 just requires to follow the official deployment instructions. For option 2, follow the instructions explained in this FAQ. In that way we will have the OpenVidu deployment and our server application accessible through our LAN network using a single IP, port and SSL certificate.
Either way, remember to configure your new application server URL in the iOS app. You can do that on file openvidu-ios/openvidu-ios/constants/JSONConstants.swift
. The value of APPLICATION_SERVER_URL
must be the URL of your application server.