Skip to main content

Setup

This guide covers the complete setup and installation process for the rn-qp-nxg-player React Native library.

What's Included

  • Prerequisites.
  • Bridge Usage.
  • iOS Library Setup.
  • Android Library Setup.

Prerequisites

Before you begin, ensure you have:

  • React Native development environment set up
  • Access to JFrog repositories (credentials required)
  • Appropriate platform tools (Xcode for iOS, Android Studio for Android)

Bridge Usage

Prerequisites to Consume the Bridge from JFrog

  1. Set the default npm registry with an Artifactory npm repository:

    npm config set @<quickplay>:registry https://firstlight.jfrog.io/artifactory/api/npm/quickplay-npm/
  2. Authentication: There are two ways to authenticate your npm client against Artifactory:

    Option A: Using npm login

    npm login

    When prompted, provide your Artifactory login credentials.

    Option B: Using basic authentication

    For scoped packages, add the following to your ~/.npmrc file:

    📝 Note: The password is the API key

    @<quickplay>:registry=https://firstlight.jfrog.io/artifactory/api/npm/quickplay-npm/
    //firstlight.jfrog.io/artifactory/api/npm/quickplay-npm/:_password=<BASE64_PASSWORD>
    //firstlight.jfrog.io/artifactory/api/npm/quickplay-npm/:username=<USERNAME>
    //firstlight.jfrog.io/artifactory/api/npm/quickplay-npm/:email=youremail@email.com
    //firstlight.jfrog.io/artifactory/api/npm/quickplay-npm/:always-auth=true

iOS Library Setup

The rn-qp-nxg-player bridge requires QP client libraries and QPDataBus as dependencies.

Prerequisites

  1. Install the cocoapods-art plugin:

    gem install cocoapods-art
  2. Create a .netrc file under your home directory with your JFrog credentials:

    📝 Note: The password is the API key

    machine firstlight.jfrog.io
    login <USERNAME>
    password <PASSWORD>
  3. Add Artifactory repositories using the pod 'repo-art add' command:

    pod repo-art add fl-ios-sdk-local "https://firstlight.jfrog.io/artifactory/api/pods/fl-ios-sdk-local"
    pod repo-art add fl-rn-ios-remote "https://firstlight.jfrog.io/artifactory/api/pods/fl-rn-ios-remote"
    pod repo-art add apple-3rd-party "https://firstlight.jfrog.io/artifactory/api/pods/apple-3rd-party"
    pod repo-art add fl-ios-sdk-debug-local "https://firstlight.jfrog.io/artifactory/api/pods/fl-ios-sdk-debug-local"
  4. Add the following snippet to the top of your Podfile:

    source 'https://cdn.cocoapods.org/'

    plugin 'cocoapods-art', :sources => [
    'fl-ios-sdk-local', 'fl-ios-sdk-debug-local', 'fl-rn-ios-remote', 'apple-3rd-party'
    ]
  5. Run pod install:

    pod install

Synchronizing Repositories

The cocoapods-art plugin doesn't automatically update its index. To keep synchronized with your CocoaPods repository:

pod repo-art update <remote-repo-name>

💡 Tip: Run this command to consume the latest library version.

Android Library Setup

Prerequisites

  1. Java Support: JAVA 17
  2. Gradle Plugin: 8.9.1
  3. Gradle: 8.9
  4. SDK Versions: Compile and Target SDK's set to 36

Configuration Steps

  1. Add JFrog credentials to your gradle.properties file:

    jFrogUser=<USERNAME>
    jFrogPassword=<PASSWORD>
  2. Add repository configuration to your build.gradle:

    allprojects {
    repositories {
    // ... existing repositories
    maven {
    url "https://firstlight.jfrog.io/artifactory/fl-android-sdk-libs-release"
    credentials {
    username = "${rootProject.jFrogUser}"
    password = "${rootProject.jFrogPassword}"
    }
    }
    maven {
    url "https://firstlight.jfrog.io/artifactory/fl-android-sdk-libs-snapshot"
    credentials {
    username = "${rootProject.jFrogUser}"
    password = "${rootProject.jFrogPassword}"
    }
    }
    }
    }

    📞 Contact: Please reach out to Client Libs team to get the credentials.

  3. Handle generateCodegen Errors (Bridge Version 0.75.5)

    The Bridge is upgraded to react-native version 0.75.5. If you encounter this error:

    Error: Execution failed for task ':quickplay_rn-qp-nxg-player:generateCodegenSchemaFromJavaScript'

    Add this snippet to the bottom of android/build.gradle:

    gradle.projectsEvaluated {
    tasks.findAll { task ->
    task.name.startsWith("generateCodegen")
    }.each { task ->
    task.enabled = false
    }
    }

    ⚠️ Important: Add this only in android/build.gradle, not in android/app/build.gradle.

  4. If using IMA SDK please apply below changes in android/app/build.gradle

  compileOptions {
coreLibraryDesugaringEnabled true
}
dependencies {
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:x.x.x"
}