今是昨非

今是昨非

日出江花红胜火,春来江水绿如蓝

Integrate Tencent Short Video SDK Conflict Modification

Integration of Tencent Short Video SDK Record#

There was a requirement to record a video and upload it, visible on the server. Finally, the Tencent SDK integration was done, but it took some detours. Here, I will record the process.

SDK Selection#

First, the SDK selection. For iOS, it is Tencent's Short Video SDK.

SDK Integration#

Next is the SDK integration. Following the steps in the link above, integrate the TXLiteAVSDK_UGC.framework and the required system libraries into the project. Then, add the necessary permissions in the plist file and add the UGCKit module. However, it was found that the compilation failed.

For my project, it was due to a conflict with the WCDB library. The project uses a private library that encapsulates WCDB, using it as a static library. This conflicted with the SDK mentioned above, so it needed to be set separately. After making several modifications and successfully compiling, it was found that WCDB initialization failed. After investigating for a while, the final solution was:

In the Build Settings, under Other Linker Flags, set:

-force_load
"${PODS_CONFIGURATION_BUILD_DIR}/WCDBOptimizedSQLCipher/libWCDBOptimizedSQLCipher.a"

As shown below:

image-1

Then, it was found that after integrating according to the above steps, the size of the installation package increased from 27MB to 156MB. After further investigation, it was discovered that the entire UGCKit module was not needed because our recording did not use the pre-packaged classes in UGCKit. Instead, we used the functionality of TXLiteAVSDK_UGC.framework. After removing the entire UGCKit module, the size returned to around 27MB.

References#

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.