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 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-iris-library

v2.0.0

Published

React Native module for SDK Iris

Readme

react-native-iris-library

Working with Xcode 11.7 and Android Studio 4.0.1

GitHub Release

0. Before installation

Configure the irisConfig.json (android) and Iris.plist (iOS) files with the service keys provided by the Iris CS Team Add notification configuration from native docs:

  • iOS - https://iris-mobile-repo.s3.amazonaws.com/documentation/ios.html ALERT: If you're integration with React Native, skip the Carthage configuration.

  • Android - https://iris-mobile-repo.s3.amazonaws.com/documentation/android.html

1. Getting started

$ yarn add react-native-iris-library

2. Mostly automatic installation

3. If you use autolink, skip to 5th step

$ react-native link react-native-iris-library

4. iOS integration

Add to your podfile (in case you already had use of one of the frameworks, you don't have to add it)

pod 'OneSignal'

$ cd ios & pod install

5. Swift integration

Add a .swift empty file (Xcode > File > New > File > .swift) and click "Create Bridging Header" from Xcode popup Build and run.

Knowed issues:

  • Error with higher minimum deployment target => set ios: 10.0 in Podfile and pod install again.
  • Error duplicated interface => Pods > Development Pods > IrisLibrary > delete Pods folder inside IrisLibrary module.
  • Error Unable to resolve module scheduler => clean cache from Metro Bundler using yarn.

1. Android integration

Open the build.gradle file from app

apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'

defaultConfig {
...
manifestPlaceholders = [
                onesignal_app_id               : '',
                onesignal_google_project_number: 'REMOTE'
        ]
...
}

dependencies {
...
    implementation project(':react-native-iris-library')
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation "com.facebook.react:react-native:+"  // From node_modules

    implementation 'com.google.code.gson:gson:2.8.6'
    implementation ('com.onesignal:OneSignal:3.10.3') {
        exclude group: 'com.google.android.gms'
        exclude group: 'com.google.firebase'
    }
    implementation 'com.google.firebase:firebase-core:17.2.2'
    implementation 'com.google.firebase:firebase-messaging:20.1.0'
    implementation 'com.squareup.retrofit2:retrofit:2.6.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.6.0'
    implementation 'com.squareup.okhttp3:logging-interceptor:4.0.1'
    implementation 'com.android.support:multidex:1.0.3'
...
}

Open the build.gradle file from project add

dependencies {
...

        classpath 'com.android.tools.build:gradle:3.5.3'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.61"
        classpath 'com.google.gms:google-services:4.3.3'

...
}
allprojects {
    repositories {
...
        maven {
            url 'http://iris-mobile-repo.s3.amazonaws.com/android/release/'
            content{
                includeGroup "com.somosiris"
            }
        }
    }
}
import IrisLibrary from 'react-native-iris-library';

// TODO: What to do with the module?
Using inside RN code:

//To init Notification Service inside componentDidMount
IrisLibrary.init();

//To send the tag id4all
IrisLibrary.sendTag("KEY", "VALUE")

//To create a new User for CDP Database
IrisLibrary.create(newUser)

newUser has to be an Object type:
 - *At least 1* of keys (email, phone, document)  is required
 - Key *id_source* is required
 - If you send some *address*, *city* and *uf* are required 
Object:
{
    "name" : "John Bean",
    "gender" : "M",
    "birthday" : "1990-10-10",
    "document" : "02426147016",
    "email" : "[email protected]",
    "phone" : 55991234567,
    "id_source" : "myid_12356",
    "opt_in_email" : true,
    "opt_in_sms" : true,
    "addresses" : [
        {
          "street" : "Avenida Ipiranga",
          "city" : "São Paulo",
          "country" : "Brasil",
          "uf" : "SP",
          "nickname" : "Endereço Profissional",
          "complement" : "Andar 12",
          "zipcode" : "90040620",
          "neighborhood" : "Partenon",
          "number" : "9000"
        }
    ]
}

More info at: https://bulk.prod.api.somosiris.com/docs/#operation/insertUsers

//In order to receive push notification, use:
IrisLibrary.addCustomer(DOCUMENT_VALUE, PHONE_VALUE, MAIL_VALUE, "")

  • Deep linking: You can use the Additional Data json provided with the notification payload, to deep link the opened notification to some view in your app.
  componentDidMount = () => {
    IrisLibrary.init();
    IrisLibrary.addEventListener('opened', this.onOpened);

  }
  componetnWillUnmount = () => {
    IrisLibrary.removeEventListener('opened', this.onOpened);
  }

  onOpened = (openResult) => {
    console.log('Deep Link', openResult.notification.payload.additionalData);
    //Use the additionalData to redirect the user to some specific view in the app
  }
  • Notification Center: We have a Notification Center handler. When the device receives a Push Notification, the notification data is stored locally in the device and it's acessible within this methods below:

  • To get the notification list (if exists):

IrisLibrary.getNotificationList( notificationList => {
               //handle array of notification objects
            });
  • To delete all notifications:
IrisLibrary.deleteAllNotifications();
  • To update one notification:
IrisLibrary.updateNotification(notificationObject);
  • To delete one notificaiton:
IrisLibrary.deleteNotification(notificationObject);

Alternatively, we have a component NotificationCenter, it consists in a View component with close and cleanAll button, and a list of notifications items, you can use it, edit it ou build your own component. Call it from a modal View:

<View>
    <Modal 
    animationType="slide"
    transparent={true}
    visible={notificationModalVisible}
    onRequestClose={() => { 
        this.setNotificationModalVisible(false);
    }}>
        <View style={styles.modal}>
            <NotificationCenter onCreateClicked={this.setNotificationModalVisible}/>
        </View>
    </Modal>
</View>

If you can't call the component from the module, just copy da code in your project.

If something get wrong, please open an issue or contact