The SDK is supported on iOS 8.0 or later.
Environment Requirements
Xcode 9 or later
iOS 12.0 or later
Directions
Step 1. Link the SDK and system libraries
How to integrate a short video SDK into your app
1. Select the project target and add the following system libraries:
SystemConfiguration.framework
libc++.tbd
libsqlite3.tbd
MetalKit.framework
VideoToolbox.framework
ReplayKit.framework
GLKit.framework
OpenAL.framework
CoreServices.framework
2. Unzip the downloaded SDK package and copy it to your project directory. Select the project's Target, navigate to Build Phases, then add the dynamic libraries (located in the SDK directory) under Link Binary With Libraries:
TXFFmpeg.xcframework
TXSoundTouch.xcframework
TXLiteAVSDK_UGC.xcframework
3. Add the following frameworks in Embed Frameworks and select Code Sign On Copy.
TXFFmpeg.xcframework
TXSoundTouch.xcframework
4. Select the project's Target, search for bitcode in Build Settings, and set Enable Bitcode to NO.
1. Navigate to the TXLiteAVDemo(UGC)/XiaoShiPin directory in Terminal.
2. Run pod install.
3. Configure your iOS developer signing in Xcode.
The app needs access to the photo album, which can be configured in Info.plist
. Right-click Info.plist
, select Open as > Source Code, and copy and modify the code below.
<key>NSAppleMusicUsageDescription</key>
<string>Video Cloud Toolkit needs to access your media library to obtain music files. It cannot add music if you deny it access.</string>
<key>NSCameraUsageDescription</key>
<string>Video Cloud Toolkit needs to access your camera to be able to shoot video.</string>
<key>NSMicrophoneUsageDescription</key>
<string>Video Cloud Toolkit needs to access your mic to be able to shoot videos with audio.</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>Video Cloud Toolkit needs to access your photo album to save edited video files.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Video Cloud Toolkit needs to access your photo album to edit your video files.</string>
2. Before you integrate UGSV features into your application, we recommend you set - [AppDelegate application:didFinishLaunchingWithOptions:]
as follows:
@import TXLiteAVSDK_UGC;
@implementation AppDelegate
- (BOOL)application:(UIApplication*)applicationdidFinishLaunchingWithOptions:(NSDictinoary*)options {
NSString * const licenceURL = @"<License URL obtained>";
NSString * const licenceKey = @"<The key obtained>";
[TXUGCBase setLicenceURL:licenceURL key:licenceKey];
NSLog(@"SDK Version = %@", [TXLiveBase getSDKVersionStr]);
}
@end
Note:
If you use a license for the SDK on v4.7 and have upgraded the SDK to v4.9, you can click Switch to New License in the console to generate a new license key and URL. A new license can be used only for the SDK on v4.9 or later and should be configured as described above.
You can enable/disable console log printing and set the log level in TXLiveBase
. Below are the APIs used.
setConsoleEnabled
Sets whether to print the SDK output in the Xcode console.
setLogLevel
Sets whether to allow the SDK to print local logs. By default, the SDK writes logs to the Documents/logs folder of the current app.
We recommend that you enable local log printing. You may need to provide log files if you run into a problem and need technical support.
Viewing log files
To reduce the storage space taken up by log files, the UGSV SDK encrypts local logs and limits their number. You need a log decompression tool to view the content of log files. [TXLiveBase setConsoleEnabled:YES];
[TXLiveBase setLogLevel:LOGLEVEL_DEBUG];
Step 5. Build and run the project
If the
above steps are performed correctly, you will be able to successfully compile the HelloSDK
project. Run the app in the debug mode, and the following SDK version information will be printed in the Xcode console: 2017-09-26 16:16:15.767 HelloSDK[17929:7488566] SDK Version = 5.2.5541
Module Description
Read the documents below to learn more about different modules of the SDK.