# Installation
ByteArk Player SDK for iOS can be installed using either Swift Package Manager (SPM) or CocoaPods.
# Requirements
- iOS 14.0 or higher
- Xcode (latest version recommended)
- Swift 5.5
# Installation via CocoaPods (Recommended)
CocoaPods (opens new window) is a dependency manager for Cocoa projects. Install it with:
gem install cocoapods
1
- Add the ByteArk Player SDK for iOS CocoaPods repo:
pod repo add byteark-player-sdk-ios-specs https://github.com/byteark/byteark-player-sdk-ios-specs.git
1
- At the top of your
Podfile:
source 'https://github.com/byteark/byteark-player-sdk-ios-specs.git'
1
- Add the SDK to your
Podfile:
pod 'ByteArkPlayerSDK', '~> BYTEARK_PLAYER_SDK_VERSION'
1
Note: Replace BYTEARK_PLAYER_SDK_VERSION with the version you wish to use.
- Install:
pod install
1
Note
CocoaPods will install the SDK from a private GitHub repository over SSH. If you have not configured an SSH key for your GitHub account, follow Adding a new SSH key to your GitHub account (opens new window).
# Installation via Swift Package Manager
- In Xcode, open File > Add Packages.
- Enter
https://github.com/byteark/byteark-player-sdk-ios. - Select the SDK version.
- Xcode will download the SDK in the background.
# License key
ByteArk Player SDK for iOS requires a license key. Contact sales@byteark.com to request your license key.
The license key is used when creating ByteArkPlayerConfig via ByteArkPlayerConfigBuilder:
let config = try ByteArkPlayerConfigBuilder(licenseKey: "<YOUR_LICENSE_KEY>")
.item(item)
.autoplay(true)
.build()
player.configure(with: config)
1
2
3
4
5
6
2
3
4
5
6