Integrate Linkus SDK for macOS

To integrate 'Linkus SDK for macOS', you need to import 'Linkus SDK for macOS' to your macOS project and initialize it.

Requirements and Prerequisites

Requirements

Make sure that your development environment meets the following requirements:

  • macOS: Version 10.13 or later
  • Xcode: Version 14.3 or later
Prerequisites
You have enabled Linkus SDK on PBX.

Demo and Source code

Before the integration, we recommend that you try out the Demo and review the source code of 'Linkus SDK for macOS' to have an overview of the framework and workflow of 'Linkus SDK for macOS'.

For more information, go to the GitHub Repository of 'Linkus SDK for macOS'.

Step 1. Import 'Linkus SDK for macOS'

Use either of the following methods to import 'Linkus SDK for macOS':
Use CocoaPods to integrate 'Linkus SDK for macOS'
Note: Before the integration, make sure that you have installed CocoaPods. For more information, see Getting Started with CocoaPods.
  1. In the macOS project, open Podfile and add the following code, then save it.
    Note: If there is no Podfile, you can enter the project root directory in Terminal and run the pod init command to generate it.
    pod 'linkus-sdk-MacOS'
  2. In Terminal, run the following command to install 'Linkus SDK for macOS'.
    pod install

    After the installation is completed, the Terminal will display Pod installation complete!, and a new file with a suffix of .xcworkspace is generated under the project folder.

  3. Use Xcode to open the file with the .xcworkspace suffix.
Manually integrate 'Linkus SDK for macOS'
  1. Go to the GitHub Repository of 'Linkus SDK for macOS', and download 'Linkus SDK for macOS'.
  2. In Xcode, add the linkus_sdk_MacOS.framework to the corresponding Target, and select Copy items if needed in the pop-up window.
  3. In the macOS project, go to Build Phases > Link Binary With Libraries and add the following libraries:
    libcurl.dylib
    libxml2.dylib
    libc++.dylib

Step 2. Initialize 'Linkus SDK for macOS'

  1. In macOS project, open PrefixHeader.pch file and import header files.
    #import <linkus_sdk_MacOS/linkus_sdk.h>
  2. Refer to the Demo to initialize 'Linkus SDK for macOS'.

What to do next

Request the SDK login signature from PBX server for authentication and login to 'Linkus SDK for macOS'.

For more information, see Obtain Login Signature for 'Linkus SDK for macOS'.