In-app Chat UIKit
  • iOS : Swift
  • Android
  • Web
  • Overview
  • Quick start
    • Integrate the SDK
    • Start a chat
  • Run the sample code
  • UI components
  • SDK downloads
  • Release notes

Run the sample code

Last updated:2022-11-11 17:39

Sample code


The following describes how to run the sample code of the In-app Chat UIKit.


  • Go to ZEGOCLOUD Admin Console and do the following:
    1. Create a project, and get the AppID and AppSign of your project.
    2. Subscribe to the In-app Chat service (Contact technical support if the subscript doesn't go well).
  • Platform-specific requirements:
    • Xcode 13.0 or later.
    • A real iOS device that is running on iOS 12.0 or later.
    • The device is connected to the internet.

Run the sample code

  1. In App Store, search and download the Xcode.
  1. Download and extract the sample code, in Terminal, navigate to the ../Samples/ZIMKitDemo directory, and run the following:
pod install
  1. In Xcode, open the ZIMKitDemo.xcworkspace file.
  1. Log in to your Apple ID account.

    a. In Xcode, select Xcode > Preferences in the upper left corner.

    b. Select the Accounts tab, click the + button in the lower left, then select App ID, and click Continue.

    c. Enter your Apple ID and Password to log in.

  2. Modify the Bundle Identifier and your developer certificate.

    a. In Xcode, select the ZIMKitDemo project.

    b. Select the target project, click Signing & Capabilities, and in Team field, select your developer certificate.

  3. Modify the KeyCenter.swift file under the ZIMKitDemo/KeyCenter folder with the AppID and AppSign you get from ZEGOCLOUD Admin Console.

  4. Connect the iOS device to the computer, click the Any iOS Device and select your iOS device in the pop-up window.

  5. Click the Run button to compile and run the sample code.

Congratulations! So far, you have finished all the steps, and this is what you gonna see when the sample code is run successfully:

More to explore

Get support

Need help or want to raise your questions? Click the button below to join our Discord community to get quick responses.

Join Discord community