Skip to main content
You will first need to have created a project with some articles generated.

First steps

Add the dependency to your Podfile

target 'MyApp' do
  pod 'BeyondWordsPlayer'
end
As an alternative you can also use the XCFramework attached to the assets of the latest GitHub Release

Add PlayerView to your view hierarchy

let playerView = PlayerView()
playerViewParent.addSubview(playerView)

Load your content into the player

playerView.load(PlayerSettings(
    projectId: <ID>,
    contentId: <ID>
))
You will need to replace the <ID> placeholders with the real identifiers for your project and content. After running the app, the player should load.

How it works

The PlayerView uses a WKWebView under the hood to load the Web Player and provides a Swift interface which binds to the underlying JavaScript API. You can check the API compatibility between the iOS and the Web player in the compatibility settings. To understand how the underlying Web Player works, please refer to its documentation.

How to configure it

The preferred way to configure the player is by logging into the BeyondWords dashboard, going to the Player tab, and changing its settings. However, you can also override properties at the app level, for example:
playerView.load(PlayerSettings(
    projectId: <ID>,
    contentId: <ID>,
    playerStyle: "large",
    callToAction: "Listen to this recipe",
    backgroundColor: "yellow",
))
These settings will take precedence over those specified in the dashboard and allow more flexibility. These settings can also be changed after loading the player, for example:
playerView.setPlayerStyle("large")
playerView.setBackgroundColor("yellow")
playerView.setPlaybackRate(1.5F)
You can also refer to example app which showcases the core functionality of the player, including how to build a custom UI.

iOS SDK Github repository

iOS SDK Documentation

View the iOS SDK documentation in our GitHub repository
Compatability