Add the SDK (iOS)
Download the SDK and add the SDK to your iOS app or tvOS project.
To add JWP's video experience to your app of tvOS project, you must import the JWP iOS SDK (app) or JWP tvOS SDK (tvOS) and then configure your project.
You can download either SDK using the CocoaPods or Local approaches listed below.
If you have any problems completing any of these tasks and have a valid JWP license, please log a support ticket for assistance.
CocoaPods
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
JWPlayerKit
orJWPlayerTVKit
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 'MyAwesomeProject' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for MyAwesomeProject
pod 'JWPlayerKit', '>= 4.0.0'
end
# Uncomment the next line to define a global platform for your project
platform :ios, '10.0'
target 'MyAwesomeProject' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for MyAwesomeProject
pod 'JWPlayerTVKit', '>= 1.0.0'
end
Install the SDK
- At the Terminal prompt of your project directory, enter
pod install
to install the SDK. - Open the .xcworkspace file for your project to launch Xcode.
You can now configure your project.
Local
Download the SDK
- On the Players page under iOS SDK, click Downloads. The iOS Downloads screen displays.
- In the row of the SDK version to download, click to download the .zip version to your computer.
- On your computer, unzip the SDK .zip file.
Import the SDK into your project
- From within Xcode, select your project from the project navigator.
- Select the target in the left column of the project editor.
- Click General.
- In the Linked Frameworks and Libraries, click +.
- Click Add Other.
- Select JWPlayerKit.xcframework (iOS) or JWPlayerTVKit.xcframework (tvOS) from your computer.
- Click Open.
You can now configure your project.
Updated almost 2 years ago
Whatβs Next