Install FastPix iOS player
Learn how to add the FastPix iOS Player SDK to your Xcode project using Swift Package Manager.
The FastPix iOS Player SDK lets you add video playback to your iOS app. It supports both live and on-demand streaming, and integrates directly into native iOS workflows. You can find the source code in the FastPix iOS player GitHub repository.
Before you begin
Make sure you have:
- Xcode installed on your Mac
- An existing iOS project (or create a new one)
- Familiarity with Swift Package Manager (Apple’s guide on adding package dependencies)
Add the SDK with Swift Package Manager
- Open your project in Xcode.
- In the Xcode menu bar, go to File > Add Packages.
- In the search field at the top-right corner, enter the SDK repository URL:
https://github.com/FastPix/iOS-player - Choose a Dependency Rule to control how Xcode handles SDK updates. By default, Xcode pulls the latest version from the main branch. You can specify a particular version or set a range of compatible versions.
- Click Add Package.
Import the SDK
After installing the SDK, import it into the Swift files where you need video playback.
- Open the Swift file where you want to use the SDK (for example,
ViewController.swift). - Add the following import statement at the top of the file:
After importing, you can access all the classes, methods, and features provided by the SDK.
What’s next
- Play uploaded videos to stream your first video.
- Play live and on-demand streams to configure stream types.