# Compile and run a sample project (/en/realtime-media/voice/build/set-up-your-project/compile-run-sample-project/macos)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

Agora provides [Open-source sample projects on GitHub](https://github.com/AgoraIO/API-Examples/tree/main) to demonstrate the implementation of basic and advanced Voice SDK features.

    This page shows how to compile, configure, and run the Voice SDK macOS sample project.

    ## Prerequisites [#prerequisites-2]

    * Xcode 13.0 or higher.

    * An Apple developer account.

    * If you need to use CocoaPods integrated SDK, make sure [CocoaPods is installed](https://guides.cocoapods.org/using/getting-started.html#getting-started).

    * Two devices running macOS 10.10 or higher.

    * A microphone

    * A valid Agora account and project. Please refer to [Agora account management](../../manage-agora-account.md) for details.

    * Installed [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)

    ## Project setup [#project-setup-2]

    ### Get the sample project [#get-the-sample-project-2]

    You can obtain the sample project using the following methods:

    * Go to the [SDKs](/sdks) page, download the latest version of the Agora Voice SDK, and unzip it.

    * Run the following command to clone the Github repository locally:

      ```bash
      git clone git@github.com:AgoraIO/API-Examples.git
      ```

      This repository contains sample projects for all native platforms of Agora Voice SDK. The API usage examples for macOS are located under `/macOS`.

    ### Configure the sample project [#configure-the-sample-project-2]

    1. Set your App ID and App certificate

       Open the `KeyCenter.swift` file and fill in the App ID and App certificate you obtained from the Agora Console.

       ```swift
       struct KeyCenter {
         // Replace <#Your App ID#> with your App ID
         static let AppId: String = "<#Your App ID#>"
         // Replace #Your certificate# with your App certificate. Leave this field blank if the project allows joining with the App ID only
         static let Certificate: String? = "<#Your certificate#>"
       }
       ```

    2. Open a terminal and run `pod install` in the `/macOS` directory, to install project dependencies. After the installation is complete, the terminal displays `Pod installation complete!`. A file `APIExample.xcworkspace` is generated in the project folder.

    ## Run the sample project [#run-the-sample-project-2]

    1. Open the file `APIExample.xcworkspace` in Xcode. Check **Automatically manage signing** in **Signing & Capabilities** under **TARGETS**, and then configure your Apple developer account and **Bundle Identifier** under each target.

       ![image](https://assets-docs.agora.io/images/video-sdk/run-compile-macos-step-1.jpeg)

    2. Click **Start compiling**.

    3. After successful compilation, the sample project window pops up.

    4. Select an example you want to try, then enter a channel name, such as *test*, and click the **Join Channel**.

       ![image](https://assets-docs.agora.io/images/video-sdk/run-compile-macos-step-4.png)

    5. To test various audio and video interaction use-cases, connect to the [Agora web demo](https://webdemo.agora.io/basicVideoCall/index.html), or install and run the sample project on a second device. Make sure you use the same app ID on both devices. When you join the same channel from two devices, you can see and hear each other.

       ![image](https://assets-docs.agora.io/images/video-sdk/run-compile-macos-step-5.png)

    
  
      
  
      
  
      
  
      
  
      
  
      
  
      
  
      
  
      
  
      
  
