DACAST iOS SDK

The iOS SDK allows you to integrate the DaCast player securely in your mobile applications. To get started download the archive from this link and open it in a folder.

In your Xcode application right click on the project, select "Add Files to ..." and add both THEOplayerSDK.framework and DacastPlayerIOS.framework from the archive.
In the project configuration make sure the frameworks are listed in both Linked Frameworks and Libraries and Embedded Binaries. You should end up with something like this:
In ViewController.swift import the Dacast Player SDK:
import DacastPlayerIOS
Next add the following code to your viewDidLoad function:
let player = DacastPlayer(contentIdStr: "104301_f_506288", adUrl: "https://cdn.theoplayer.com/demos/preroll.xml")
player.frame = CGRect(x: 0, y: 0, width: 400, height: 400)
player.addAsSubview(of: self.view)
Let's break down this code. First we create a DacastPlayer object with 2 arguments: the contentId and an adUrl.
The contentId is found in the javascript embed code in the publish settings section of your backoffice. The adUrl can be from any ad provider and is optional, removing it will just play the video with no ad.
Next we set a size for our player with the frame property and add the player to the current view with addAsSubview (you can also use insertAsSubview)

From there you can get the instance of the THEOplayer by calling player.getTHEOplayer() and refer to the official THEOplayer documentation.