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

infobip-mobile-messaging-react-native-plugin

v12.5.6

Published

Infobip Mobile Messaging React Native Plugin

Downloads

3,400

Readme

Mobile Messaging SDK plugin for React Native

npm

Mobile Messaging SDK is designed and developed to easily enable push notification channel in your mobile application. In almost no time of implementation you get push notification in your application and access to the features of Infobip IP Messaging Platform. The document describes library integration steps for your React Native project.

Requirements

  • node (v16.10.0 or higher)
  • ruby (2.6.10 or higher)
  • React Native (v0.70.8)

For iOS project:

  • Xcode and Command Line Tools (16.1)
  • CocoaPods (v1.15.2)
  • Minimum deployment target 12.4

For Android project:

  • Android Studio (Bumblebee | 2021.1.1)
  • Gradle (v7.3.3)
  • Supported API Levels: 21 (Android 5.0 - Lollipop) - 34 (Android 14.0)

Quick start guide

This guide is designed to get you up and running with Mobile Messaging SDK plugin for React Native:

  1. Make sure to setup application at Infobip portal, if you haven't already.

  2. Add MobileMessaging plugin to your project, run in terminal:

    $ npm install infobip-mobile-messaging-react-native-plugin

    TypeScript's definitions are included into npm package

  3. Configure platforms

    • iOS

      Notice

      Starting from the 6.2.0 plugin version it's not mandatory to add use_frameworks! to the Podfile, check the Migration guide if you want to get rid of it.

      1. Run pod install from /ios folder (installs Mobile Messaging native SDK)
      2. Import following header #import <MobileMessaging/MobileMessagingPluginApplicationDelegate.h> and add [MobileMessagingPluginApplicationDelegate install]; into /ios/<ProjectName>/AppDelegate.m (this is required for OS callbacks such as didRegisterForRemoteNotifications to be intercepted by native MobileMessaging SDK)
          ...
          #import <MobileMessaging/MobileMessagingPluginApplicationDelegate.h>
         
          @implementation AppDelegate
      
          - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
          {
              [MobileMessagingPluginApplicationDelegate install];
              ...
          }
          ...
      1. Configure your project to support Push Notification as described in item 2 of iOS integration quick start guide
      2. Integrate Notification Service Extension into your app in order to obtain:
        • more accurate processing of messages and delivery stats
        • support of rich notifications on the lock screen
    • Android

      1. Following paths should be provided in .bash_profile

        export ANDROID_HOME=$HOME/Library/Android/sdk
        export PATH=$PATH:$ANDROID_HOME/emulator
        export PATH=$PATH:$ANDROID_HOME/tools
        export PATH=$PATH:$ANDROID_HOME/tools/bin
        export PATH=$PATH:$ANDROID_HOME/platform-tools
      2. Add 'com.google.gms:google-services' to android/build.gradle file

        buildscript {
           ...
           dependencies {
               ...
              //GMS Gradle plugin
              classpath 'com.google.gms:google-services:4.3.10'
           }
        }

        And add apply plugin: 'com.google.gms.google-services' at the end of your android/app/build.gradle in order to apply Google Services Gradle Plugin

      3. Add a Firebase configuration file (google-services.json) as described in Firebase documentation. Check Applying Firebase configuration in MobileMessaging SDK Guide for alternatives.

      Notice (when targeting Android 13):

      Starting from Android 13, Google requires to ask user for notification permission. Follow this guide to make a permission request.

Initialization configuration

Initialize Mobile Messaging React Native plugin, provide application configuration in init method:

import { mobileMessaging } from 'infobip-mobile-messaging-react-native-plugin';

someMethod(): void {
   ...

           mobileMessaging.init(
                   {
                      applicationCode: '<your app code>',
                      ios: {
                         notificationTypes: ['alert', 'badge', 'sound'],
                      },
                   },
                   () => {
                      console.log('MobileMessaging started');
                   },
                   error => {
                      console.log('MobileMessaging error: ', error);
                   },
           );
}
import { mobileMessaging } from 'infobip-mobile-messaging-react-native-plugin';

someMethod(): void {
   ...

           mobileMessaging.init(
                   {
                      applicationCode: '<your app code>',
                      ios: {
                         notificationTypes: ['alert', 'badge', 'sound'],
                      },
                   },
                   () => {
                      console.log('MobileMessaging started');
                   },
                   (error: MobileMessagingError) => {
                      console.log('MobileMessaging error: ', error);
                   },
           );
}

More details on SDK features and FAQ you can find on Wiki

| If you have any questions or suggestions, feel free to send an email to [email protected] or create an issue. | |---|