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

react-native-unified-push

v0.0.11

Published

RNUnifiedPush simplifies the usage of Unified Push Server (https://aerogear.org/push/) in React Native apps. It enables an app to subscribe and receive Push Notifications sent from any Unified Push Server.

Downloads

6

Readme

react-native-unified-push

RNUnifiedPush simplifies the usage of Unified Push Server (https://aerogear.org/push/) in React Native apps. It enables an app to subscribe and receive Push Notifications sent from any Unified Push Server.

Getting started

$ npm install react-native-unified-push --save

Linking the library

$ react-native link react-native-unified-push

Configure on Android

  1. Add the following lines to android/build.gradle inside dependencies: classpath 'com.google.gms:google-services:3.0.0' classpath 'com.diffplug.spotless:spotless-plugin-gradle:3.3.0'

  2. Add the following lines to android/app/build.gradle inside dependencies: compile 'org.jboss.aerogear:aerogear-android-core:3.0.0' compile 'org.jboss.aerogear:aerogear-android-pipe:3.0.0' compile 'org.jboss.aerogear:aerogear-android-push:4.0.1'

  3. Append the following line to android/app/build.gradle: apply plugin: 'com.google.gms.google-services'

  4. Add your google-services.json file to android/app/ (how to get your google-services.json: https://support.google.com/firebase/answer/7015592)

Configure on iOS

Push notifications need to be active for the Xcode project for the app to be able to receive notifications. This can be done inside Xcode:

  1. Open your app in Xcode (through ios/<your_app_name>.xcodeproj)
  2. Having the root project file selected: Capabilities > Push Notifications > Switch to 'ON'

Usage

Use the init method to subscribe to a UPS and enable the app to start receiving Push Notifications from that server:

  import RNUnifiedPush from 'react-native-unified-push';

  ...

  RNUnifiedPush.init(
  { 
    alias: '<id for this device>' ,
    url: '<url for your UPS server>',
    senderId: '<your sender id from UPS>',
    variantId: '<variant id for your app in UPS>',
    secret: '<variant secret for your app in UPS>'
  },
  () => {
    //success callback
  },
  (err) => {
    //error callback
  }
);