SeatGridView
.pod 'SeatGridView'
dependency to your Podfile
file.target 'xxxx' do......pod 'SeatGridView'end
Podfile
file, first cd
in Terminal into the xxxx.xcodeproj
directory, then create one using the following command:pod init
cd
into the Podfile
directory and then run the following command to install components.pod install
pod repo update
pod update
build.gradle.kts (or build.gradle)
file under the app directory and add the following code to include the dependency for SeatGridView component:api("io.trtc.uikit:voice-room-core:latest.release")
api 'io.trtc.uikit:voice-room-core:latest.release'
proguard-rules.pro
file:-keep class com.tencent.** { *; }-keep class com.trtc.uikit.livekit.voiceroomcore.** { *; }
AndroidManifest.xml
file under the app directory and add tools:replace="android:allowBackup" and android:allowBackup="false" in the application node to override the settings within the component with your own settings.// app/src/main/AndroidManifest.xml<application...// Add the following configuration to override the configuration in the dependency SDKandroid:allowBackup="false"tools:replace="android:allowBackup">
//// AppDelegate.swift//import TUICorefunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {TUILogin.login(1400000001, // Please replace with the SDKAppID obtained in Step 1userID: "denny", // Please replace with your UserIDuserSig: "xxxxxxxxxxx") { // You can calculate a UserSig in the console and fill it hereprint("login success")} fail: { (code, message) inprint("login failed, code: \\(code), error: \\(message ?? "nil")")}return true}
Parameters | Type | Description |
SDKAppID | int | You have already obtained it in the last step of Step 1, so it will not be elaborated here. |
UserID | String | The ID of the current user, in string format, only allows letters (a-z and A-Z), digits (0-9), hyphens, and underscores. |
userSig | String | Use the SecretKey obtained in step 3 of Activate Service to encrypt information such as SDKAppID and UserID to generate a UserSig. It's a credential used for authentication purposes, allowing Tencent Cloud to identify if the current user is authorized to use the TRTC service. You can generate a temporary UserSig through the Auxiliary Tools in the console. For more information, please refer to How to Calculate and Use UserSig. |
GenerateTestUserSig.genTestSig
function to generate userSig. In this method, the SDKSecretKey is vulnerable to decompilation and reverse engineering, and once your key is leaked, attackers can steal your Tencent Cloud traffic.// Log inTUILogin.login(applicationContext,1400000001, // Please replace with the SDKAppID obtained in Step 1"denny", // Please replace with your UserID"xxxxxxxxxxx", // You can calculate a UserSig in the Console and fill it in hereobject : TUICallback() {override fun onSuccess() {Log.i(TAG, "login success")}override fun onError(errorCode: Int, errorMessage: String) {Log.e(TAG, "login failed, errorCode: $errorCode msg:$errorMessage")}})
// Log inTUILogin.login(context,1400000001, // Please replace with the SDKAppID obtained in Step 1"denny", // Please replace with your UserID"xxxxxxxxxxx", // You can calculate a UserSig in the Console and fill it in herenew TUICallback() {@Overridepublic void onSuccess() {Log.i(TAG, "login success");}@Overridepublic void onError(int errorCode, String errorMessage) {Log.e(TAG, "login failed, errorCode: " + errorCode + " msg:" + errorMessage);}});
Parameters | Type | Description |
SDKAppID | int | You have already obtained it in the last step of Step 1, so it will not be elaborated here. |
UserID | String | The ID of the current user, in string format, only allows letters (a-z and A-Z), digits (0-9), hyphens, and underscores. |
userSig | String | Use the SecretKey obtained in step 3 of Activate Service to encrypt information such as SDKAppID and UserID to generate a UserSig. It's a credential used for authentication purposes, allowing Tencent Cloud to identify if the current user is authorized to use the TRTC service. You can generate a temporary UserSig through the Auxiliary Tools in the console. For more information, please refer to How to Calculate and Use UserSig. |
GenerateTestUserSig.genTestSig
function to generate userSig. In this method, the SDKSecretKey is vulnerable to decompilation and reverse engineering, and once your key is leaked, attackers can steal your Tencent Cloud traffic.
Was this page helpful?