This topic describes how to run the demo of Real-Time Communication (RTC) SDK for iOS.
Prerequisites
You have obtained your authentication information from the console. For more information, see Access tools.
Environment requirements
| Type | Description |
| Device | iPhone 5 or later physical devices |
| iOS version | iOS 9 or later |
Procedure
- Download and decompress the software development kit (SDK) and sample code. For more information, see SDK download.
- Copy the SDK file to the following directory of the sample code.

- Configure the parameters.
- Add AliRTCSdk.framework to the dynamic library. The following figure shows that AliRTCSdk.framework is added to the dynamic library.

- Upload the certificate and profile file.
The demo of RTC SDK for iOS can only run on a physical machine. Upload your certificate and profile file and configure the Bundle Identifier based on your certificate. If you use Xcode 9.0 or later, you can select Automatically manage signing to allow Xcode to manage your certificate and profile file.

- Open the RTCSampleChatViewController.m file and configure the AliRtcAuthInfo authentication parameter in the
joinBeginfunction./* NSString *AppID = @"aoe****"; NSString *userID = @"f303d59acae073****"; NSString *channelID = @"23****"; NSString *nonce = @"AK-7c8f947b-e55e-4ed5-ab09-bc849****"; long long timestamp = 1585119606; //The timestamp when the token expires. For example, 1560588594 indicates that the token expires at 16:49:54, June 15, 2019. NSString *token = @"70f77b8****"; NSArray <NSString *> *GSLB = @[@"https://rgslb.rtc.aliyuncs.com"]; NSArray <NSString *> *agent = @[@""]; */
- Add AliRTCSdk.framework to the dynamic library. The following figure shows that AliRTCSdk.framework is added to the dynamic library.
- Run the demo.
After you start the demo, you are directed to the audio or video call interface on which the local preview is displayed. Then, you are automatically added to the channel. When another user joins the channel, you can start an audio or video call in real time.
