To add a player to your app, you must import the JW Player SDK for iOS and then configure your project. To complete these tasks, review the table below and choose the approach that suits your implementation needs.
If you have any problems completing any of these tasks and have a valid JW Player license, please log a support ticket for assistance.
- At the Terminal prompt, enter
gem install cocoapodsto install CocoaPods.
cd <path-to-your-project>/<your-project>/to navigate to your project directory.
pod initto create a file named Podfile. Podfile defines the dependencies for your project.
- In a text editor, open Podfile.
- Set the iOS version to
- If you are using Objective-C, you can comment out
JWPlayerKitas 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
- At the Terminal prompt of your project directory, enter
pod installto install the JW Player iOS SDK.
- Open the .xcworkspace file for your project to launch Xcode.
You have retrieved your JW Player license key and imported the JW Player iOS SDK into your project. You can now configure your project.
- From the Player Downloads & Keys page, scroll to the Downloads table.
- Select a version from the VERSION drop-down menu
- Click the icon in the DOWNLOAD column.
- On your computer, unzip the JW Player iOS SDK .zip file.
- 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 from the jwplayer-ios-sdk/Framework folder on your computer.
- Click Open.
You have retrieved your JW Player license key and imported the JW Player SDK for iOS into your project. You can now configure your project.
Updated about 1 month ago