Youbora
The PRESTOplay SDK for React Native is integrated with Youbora analytics service in the form of Youbora plugin.
Setup
First, install the @castlabs/react-native-prestoplay-youbora package:
npm install @castlabs/react-native-prestoplay-youbora
Once the plugin is installed, set its configuration and enable it when initializing the SDK, by passing the YouboraPlugin class. For example:
import { Sdk } from "@castlabs/react-native-prestoplay";
import { YouboraPlugin } from '@castlabs/react-native-prestoplay-youbora';
YouboraPlugin.setConfiguration({
accountCode: 'youbora-account-code',
analyticsOptions: {
userName: 'UserName'
}
})
Sdk.initialize({
licenseKey: /* Valid license here */,
plugins: [YouboraPlugin],
});
Then you can configure additional options in the player instance using the useYouboraExtension hook and YouboraExtension:
const youboraExtension = useYouboraExtension();
useEffect(() => {
youboraExtension.setMetadata({
live: false,
assetId: 'assetId',
accountCode: 'youbora-account-code',
analyticsOptions: {
appName: 'AplicationName',
},
});
}, [youboraExtension]);
Android
Add NPAW repository to the application build.gradle file:
repositories {
...
// NPAW (Youbora) Dependencies
maven {
url "https://artifact.plugin.npaw.com/artifactory/plugins/android/"
content { includeGroup "com.npaw.plugin" }
}
...
}
iOS
Add NPAW repository to the application Podfile file:
# NPAW repository
source 'https://repo.plugin.npaw.com/release/plugin-ios-cocoapods.git'