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
-
Set the default npm registry with an Artifactory npm repository:
npm config set @<quickplay>:registry https://firstlight.jfrog.io/artifactory/api/npm/quickplay-npm/ -
Authentication: There are two ways to authenticate your npm client against Artifactory:
Option A: Using npm login
npm loginWhen prompted, provide your Artifactory login credentials.
Option B: Using basic authentication
For scoped packages, add the following to your
~/.npmrcfile:📝 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
-
Install the cocoapods-art plugin:
gem install cocoapods-art -
Create a
.netrcfile under your home directory with your JFrog credentials:📝 Note: The password is the API key
machine firstlight.jfrog.io
login <USERNAME>
password <PASSWORD> -
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" -
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'
] -
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
- Java Support: JAVA 17
- Gradle Plugin: 8.9.1
- Gradle: 8.9
- SDK Versions: Compile and Target SDK's set to 36
Configuration Steps
-
Add JFrog credentials to your
gradle.propertiesfile:jFrogUser=<USERNAME>
jFrogPassword=<PASSWORD> -
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.
-
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 inandroid/app/build.gradle. -
If using
IMA SDKplease apply below changes inandroid/app/build.gradle
compileOptions {
coreLibraryDesugaringEnabled true
}
dependencies {
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:x.x.x"
}