Swiftpack.co - bitmovin/player-ios as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by bitmovin.
bitmovin/player-ios 3.28.0
Swift Package Manager Repository for the Bitmovin iOS/tvOS Player SDK
⭐️ 2
🕓 20 hours ago
iOS tvOS
.package(url: "https://github.com/bitmovin/player-ios.git", from: "3.28.0")

BitmovinPlayer

Installation

To add the BitmovinPlayer SDK as a dependency to your project, you have three options: Using CocoaPods, Swift Package Manager or adding the SDK bundle directly.

Using CocoaPods

Add the following lines to the Podfile of your project and replace the Version Number with the desired version of the BitmovinPlayer. You can find all versions here.

Execute pod repo update first to add the new source and execute pod install after to install the new BitmovinPlayer dependency.

source 'https://github.com/bitmovin/cocoapod-specs.git'

pod 'BitmovinPlayer', '3.28.0'

Using Swift Package Manager

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.

Using Xcode

To integrate using Xcode 13, open your Project file and specify it in Project > Package Dependencies using the following URL:

https://github.com/bitmovin/player-ios.git

Using Package.swift

To integrate using Apple's Swift Package Manager, add the following as a dependency to your Package.swift and replace Version Number with the desired version of the SDK.

.package(name: "BitmovinPlayer", url: "https://github.com/bitmovin/player-ios.git", .exact("Version Number"))

And then specify the BitmovinPlayer as a dependency of the desired target. Here is an example of a Package.swift file:

let package = Package(
  ...
  dependencies: [
    ...
    .package(name: "BitmovinPlayer", url: "https://github.com/bitmovin/player-ios.git", .exact("Version Number"))
  ],
  targets: [
    .target(name: "<NAME_OF_YOUR_PACKAGE>", dependencies: ["BitmovinPlayer"])
  ]
  ...
)
Limitation

Executing swift build from the command line is currently not supported. Open the Package in Xcode if you are developing another Package depending on BitmovinPlayer.

Add the Player SDK to the Project directly

When using Xcode, go to the General page or your app target and add the SDK bundle (BitmovinPlayer.xcframework) under Linked Frameworks and Libraries. The latest SDK for iOS and tvOS can be downloaded here.

Getting Started

Configure the license key

  • Add your Bitmovin Player license key to the Info.plist file as BitmovinPlayerLicenseKey. Alternatively, you can also set the license key via the PlayerConfig.key property when creating a Player instance.

    Your Bitmovin Player license key can be found under Player -> Licenses in the Bitmovin Dashboard.

  • Add the Bundle Identifier of the iOS application which is using the SDK as an allowed domain to the Bitmovin licensing backend. This can be also done under Player -> Licenses via the Bitmovin Dashboard.

Samples

For samples using the Bitmovin Player iOS SDK see here. For a sample using the Swift Package Manager for integration, see sample named BasicPlaybackSPM.

Documentation and Resources

  • You can find a full getting started guide including examples here.
  • You can find the latest API documentation here.
  • The release notes can be found here.

GitHub

link
Stars: 2
Last commit: 22 hours ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

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