Skip to content

ATOS-VIRTUAL-CARE/vcs-realtime-sdk-ios-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 

Repository files navigation

VCS Realtime SDK Sample Application for iOS

This repository provides a sample application written in Swift, using the Virtual Care Service (VCS) Realtime iOS SDK to demonstrate how to join virtual rooms and interact with other participants via audio and/or video.

How to Run the Sample Application

Perform the following steps to get started with the sample application

  • Clone - Clone the repository
  • Setup - Set up the sample application to run on a device or simulator
  • Build and Run - Build and run the application
  • More Information - Where to find more information

Clone the repository

git clone https://github.com/ATOS-VIRTUAL-CARE/vcs-realtime-sdk-ios-demo.git
cd vcs-realtime-sdk-ios-demo

Using Xcode version 14 is recommended for developing with the iOS SDK at this time.

Using Xcode, open the RealtimeSDKDemo.xcodeproj file in the examples/RealtimeSDKDemo directory. Then perform the following steps:

Setup

  • Remove VcsRealtimeSdk.framework from the Frameworks folder.

  • Include the following dependent Swift packages manually:

https://github.com/ATOS-VIRTUAL-CARE/vcs-realtime-sdk-ios

Once Xcode finds the package, select Up to Next Major Version for the Dependency Rule to get the latest version of the VCS SDK.

https://github.com/ATOS-VIRTUAL-CARE/webrtc-ios

Once Xcode finds the package, select Exact Version for the Dependency Rule and select version 104.0.0.

https://github.com/apollographql/apollo-ios

Once Xcode finds the apollo-ios package, select Up to Next Major Version for the Dependency Rule and select version 0.51.2.

When the Apollo package is imported, only select the following package products:

  • Apollo
  • ApolloAPI
  • ApolloWebSocket
  • In the RealtimeSDKDemo target, change the Team and Bundle Identifier to the appropriate values for your development environment.
  • Change the server address for your specific deployment in the RealtimeSDKSettings.swift file. If you are running the sample app locally, see the following link for more information about how to access the application: Running the app locally.
class RealtimeSDKSettings {

    /// Application server provides room tokens and VCS domain name based on "Room name"  &  API key
    static let applicationServer = ""
    static let serverUsername = ""
    static let serverPassword = ""
}

It is also possible to enter these values from the demo app's settings screen. Include the http or https prefix when specifying the application server either in the RealtimeSDKSettings.swift file or on the settings screen.

Running the application server locally

For development purposes, the demo application server may be run locally to provide access to a test system. See the sample application for web clients Running application locally for instructions. The application server address to be configured in the mobile client will be the localhost's IP address and the port the application server is listening on. Also, "http://" must prefix the address when not using TLS. Example address: http://192.168.1.232:3001

Build and Run

Build the application and run on a device or the simulator. Note that the simulator does not provide video.

Once the application is running, do the following:

  • Enter a name in the Room name field
  • Enter a name in the Your name field (optional)
  • Select the media type (Audio only/Video only/Audio and Video)
  • Tap on Create Room to create and join the room
  • From another client, join the room using the same room name

More Information

Where to find more information about the VCS Realtime s and APIs.