Import TUIKit (iOS)

Last updated: 2020-03-09 11:38:17

    Development Environment Requirements

    • Xcode 10 or later
    • iOS 8.0 or later

    Integration Description

    CocoaPods integration (recommended)

    You can automatically or manually integrate TUIKit by using CocoaPods. We recommend that you use CocoaPods integration to update to the latest version when it is available.

    1. Add the following code to Podfile.
      pod 'TXIMSDK_TUIKit_iOS'
    2. Run the following command to install TUIKit.
      pod install
      If you fail to install the latest version of the SDK, run the following command to update the local CocoaPods repository list.
      pod repo update

    Manual integration (not recommended)

    1. Add the ImSDK file path to Framework Search Path to manually add the TUIKit and ImSDK directories to your project.
    2. Manually add third-party libraries used by TUIKit to your project:

    Use the latest library tags to integrate the preceding dependent libraries.

    Referencing TUIKit

    1. Import TUIKit to the AppDelegate.m file and initialize it.
      #import "TUIKit.h"
      
      - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
          [[TUIKit sharedInstance] setupWithAppId:sdkAppid]; // The SDKAppID can be obtained in the IM console.
      }
    2. Save and compile.
      Successful compilation indicates that the integration is completed. If compilation fails, check the cause of the error or integrate again according to the instructions in this document.

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback
    Help