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
- Download and decompress the SDK for macOS. For more information, see SDK downloads.
- Create a new project and copy the decompressed SDK files to the project directory.
- Add the dependency files from the SDK to your project.
- On the Build Phases tab, in the Link Binary With Libraries section, add the AliRTCSdk.framework, alivcffmpeg.framework, and UTDID.framework dependency files.
- 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.

- 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
- On the Build Settings tab, in the Framework Search Path section, drag the AliRTCSDK.framework folder into the dialog box.

- Edit the info.plist file to add permissions.

- On the Signing & Capabilities tab, set the permissions.

- 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.
该文章对您有帮助吗?