SDK for iOS

v. 1.6.4
Primis IOS SDK latest version is 1.6.4, Download from here

IOS SDK Version History

Apps built with the Primis Player SDK for iOS will obtain a fully working Primis player with most of its web functionalities.

Key Supported Features:

  • Skins
  • Layouts
  • Playlists
  • Monetization
  • Floating mode
  • Viewability detection

Requirements

  • Xcode 12 or higher
  • Objective-c or Swift
  • Your app should have a deployment target of iOS 10.0 at minimum
  • Primis Placement ID - Reach out to your Pub. Success Manager at Primis to get this information
  • Primis SDK Latest version is 1.6.4
  • Google iOS IMA SDK version 3.14.1. Download and extract from here

Basic Terms

A few terms to be familiar with before we start

  • Primis Player - a web-based Primis player running inside a WKWebView
  • Primis SDK - an XCFramework providing essential native functionality
  • Floating / Docking units - When started, the player docks in its initial position. The player will switch to a floating position when its docking unit is no longer visible.


General Installation

PrimisPlayer SDK

Swift Packages

  1. In the Xcode menu go to File -> Add Packages
  2. Paste the following URL into the search field - https://github.com/PrimisTech/PrimisPlayer-ios.git
  3. Press on the Add Package button to continue

CocoaPods

  1. Add the following dependency to your podspec:
    pod 'PrimisPlayer', '~> 1.6.4'
  2. Run pod install in the terminal

File

  1. Download Primis SDK from here
  2. Add the PrimisPlayer framework to your Xcode project.


Google IMA SDK

  1. Primis monetization services require Google IMA SDK.
    Add the Google IMA SDK framework to your Xcode project:
    a. In the left pane, click the project name.

b. In the center pane, click Build Phases.

c. Expand the Link Binary With Libraries section.
d. At the bottom of the libraries list, click the plus icon [+].
e. Click Add Other.
f. In the directory where you extracted the downloaded SDK, select GoogleInteractiveMediaAds.framework and click Open.
g. At the bottom of the libraries list, click the plus icon [+] again.
h. In the Status column, verify that GoogleInteractiveMediaAds.framework is set to Required.
i. Include the -ObjC linker flag in your build settings. For more information, see Apple QA1490.
j. In order to validate that the IMA SDK is integrated properly into your project, please follow the steps below:

  • Add the IMA framework using an import statement beneath the existing imports: Swift or Objective-C
import GoogleInteractiveMediaAds
#import <GoogleInteractiveMediaAds/GoogleInteractiveMediaAds.h>
  • Rebuild your project.
  • Remove this line after a successful build.

For further instruction and examples please refer to google documentation here.


Implementation type

According to your implementation type, please continue to one of the sections below:


IOS SDK Advanced Features

For advanced features please use this guide


Did this page help you?