This document describes how to integrate the TRTC SDK to an iOS device.
You can download the complete demo code used in this document.
Download Demo Code
If you already have a project to integrate, skip to Integrate the SDK.
First, create a project with Xcode to integrate the SDK.
Open Xcode and click File -> New -> Project:
Select Single View App
Name the project as Demo01_integration SDK and select Objective-C as Language. Enter Team, Organization Name and Organization Identifier as needed. Click Next. Select a location to store the project, and then click Create.
ILiveSDK is comprised of the following SDKs:
Select the new ILiveSDK folder in the pop-up select box, and then click Add:
The added project directory is as follows:
Some system libraries relied on by SDKs in ILiveSDK need to be added to the project.
Click PROJECT -> TARGETS -> General. At the bottom of Linked Frameworks and Libraries section, click +, enter the system library name, and click Add.
List of system libraries to be added:
Configure Bitcode
Build Settings -> Enable Bitcode -> No:
After the above steps are completed, you can use ILiveSDK. Add the code to the viewDidLoad function of ViewController.m to obtain the version number:
//Import the header file
#import <ILiveSDK/ILiveCoreHeader.h>
//Obtain the version number
NSLog(@"ILiveSDK version:%@",[[ILiveSDK getInstance] getVersion]);
NSLog(@"AVSDK version:%@",[QAVContext getVersion]);
NSLog(@"IMSDK version:%@",[[TIMManager sharedInstance] GetVersion]);
//Print results
2018-03-27 15:22:37.187181+0800 Demo01_integration SDK[8182:16625633] ILiveSDK version:1.8.3.13017
2018-03-27 15:22:37.187692+0800 Demo01_integration SDK[8182:16625633] AVSDK version:1.9.6.47.OpenSDK_1.9.6- 34109
2018-03-27 15:22:37.189444+0800 Demo01_integration SDK[8182:16625633] IMSDK version:v2.5.6.11389.11327
You have successfully integrated ILiveSDK.
If you have any questions, send us an email to trtcfb@qq.com.
Was this page helpful?