Welcome to the documentation for the Connectycube iOS SDK. Here you will find detailed information on how to integrate Connectycube into your iOS app to enable real-time communication features such as chat, video calling, and push notifications.
Getting Started
If you haven’t done so already, the first step is to sign up for a Connectycube account at https://connectycube.com. Once you have an account, you can create a new app and obtain your unique credentials.
To get started, follow the steps below:
- Install Xcode on your development machine. Connectycube iOS SDK requires Xcode 12 or later.
- Download the Connectycube iOS SDK from the official GitHub repository at https://github.com/Connectycube/connectycube-ios-sdk.
- Add the SDK to your Xcode project. You can either manually add the framework files or use a dependency management tool like CocoaPods.
- Import the Connectycube framework into your project by adding the following line of code at the top of your source files:
import Connectycube
Now you are ready to start using the Connectycube SDK in your iOS app.
Usage
The Connectycube iOS SDK provides a wide range of features for real-time communication. Below are some examples of how to use the SDK:
Authentication
Before you can use any of the Connectycube features, you need to authenticate as a user. Below is an example of how to authenticate a user using their Connectycube credentials:
ConnectycubeAuth.createSession(withUserLogin: "username", password: "password") { (result, session) in
// Authentication successful
} onFailure: { (error) in
// Authentication failed
}
Chat
Connectycube SDK enables real-time chat functionality in your app. Below is an example of how to send a chat message:
let message = ConnectycubeChatMessage()
message.text = "Hello, world!"
ConnectycubeChat.instance.send(message) { (error) in
if let error = error {
// Message sending failed
} else {
// Message sent successfully
}
}
Video Calling
The Connectycube SDK allows you to add video calling functionality to your app. Below is an example of how to initiate a video call:
let conferenceOptions = ConnectycubeConferenceSessionPreset.video
ConnectycubeConferenceClient.instance.create(conferenceOptions: conferenceOptions) { (conference, error) in
if let error = error {
// Conference creation failed
} else {
// Conference created successfully, join the conference
ConnectycubeConferenceClient.instance.join(conference!, completion: { (error) in
if let error = error {
// Conference joining failed
} else {
// User joined the conference successfully
}
})
}
}
Additional Resources
For more information on how to use the Connectycube iOS SDK, you can refer to the official Connectycube iOS SDK documentation. The documentation contains detailed guides, tutorials, and reference materials to help you get the most out of the SDK.
If you encounter any issues or need further assistance, you can reach out to the Connectycube support team at support@connectycube.com.