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

@mint-soft/notikit-react-native

v0.2.0

Published

Notikit React Native SDK — device registration + identity over @mint-soft/notikit-core

Readme

@mint-soft/notikit-react-native

Notikit React Native SDK — 디바이스 등록 + identity (@mint-soft/notikit-core 기반).

설치

npm install @mint-soft/notikit-react-native @react-native-firebase/messaging

사용

import { Platform } from "react-native";
import messaging from "@react-native-firebase/messaging";
import { NotikitReactNative } from "@mint-soft/notikit-react-native";

const notikit = new NotikitReactNative({
  baseUrl: "https://push.example.com",
  apiKey: "nk_xxx",          // 공개키만 (secret 미포함)
  identityHash: "<서버계산 HMAC>", // user id 바인딩 시
});

await messaging().requestPermission();
const token = await messaging().getToken();
await notikit.register(token, Platform.OS === "ios" ? "ios" : "android", "user-123");

수신(도달) 추적

발송 성공(FCM 접수)은 기기가 꺼져 있어도, 앱이 지워져 있어도 성공합니다 — 도달이 아닙니다. 앱이 수신을 보고하지 않으면 콘솔의 "도달" 칸은 계속 비어 있습니다.

백그라운드 핸들러에 그대로 꽂으세요. 앱 진입점(index.js)에서 동기적으로 등록해야 앱이 꺼져 있을 때도 불립니다. 그 시점에는 토큰을 아직 모르므로 토큰 대신 토큰을 돌려주는 함수를 넘깁니다 — 메시지가 올 때마다 불러서 교체된 토큰도 따라갑니다.

// index.js — AppRegistry 등록 전
import messaging from "@react-native-firebase/messaging";
import { NotikitReactNative, readPushData } from "@mint-soft/notikit-react-native";

const notikit = new NotikitReactNative({ baseUrl: "https://push.example.com", apiKey: "nk_xxx" });

messaging().setBackgroundMessageHandler(notikit.backgroundMessageHandler(() => messaging().getToken()));

// 포그라운드에서도 같은 발송이 도달입니다
messaging().onMessage(async (m) => {
  const { logId } = readPushData(m.data);
  if (logId) await notikit.reportReceived(await messaging().getToken(), logId);
});

backgroundMessageHandler 는 절대 throw 하지 않습니다 — 백그라운드 핸들러가 실패하면 안드로이드가 헤드리스 작업을 실패로 적고 iOS 가 다음 실행 예산을 깎습니다. notikit 발송이 아니면(notikit_log_id 없음) 아무것도 하지 않습니다. 재배달로 다시 불려도 같은 발송이면 요청을 내보내지 않습니다.

API

| | 설명 | |---|---| | register(fcmToken, platform, userId?) | FCM 토큰 등록 (+ 유저 연결) | | identify(userId, attributes?, name?) | 유저 식별 | | subscribe(topic, fcmToken) | 토픽 구독 | | reportReceived(fcmToken, messageId) | 수신(도달) 보고. 이미 보고한 발송이면 null | | backgroundMessageHandler(fcmToken \| () => token) | setBackgroundMessageHandler 에 넣을 핸들러. 토큰 문자열 또는 (비동기) getter |

userId 는 고객 서비스의 유저 id 이며 서버에 user_id 로 보냅니다. 위치 인자라 기존 호출은 그대로 동작합니다. core 의 입력 객체에서도 이전 이름 externalId(external_id)가 그대로 동작하지만 deprecated 입니다.

라이선스

Apache-2.0