Download the SDK
Download the SDK and add the SDK to your iOS project.
To add a player to your app, you must import the VP Player SDK for iOS and then configure your project. To complete these tasks, review the table below and click the GET STARTED link for the approach that suits your implementation needs.
APPROACH | NOTES |
---|---|
CocoaPods | - No SDK download is required. - Core and optional modules must be added to your app. - An existing app is required. GET STARTED with the CocoaPods approach. |
Local | VP Player SDK for iOS must be downloaded and unzipped. - Core and optional modules must be imported. - An existing app is required. GET STARTED with the Local approach |
CocoaPods
In the following subsections, you will learn how to complete these tasks:
- Get the required items.
- Add SDK to your Xcode project.
If you have problems completing any of these tasks, log a support ticket for assistance.
Get the required CocoaPods items
Before you begin this approach to add the SDK to your project, you need the items in the table below from VP Player.
ITEM | ACQUISITION PROCESS |
---|---|
Project Id | VP Player Project Id. |
Xcode | Download and install Xcode. |
License key | 1. From the Player Downloads & Keys page, scroll to the Downloads table. 2. Copy the LICENSE KEY for the VP Player SDK for iOS. |
Add the SDK to an Xcode project
Now that you have the required items listed in the previous subsection, you can import the VP Player SDK for iOS to your Xcode project.
Install CocoaPods and create a Podfile
- At the Terminal prompt enter
$ gem install cocoapods
to install CocoaPods. - Enter
$ cd <path-to-your-project>/<your-project>/
to navigate to your project directory. - Enter
$ pod init
to create a file named Podfile. Podfile defines the dependencies for your project.
Edit the Podfile
- In a text editor, open Podfile.
- Set the iOS version to
10.0
or greater. - If you are using Objective-C, you can comment out
use_frameworks!
. - Add
VPPlayer
as a dependency. To add a specific version of the SDK, be sure to use the proper Podfile syntax. - Save Podfile and close the text editor.
# Uncomment the next line to define a global platform for your project
platform :ios, '10.0'
target 'MyProject' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for MyProject
pod 'VPPlayerSDK', :source => 'https://gjirafadev@dev.azure.com/gjirafadev/GjirafaSpecs/_git/GjirafaSpecs'
end
Install the SDK
- At the terminal prompt of your project directory, enter $ pod install to install the VP Player SDK for iOS.
- Open the .xcworkspace file for your project to launch Xcode.
You have retrieved your VP Player license key and imported the VP Player SDK for iOS into your project. You can now configure your project.
Local
In the following subsections, you will learn how to complete these tasks:
- Get required items.
- Add SDK to Xcode project.
If you have problems completing any of these tasks, log a support ticket for assistance.
Get required items
Before you begin this approach to add the SDK to your project, you need the items in the table below from VP Player.
ITEM | ACQUISITION PROCESS |
---|---|
Project Id | VP Player Project Id |
Xcode | Download and install Xcode. |
VP Player SDK for iOS | 1. From the Player Downloads & Keys page, scroll to the Downloads table. 2. Select a version from the VERSION drop-down meny. 3. Click the icon in the DOWNLOAD column. 4. On your computer, unzip the VP Player SDK for iOS .zip file. |
Import the SDK into your project
Now that you have the required items listed in the previous subsection, you can add VP Player SDK for iOS to your Xcode project.
Download VPPlayer_SDK.
Drag and drop VPPlayer_SDK.xcframework to your project, it should look like the picture below.
Follow the steps:
- Select the project file from the project navigator on the left side of the project window.
- Select the target for where you want to add frameworks in the project settings editor.
- Select the “Build Phases” tab, and click the small triangle next to “Link Binary With Libraries” to view all of the frameworks in your application.
- To Add the framework, click the “+” below the list of frameworks.
- Select VPPlayer_SDK.xcframework
Add required frameworks to your project
- GoogleAds-IMA-iOS-SDK - 3.9
- Google-cast-sdk-no-bluetooth - 4.4
Run your project.