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

@sfmc/react-native-push

v1.0.0

Published

Push messaging for the Salesforce Marketing Cloud Unified Mobile SDK

Downloads

26

Readme

SFMC Push

SFMC Push Feature for React Native — FCM/APNs registration, push enable/disable, and push token events.

Installation

yarn add @sfmc/react-native-push
# or
npm install @sfmc/react-native-push

iOS:

cd ios && pod install

Android: no additional steps — Gradle autolinking discovers the module automatically.

Required SDK configuration

  • Android — initialize in your MainApplication.kt via SFMCSdk.configure(...). See the Android SDK Integration Guide.
  • iOS — initialize in your AppDelegate.swift via SFMCSdk.initializeSdk(...). See the iOS SDK Integration Guide.
  • Configure Firebase (Android) and APNs (iOS) credentials before push will deliver.

Usage

import { PushModule } from '@sfmc/react-native-push';
import type { PushApi } from '@sfmc/react-native-push';

const push: PushApi = await PushModule.requestSdk();
push.enablePush();
const token = await push.getPushToken();
const enabled = await push.isPushEnabled();

// Subscribe to token refresh events
const sub = PushModule.getEmitter().addListener('sfmc_push_token_refreshed', ({ token }) => {
  console.log('Token refreshed:', token);
});

API

| Method | Return | Description | |--------|--------|-------------| | enablePush() | void | Enable push notifications | | disablePush() | void | Disable push notifications | | isPushEnabled() | Promise<boolean> | Check if push is enabled | | getPushToken() | Promise<string \| null> | Get the current device push token |

Events

| Event Name | Payload | Platform | Description | |------------|---------|----------|-------------| | sfmc_push_token_refreshed | { token: string } | Android only | Emitted when the push token is refreshed |

iOS note: The sfmc_push_token_refreshed event is not emitted on iOS. Token refresh on iOS is handled natively via AppDelegate.application(_:didRegisterForRemoteNotificationsWithDeviceToken:), which passes the token directly to PushFeature.setDeviceToken(_:). Use getPushToken() to read the current token on demand.

Notes

Push registration requires Firebase configuration on Android (google-services.json in the example app). On iOS, ensure the example target has Push Notifications and Background Modes (Remote Notifications) capabilities enabled in your Apple Developer account.

Versions

  • React Native: 0.85.1 (New Architecture mandatory)
  • Android: sfmcsdk 3.1.0, pushfeaturemodule 2.0.0
  • iOS: SFPushFeatureSDK 2.0.0, MarketingCloud-SFMCSdk 4.0.1

License

BSD 3-Clause. See LICENSE for details.