-
Notifications
You must be signed in to change notification settings - Fork 11
Installation
This page describes how to install Agora UIKit into your Xcode project. There are two main ways to install this library: Swift Package Manager and CococaPods.
Adding a package with Swift Package Manager is incredibly easy; everything you need is already integrated with Xcode.
To add dependencies, open your project in Xcode and do the following:
- Select File > Swift Packages > Add Package Dependency.
- Enter the GitHub URL for the package: https://github.com/AgoraIO-Community/VideoUIKit-iOS.git
- Choose the package version (4.0.0 at the time of writing this)
Xcode will fetch the code for the specified release straight from GitHub, and any attached xcframeworks, which may take a couple of minutes.
If installing v1.8.0 or above, be sure both of these checkmarks are selected before proceeding to the next step.
![]()
Alternatively, if you have already included the package and are still seeing an issue with missing imports: Head to your App's target, Build Phases, and add the two libraries (AgoraUIKit and AgoraRtmControl) to "Link Binary With Libraries".
![]()
You can now import AgoraUIKit to your project and create your Agora application!
Check out Apple’s doc showing how to add Swift packages to your project:
https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app
First you will need to install CocoaPods on your machine. CocoaPods has their own guides for installation:
Once installed, go to the directory your of your Xcode project in terminal and enter pod init
. This command creates the base Podfile
for your application; if you already have a Podfile, ignore that step
Edit your Podfile by adding the following lines, depending on whether you want the iOS or macOS UIKit: AgoraUIKit_iOS or AgoraUIKit_macOS. Your Podfile should look like this:
target 'Xcode-Project-Name' do
# Uncomment the next line if you want to install for iOS
# pod 'AgoraUIKit_iOS', '~> 1.7'
# Uncomment the next line if you want to install for macOS
# pod 'AgoraUIKit_macOS', '~> 1.7'
end
The latest AgoraUIKit release at the time of writing this post is v1.3.
Run pod init
, and open the .xcworkspace file to continue with your project.