npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@suprsend/react-native-sdk

v2.4.0

Published

Suprsend SDK for React Native Applications

Downloads

287

Readme

suprsend-rn-sdk

Suprsend SDK for React Native Applications

Refer full documentation here

Android Setup

1. Installation

Step 1. Install Package using npm / yarn

npm install @suprsend/react-native-sdk

Step 2. Add mavenCentral dependency in project level build.gradle

Inside allprojects repositories add the below mentioned line as android sdk is available at mavenCentral repository

allprojects {
        repositories {
            ...
            mavenCentral()
        }
    }

Step 3. Add Android sdk dependency inside app level build.gradle

Add following line of code inside dependencies in app build.gradle

dependencies {
            ...
            implementation 'com.suprsend:rn:0.1.8'
    }

NOTE: If you get any error regarding minSdkVersion please update it to 19 or more

2. Initialisation

Step 1. Initialise the android sdk in MainApplication.java inside onCreate method and just above super.onCreate() line. You can find workspace_key and workspace_secret in dashboard.

import app.suprsend.SSApi; // import sdk
...
SSApi.Companion.init(this, workspace_key, workspace_secret); // inside onCreate method just above super.onCreate() line

Step 2. Import SDK in Javascript side like below and call the Suprsend events

import suprsend from "@suprsend/react-native-sdk";

NOTE: If you face any issue in installation or integration please refer the example folder in respository where you can find the integration of sdk in example application.

iOS Setup

1. Installation

Step 1. Install Package using npm / yarn

Please skip this step if you have already installed this package for android setup

npm install @suprsend/react-native-sdk

Step 2. Adding swift support and Bridge header

Our iOS SDK is written in swift language so it's necessary to add swift support in React native project as react native uses Objective-C for iOS. This is just a few steps process.

Step 3. Changes in PodFile and Run pod Install

SuprSend sdk needs iOS platform version of 13 or above, so check it inside PodFile and change if its less than 13.0 and then run pod install from inside iOS folder.

platform :ios, '13.0' // this version has to be 13 or greater

Step 4. Change iOS Deployment Target

SuprSend sdk needs an iOS deployment target of 11 or above. So Change it in xcode.

2. Initialization

Step 1. In AppDelegate.m add the below mentioned code inside didFinishLaunchingWithOptions method, just before returning YES like in code below.

#import <UserNotifications/UserNotifications.h> //add this, needed as sdk internally depends on this package
#import <SuprSendSdk/SuprSendSdk-Swift.h> //add this

...

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  ...
  SuprSendSDKConfiguration* configuration = [[SuprSendSDKConfiguration alloc] initWithKey:@workspace_key secret:@workspace_secret baseUrl:nil]; // add this line
  [SuprSend.shared configureWithConfiguration:configuration launchOptions:launchOptions]; // add this line
  return YES;

Replace workspace_key and workspace_secret with your values. You will get workspace_key and workspace_secret from client dashboard.

NOTE: If you face any issue in installation or integration please refer the example folder in respository where you can find the integration of sdk in example application.

License

MIT