snipe-bk-cwc
v3.0.5
Published
## Overview
Downloads
5
Readme
Snipe BK CWC SDK Documentation
Overview
Welcome to the Snipe BK SDK! This SDK is designed to provide easy integration of Gamification into your React Native applications, specifically tailored for the upcoming Cricket World Cup campaign. With the integration of this SDK, you will have multiple screens with various play-alongs, a live scoreboard, today's match details, and interactive games to enhance the gamification experience within the Burger King app during the Cricket World Cup.
Features
The Snipe BK CWC SDK provides a range of features and capabilities for enhancing the Burger King app's Cricket World Cup campaign, including:
- Display live scoreboards with real-time match data.
- Provide today's match details.
- Different Play Along Games to increase participation.
- And more!
Installation
General Installation
You can easily install the Snipe BK CWC SDK using npm:
npm i snipe-bk-cwc
Android - Set Kotlin Dependency Resolution
This step may be optional - however, if your Android setup in the React Native project does not have Kotlin v1.8.0+ set up, you may run into duplicate class issues when building the project. To mitigate these issues, as suggested by Kotlin docs, add the following to your dependencies in your application's build.gradle
file to deal with version alignment:
dependencies {
implementation platform('org.jetbrains.kotlin:kotlin-bom:1.8.0')
...
}
Usage
To use the SDK in your React Native project, follow these steps:
- Import the SDK in your React Native component.
import {SnipeSdk} from 'snipe-bk-cwc';
- Use the Component in the Application and pass the necessary props.
<SnipeSdk
cleaverTapInstance={yourCleverTapInstance}
city="YourCity"
state="YourState"
store_id="YourStoreID"
store_name="YourStoreName"
er_id="YourER_ID"
er_user_name="YourER_UserName"
identity="Clevertap Identity"
/>
SDK Props
When integrating the Snipe BK CWC SDK in your React Native application, it is essential to provide some properties for its optimal functioning. Here's a breakdown of the props you need to pass:
cleaverTapInstance: any
This is the instance of CleverTap that you would like to integrate with the SDK. This instance is essential for tracking and analytics purposes.
city: string
The city where the user is located.
state: string
The state where the user is located.
store_id: string
The unique identifier for the store where the user has made a purchase or is associated with.
store_name: string
The name of the store associated with the store_id
.
er_id: string
The unique identifier for the Event Registration. This will be used to track specific events or promotions tied to the user.
identity: string
Your clevertap identity field.
er_user_name: string
The name of the user associated with the er_id
.
Example
Here's a simple example of how to use the SDK with the necessary props:
import React from 'react';
import { View } from 'react-native';
import * as SnipeSdk from 'snipe-bk-cwc';
const Screen = () => {
const cleverTapInstance = {}; // Your CleverTap instance here
return (
<View>
<SnipeSdk
cleaverTapInstance={cleverTapInstance}
city="Mumbai"
state="Maharashtra"
store_id="BK1234"
store_name="Burger King Powai"
er_id="ER5678"
identity="Identity"
er_user_name="John Doe"
/>
</View>
);
};
export default Screen;