Configure your project (iOS)

Configure your iOS or tvOS project.





To use the SDK in your project, you must add the player license key and import the JWPlayerKit or JWPlayerTVKit module where necessary.



Configure the project

Use the following steps to configure your iOS or tvOS project:

  1. In Xcode, open AppDelegate.swift.
  2. Import JWPlayerTVKit into this file and into any file that will need access to the SDK.
import JWPlayerKit
import JWPlayerTVKit

  1. Set the player license key by calling the JWPlayerKitLicense method setLicenseKey in application:didFinishLaunchingWithOptions.

    πŸ’‘

    For added flexibility, you should consider remotely storing the key and setting it at runtime. This approach enables you to update the license key of the player without needing to resubmit your app to the App Store.


func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
   JWPlayerKitLicense.setLicenseKey("#YOUR_KEY_HERE#")
   return true
}