iOS / tvOS SDK
Bitmovin Analytics enables you to get useful insights into the video usage in your apps. It offers a simple integration with the Bitmovin Player, which is a prerequisite for the following guide.
For more information on how to setup a player, go to the Player getting started guide .
Add the SDK to the Project Using SwiftPM
Swift Package Manager is a tool for managing the distribution of Swift frameworks. It integrates with the Swift build system to automate the process of downloading, compiling, and linking dependencies.
We support Swift Package Manager since
We provide two products:
BitmovinPlayerCollectorincluding BitmovinPlayer v3 Collector
AVPlayerCollectorincluding AVPlayer Collector
To integrate using Xcode 13, open your Project file and specify it in
Project > Package Dependencies using the following URL:
To integrate using Apple's Swift package manager, add the following as a dependency to your
Package.swift and replace the
Version Number with the desired version of the SDK.
And then specify the
BitmovinAnalytics as a dependency of the desired Target. Here is an example of a
swift buildfrom the command line is currently not supported. Open the Package in Xcode if you are developing another Package depending on
Import BitmovinAnalyticsCollector into your Code
We have split the
BitmovinAnalytics package into 3 targets
CoreCollector- including shared code for all collectors
if you are working with our Collectors you need to add at least
import CoreCollector because many Classes are relocated to that package. Going further you need to import the corresponding Collector package for your player.
Example when using BitmovinPlayer
Add the SDK to the Project Using CocoaPods
BitmovinAnalyticsCollector is available through CocoaPods. We depend on
Add the following lines to the Podfile of your project while replacing Version Number
Version Number with the desired version of the SDK. All available versions are listed in the cocoapod repository.
pod repo update to add the newly added source and run
pod install to install it.
Collector for Bitmovin Player v3
For Bitmovin Player SDK v3, you have to use the latest version of the
Collector for Bitmovin Player v2
For Bitmovin Player SDK v2, you have to use the latest version of the
Collector for AVFoundation Player
We provide builds of our AVPlayerCollector to support platforms
iOS 9.0+ and
iOS 12.0+. Use the BitmovinAnalyticsCollector version
2.8.0 for deployment targets
iOS 12.0+. We do support deployment target
iOS 9.0+ with version v1, but this version is deprecated and won't get major updates anymore.
Deprecated - Collector integration before 1.20.0
If you want to integrate BitmovinAnalyticsCollector versions before
1.20.0, you have to specify the desired tag version directly
First, you need to create the config.
Then, you can add optional configuration parameters:
Allowlist Package Name
In order to use Analytics on your website(s), you have to allowlist the package name of your app for which you want to use it. This is a security mechanism that protects your license from being used elsewhere.
It can be done in our dashboard under Analytics -> Licenses
After the setup is done there is nothing more to do. Events are recorded automatically and you can head over to the analytics dashboard to see statistics.
You can find many more fully functional code examples in our Github Repository.