Setting up Dependencies
Since Bitmovin's native SDKs are distributed through custom CocoaPods and Maven repositories, the installation cannot be managed by Flutters auto-link feature and requires some extra steps. Please refer to the installation instructions for each platform below. For more information on integrating the native SDKs, you can refer to the Getting Started guides.
Adding the pub.dev package dependency
The bitmovin_player
library is published on pub.dev. To add it to your Flutter app, use flutter pub add bitmovin_player
or add it manually to your pubspec.yaml
:
dependencies:
bitmovin_player: ^0.1.0
Do not forget to run flutter pub get
afterwards.
Setting up iOS dependencies
Add Bitmovin's CocoaPods repo as a source on top of ios/Podfile
:
source 'https://github.com/bitmovin/cocoapod-specs.git'
If you see any errors during pod install
after adding the source from above, try deleting Podfile.lock
and do a fresh pod install
. At this point, pod install
might fail due to the incorrect minimum deployment target being set for the Runner
project. Set the deployment target and minimum deployment version to at least iOS 14 in the Runner
project to fix this.
platform :ios, '14.0'
source 'https://github.com/bitmovin/cocoapod-specs.git'
## The rest of your Podfile ##
Setting up Android dependencies
-
Add Bitmovin's Maven repository to
android/build.gradle
:allprojects { repositories { google() mavenCentral() maven { url 'https://artifacts.bitmovin.com/artifactory/public-releases' } } }
-
Enable Multidex support if needed. Follow this guide to enable it: https://developer.android.com/build/multidex
Updated 7 months ago