Swiftpack.co -  AgoraIO-Community/iOS-UIKit as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
UIKit for the Agora Video iOS and macOS RTC SDK
.package(url: "https://github.com/AgoraIO-Community/iOS-UIKit.git", from: "1.5.2")

Agora UIKit for iOS and macOS

Instantly integrate Agora in your own application or prototype using iOS or macOS.



  • Device
    • Either an iOS device with 12.0 or later
    • Or a macOS computer with 10.14 or later
  • Xcode 11 or later
  • *CocoaPods (if installing with CocoaPods)
  • An Agora developer account

Once you have an Agora developer account and an App ID, you're ready to use this pod.

Click here for full documentation


Swift Package Manager (Recommended, iOS Only)

Add the URL of this repository to your Xcode 11+ Project.

Go to File > Swift Packages > Add Package Dependency, and paste in this link:


If you have issues installing the Swift Package:

In Xcode's File menu, select 'Swift Packages' and then 'Reset Package Caches'.


In your iOS or macOS project, add this pod to your repository by adding a file named Podfile, with contents similar to this:

# Uncomment the next line to define a global platform for your project
# platform :ios, '12.0'

target 'Agora-UIKit-Example' do
  # Comment the next line if you don't want to use dynamic frameworks

  # Uncomment the next line if you want to install for iOS
  # pod 'AgoraUIKit_iOS', '~> 1.0'

  # Uncomment the next line if you want to install for macOS
  # pod 'AgoraUIKit_macOS', '~> 1.0'

And then install the pods using pod install --repo-update

If any of these steps are unclear, look at "Using Cocoapods" on cocoapods.org. The installation will change slightly once this pod is out of pre-release.


Once installed, open your application .xcworkspace file.

Decide where you want to add your AgoraVideoViewer, and in the same file import Agora_UIKit or Agora_AppKit for iOS and macOS respectively. Next, create an AgoraVideoViewer object and frame it in your scene like you would any other UIView or NSView. The AgoraVideoViewer object must be provided AgoraConnectionData and a UIViewController/NSViewController on creation.

AgoraConnectionData has two values for initialising. These are appId and appToken.

An AgoraVideoViewer can be created like this:

import AgoraUIKit_iOS

let agoraView = AgoraVideoViewer(
    connectionData: AgoraConnectionData(
        appId: "my-app-id",
        appToken: "my-channel-token"
    style: .grid,
    delegate: self

An alternative style is .floating, as seen in the image above.

To join a channel, simply call:

agoraView.join(channel: "test", as: .broadcaster)


For full documentation, see our AgoraUIKit documentation page.


Stars: 21
Last commit: 3 days ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Release Notes

Token Fetching Fix
6 days ago
  • Update token parsing key "rtcToken" from "token"

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API