Swiftpack.co -  pbj-apps/Live-ios-sdk as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
Stream your PBJ.live content from your iOS App.
.package(url: "https://github.com/pbj-apps/Live-ios-sdk.git", from: "0.3.9")

Live Player

Live Platform: iOS 13+ Language: Swift 5 Swift Package Manager compatible Build status GitHub tag

Stream your PBJ.live content from your iOS App.

Stream to your iOS app in 5 simple steps

1. Import the Live-ios-sdk package

Xcode > File > Swift packages > Add Package Dependency


2. Initialize the LivePlayerSDK with your credentials on App start

A good place to do this is typically the AppDelegate.

import Live

// [...]

LiveSDK.initialize(apiKey: "YOUR_API_KEY")

3. (Optional) Check if there is a live episode beforehand

Typical usage is that you have a "Watch live" button that you only want to show if there is an actual episode currently live.

LiveSDK.isEpisodeLive { isLive, error in			
    // -> isLive is true if there is any episode live.
    // Show player here. (step 4)

You can also pass your showID as a parameter to query live episodes, but this time for a specific show. You can find your showId in your web dashboard. Select the show you want and grab it's id from the browser's url.

This api exists with both callbacks and Combine publishers so your are free to choose the version that fits best with your app.

4. Create a Player

let livePlayerVC = LiveSDK.player() // Optionally pass a showId.
livePlayerVC.delegate = self

Without a showId parameter, the player will display the first live show it finds.

5. Present it like you would any UIViewController

present(livePlayerVC, animated: true, completion: nil)

Example App

Checkout the example App provided in this repository to see a typical integration. With the test app, you can input your Organization api key and battle test your own environment.

Got a question? Found an issue?

Create a github issue and we'll help you from there ❤️


Stars: 4
Last commit: 1 week ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Release Notes

1 week ago
  • Adds Organization chat feature flag

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