Getting started with Temasys SkylinkSDK for iOS.

WebRTC requires you to do significant work around solving signaling issues and resolving differences in implementation between platforms. We, at Temasys, are part of the WebRTC working group at the W3C, and create solutions with and around WebRTC. We know this part of the puzzle inside and out, and that is why we have created Temasys Skylink. We want to solve the connectivity and implementation headaches for you and let you focus on building the cool stuff.

Temasys SkylinkSDK for iOS is part of the Temasys Skylink suite of products, that enables you to easily connect your iPhone, iPod touch or iPad apps with each other and exchange audio, video, messages and files the fastest way possible. Based on WebRTC, it even allows you to connect to users on the web and on Android. Cool, eh?

This article discusses how to get started with the Temasys SkylinkSDK for iOS step by step, and where to go from there.

Visit the Temasys Skylink platform website for additional details: skylink.io


Pre-requisites

#1 Understanding App keys, rooms and peersrealmsandrooms

When you use Temasys SkylinkJS in your website or app, you can invite users (we call them peers) to join a shared space in which they can exchange data privately with each other. We call this space a room. Every peer that wants to join a room needs to know its’ unique identifier, like a secure, generated token or a simple name. We leave it up to you on how you come up with these room IDs and how you inform peers about them. One of our primary goals in Teamsys SkylinkJS was to not interfere with your application logic or UX. We recommend generating UUIDs as a best-practice here, for making the identifiers difficult to guess, reasonably unique and providing an additional layer of privacy of your users during room sessions.

In order to start using the Temasys Skylink, you would need to create an Application folder using our Developer Console or REST API. Every application creates a new realm in which your rooms can exist. You can now create unique App Keys under the application you have created. These keys are then used to help you identify yourself to the Temasys Skylink Infrastructure. Every App key for the Web platform will only work on your specified CORS domain name. If you want to have different websites or applications on different platforms(such as android/ios) to access the same realm and therefore the same rooms, you can create multiple keys under the same application – one for each platform. This extends the scope of the realm to other domain or applications.

Read more about creating a new application with our new console here.

#2 Get an App Key

In order start building with our Temasys Skylink platform, you need to get an App Key. Register for an account here.

You can then create and configure App Keys that you will later need to add in your code to connect to our platform.


 Installation

Setting up a new Xcode project workspace

These are the simple steps to get set up with an empty Xcode project.The SDK is recommended to be installed via cocoapods, if you don’t have it installed follow these steps:

Installation of Temasys SkylinkSDK
Configuring Settings

Understanding the Temasys SkylinkSDK for iOS

The main idea is to prepare and create a connection to a room via the Temasys Skylink platform. After that, you will be able to send messages to the connection and implement the desired protocols to control what happens between the local device and the peers.

Refer to Temasys Skylink API Documentation and the sample application for additional details

Temasys SkylinkSDK for iOS provides 3 classes:

Here is an example connection code:

[code language="objc" title="Create, configure and set the delegates for a new connection"] // Creating configuration
 SKYLINKConnectionConfig *config = [SKYLINKConnectionConfig new];
 config.video = YES;
 config.audio = YES;
 // Creating SKYLINKConnection
 self.skylinkConnection = [[SKYLINKConnection alloc] initWithConfig:config appKey:self.skylinkApiKey];
 self.skylinkConnection.lifeCycleDelegate  = self;
 self.skylinkConnection.mediaDelegate      = self;
 self.skylinkConnection.remotePeerDelegate = self;
 // Connecting to a room
 [self.skylinkConnection connectToRoomWithSecret:self.skylinkApiSecret roomName:ROOM_NAME userInfo:nil];
[/code]

The common next step is to implement protocols, Temasys SkylinkSDK for iOS provides 5 protocols:

The SKYLINKConnectionLifeCycleDelegate and the SKYLINKConnectionRemotePeerDelegate are the most important. These will give you general details about the lifecycle and the peers that are joining and leaving your application.It is advised to implement them for all applications.

MediaDelegates are implemented if you are using the Temasys SkylinkSDK for simply adding video/voice communication capabilities. Similarly, message delegates and file transfer delegates can be implemented based on whether you require messaging and data transfer capabilities for your application – you get the idea!

That’s about it. We can’t wait to see what you’ll create with our technology! Before you go playing with our SDK, on Xcode, let me just give you important some links.


 Resources

This document was edited for Temasys SkylinkSDK for iOS version 1.0.8

Leave a Reply

Your email address will not be published. Required fields are marked *