Mac

更新时间:
复制 MD 格式

This topic describes how to integrate the SDK for macOS.

Prerequisites

  • Xcode 9.0 or later is installed. For more information, see Xcode.
  • You must have an Apple developer certificate or an individual account.
  • If you use a device without a built-in camera and microphone, such as a Mac mini, you must connect an external camera and microphone.

Environment requirements

For information about the environment requirements for macOS, see Limits.

Integrate the SDK

  1. Download and decompress the SDK for macOS. For more information, see SDK downloads.
  2. Create a new project and copy the decompressed SDK files to the project directory.
  3. Add the dependency files from the SDK to your project.
    1. On the Build Phases tab, in the Link Binary With Libraries section, add the AliRTCSdk.framework, alivcffmpeg.framework, and UTDID.framework dependency files.
    2. On the General tab, in the Frameworks, Libraries, and Embedded Content section, add AliRTCSdk.framework, alivcffmpeg.framework, and UTDID.framework. Then, set the Embed property for each to Embed & Sign.
      Note The Mac SDK version 1.1 adds the UTDID.framework dynamic library. You must add this framework to Embedded Binaries.
      添加动态库
  4. On the Build Phases tab, in the Link Binary With Libraries section, add the following system libraries:
    • libc++.tbd
    • libresolv.tbd
    • libcurl.tbd
    • libz.tbd
    • CoreMedia.framework
    • CoreAudio.framework
    • AudioToolbox.framework
    • AVFoundation.framework
  5. On the Build Settings tab, in the Framework Search Path section, drag the AliRTCSDK.framework folder into the dialog box.
    Framework Search Path
  6. Edit the info.plist file to add permissions.
    添加权限
  7. On the Signing & Capabilities tab, set the permissions.
    设置权限
  8. Press Command+B. If Build Success is displayed, this indicates that the SDK is successfully integrated.

What to do next

After integrating the SDK, you can implement the basic features of Real-Time Communication. For more information, see Implement basic features for macOS.