Latest 1.5
Homepage https://github.com/Gruveo/videola-ios-sdk
License MIT
Platforms ios 9.0
Dependencies GruveoWebRTC

Videola.io SDK for iOS

The Videola.io SDK for iOS and a sample project.

Pod Installation

To add the Videola.io SDK for iOS to your app, you will need CocoaPods, which is a dependency manager for Objective-C and Swift. You can install CocoaPods with the following command:

$ gem install cocoapods

Podfile

To integrate the Videola.io SDK into your Xcode project using CocoaPods, add the VideolaSDK pod to your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'

target 'TargetName' do
pod 'VideolaSDK'
end

Then, run the following command:

$ pod install

Application Setup and Usage

  1. Add NSCameraUsageDescription and NSMicrophoneUsageDescription to your application’s Info.plist
  2. Set “Enable Bitcode” to NO in Target -> Build Settings -> Enable Bitcode
  3. Check the "Audio, AirPlay, and Picture in Picture" checkbox under Capabilities -> Background Modes
  4. Import VideolaSDK to the AppDelegate and your ViewController class:
    import VideolaSDK
  5. Register your сlient ID after application startup:
    VideolaCallManager.setClientId("demo")
  6. Set delegate for VideolaCallManager in the viewDidLoad function:
    VideolaCallManager.setDelegate(self)
  7. Implement creation of the Videola.io call screen:
    VideolaCallManager.callCode(code, videoCall: true, textChat: true, on: self) { (creationError) in
    if creationError != CallInitError.none {
        // show error here
    }
    }
  8. Implement the delegate function for token signing. Warning: The sample implementation below uses a signing endpoint provided by Videola.io and will only work for the demo client ID:

func request(toSignApiAuthToken token: String!) {
guard let url = URL(string: "https://demo.videola.io/signer") else {
VideolaCallManager.authorize(nil)
return
}

var request = URLRequest(url: url)
request.httpMethod = "POST"
request.setValue("text/plain", forHTTPHeaderField: "Content-Type")
request.httpBody = token.data(using: String.Encoding.utf8)

session.dataTask(with: request, completionHandler: { (data, response, error) in
    if let data = data, let signedToken = String(data: data, encoding: String.Encoding.utf8) {
        VideolaCallManager.authorize(signedToken)
    } else {
        VideolaCallManager.authorize(nil)
    }
}).resume()

}

9. Implement the other useful delegate functions:
```swift
func callEstablished() {}
func callEnd(_ reason: VideolaCallEndReason) {}
func recordingStateChanged() {}
func recordingFilename(_ filename: String!) {}
  1. Build and run your application.

Latest podspec

{
    "name": "VideolaSDK",
    "version": "1.5",
    "summary": "Official Videola SDK for adding video chat functionality to your iOS app",
    "description": "The Videola SDK for iOS lets you quickly and easily add a white-label screen with a video calling UI to your iOS app. It is the ready-to-use solution you need to add video and voice calling to your iOS app in minutes.",
    "homepage": "https://github.com/Gruveo/videola-ios-sdk",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": "Videola",
    "platforms": {
        "ios": "9.0"
    },
    "source": {
        "git": "https://github.com/Gruveo/videola-ios-sdk.git",
        "tag": "1.5"
    },
    "dependencies": {
        "GruveoWebRTC": [
            "~> 1.65.25.2"
        ]
    },
    "vendored_frameworks": "VideolaSDK/VideolaSDK.framework"
}

Pin It on Pinterest

Share This