This tutorial will guide you through downloading, building and running the telehealth chat demo for iOS. You will then optionally make some basic changes to the app. Don’t worry if you have little or no iOS experience because this tutorial is aimed at all levels but if you are comfortable with Xcode, you might want to clone the code and skim this step.
PubNub supports HIPAA, GDPR, SOC2 type 2, and CCPA compliance enabling you to build telemedicine applications.
1
You’ll need the following before you begin:
The Telehealth demo app for iOS is available from https://github.com/pubnub/chat-components-ios-examples. This patient-doctor chat application uses PubNub’s Chat Components, which are pre-built UI and data building blocks to quickly create functional and visually appealing chat apps.
You can either:
Launch Xcode and from the welcome screen select ‘Clone an existing project’.
Then when prompted to enter the repository URL, enter the following:
1
Or you can invoke the git tool from a terminal to clone the source code. Navigate to an empty folder and enter the following command:
1
Or if you would rather download the source code as a zip file, click on the ‘Code’ button on GitHub and select ‘Download ZIP’. You will need to unzip the file before you can load the source.
Other options exist, GitHub is very flexible :)
If you do not already have the project loaded, launch Xcode then select File → Open.
Select the directory where the telehealth source code is located and open ‘Examples.xcworkspace.
Open the TelehealthChatProvider.swift
file which can be found within the Telehealth → PubNub folder (part of the telehealth-example
workspace). Notice towards the top of the file you need to define the following:
PUBNUB_PUB_KEY
PUBNUB_SUB_KEY
You are not ready to run the application until you obtain those PubSub keys, so that is the next step.