Run pod init in a terminal window after entering the directory of your project, and take no notice of other steps in iOS SDK Importing.
Step 2. Configure the Demo
1. Log in to the TRTC Console and click Create Application. If you have already done so, you may skip this step.
2. And then, your own SDKAppID and SDKSecretKey of your created application can be obtained in the Basic Information section.
3. If you choose OCDemo, replace the values of SDKAPPID and SDKSECRETKEYwith the information you obtained in Step 2 in GenerateTestUserSig.h file under TRTCDemo/TRTC directory.
Or if you choose SwiftDemo, replace the values of SDKAPPID and SDKSECRETKEYwith the information you obtained in Step 2 in GenerateTestUserSig.swift file under API-Example/Debug directory.
Note:
In the demo above, we used SDKSecretKey to generate UserSig locally in order to help you go through the demo easier. However, in the production environment, you are not supposed to generate userSig in this way, which may lead to SDKSecretKey leakage, thereby creating a chance for attackers to steal your TRTC traffic. The correct way to generate UserSig is to integrate Server-Side Generation of UserSig on your server. When an user enters the room:
Send a http request to your server.
Generate a UserSig on your server.
Return it to the user to enter the room.
When you deploy your page to a production environment, you need to have your page accessed through the HTTPS(e.g. https://domain/xxx). For the reason, please refer to the document Page Access Protocol Restriction Description.
Step 3. Run the Demo
Open the TRTCDemo.xcworkspace/API-Example.xcworkspace project in the source code directory with Xcode (11.0 or later) and compile and run the TRTC-API-Example project.
FAQs
If you encounter any problems with access and use, please refer to FAQs.
If you have any requirements or feedback, you can contact: info_rtc@tencent.com.