Version: 2.67.0

Add THEOplayer to your iOS project

This page shows how to get THEOplayer running on iOS apps.


  • Create a new iOS project
  • Configure THEOplayer SDK framework
  • Develop an app that uses the SDK

Before you begin

  • Make sure you have a valid THEOplayerSDK.framework

Creating a new iOS project

Steps for creating a new project

  • Create new project (cmd + shift + n)
  • Select Single View App, click 'next'
  • Enter project details, click 'next'

After selecting the directory location, you should see something similar to the screenshot below

Configure THEOplayer SDK framework

Steps for adding a framework

  • Open finder and add your THEOplayerSDK.framework to the project directory
  • Go to the project configuration (1), select the General tab (2), and finally scroll down to the Embedded Binaries section and click '+' (3)
  • A submenu will open, click 'Add Other...'
  • Select the previously added THEOplayerSDK.framework
  • A menu will open. They have sufficient defaults. Click 'Finish'

Validate that the framework will correctly be added during builds

  • Go to the Build Phases tab in the project configuration, go to the Embed Frameworks section
  • Check that the THEOplayerSDK.framework is present

Develop the app using the THEOplayer SDK

Steps for a minimal app using THEOplayer

  • Open the ViewController
  • Import THEOplayerSDK
  • Setup a player during viewDidLoad(), it is important to keep a reference to this instance
  • Set a source on the player

The result is the following snippet:

Steps for adding and removing event listeners

  • Use the THEOplayer API to add an eventlistener
  • Add var listeners : [String: EventListener] = [:] to ViewController
  • Use the THEOplayer API to add an event listener and handler
  • Add attachEventListeners() to the setup of THEOplayer

The result is the following snippet:

Validate that the tutorial was completed succesfully

  • Run the application, you can boot a similator or use your own device
  • Click the big play button