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

@onekeyfe/react-native-jpush

v6.9.0-2

Published

Clean-room JPush and JCore React Native Nitro module for OneKey

Readme

@onekeyfe/react-native-jpush

A clean-room JPush and JCore implementation for React Native, readable end to end and API-compatible with jpush-react-native.

npm license iOS Android Nitro Modules

A source-implemented JCore (5.2.0) and JPush (6.0.0 iOS / 5.9.0 Android) client: UDP SIS resolution, the asymmetric TCP framing, AES-256-CBC / SM4-CBC encryption, registration and login, tag/alias/properties, local notifications and the Android :pushcore IPC are all compiled from readable Objective-C/Swift and Java/Kotlin instead of shipped as .a/.jar blobs. The JavaScript surface mirrors jpush-react-native and jcore-react-native — default JPush, named JCore — dispatched through a Nitro HybridObject with a legacy bridge fallback. Supported on iOS (13.4+) and Android (minSdk 23); web and desktop are out of scope.

Features

  • Auditable native source — no decompiled or obfuscated vendor binaries in the build, and dynamic code loading is intentionally excluded.
  • Drop-in JS API — the JPush and JCore classes keep the methods and callbacks that jpush-react-native / jcore-react-native consumers use.
  • Shared native state — main and background JS runtimes share one process-owned SDK; policy changes invalidate stale native content instead of replaying it.
  • Bounded queues — at most 128 pre-login requests and 65,536 decoded GZIP bytes, with fixed error codes instead of unbounded buffering.
  • Privacy-safe logging — diagnostics go through @onekeyfe/react-native-native-logger and redact notification content, alias, tags, properties, mobile number and tokens.
  • Optional Google transport — an Android-only source library under android/fcm replaces the opaque Jiguang FCM plugin.

Installation

yarn add @onekeyfe/react-native-jpush react-native-nitro-modules

@onekeyfe/react-native-native-logger is a peer dependency. Install the application's iOS pods and rebuild the native binary; the module cannot run from a JavaScript-only update.

iOS

Enable the Push Notifications capability and APNs entitlements in the app target. The host AppDelegate forwards the APNs device token to the native SDK (for example with JPUSHService registerDeviceToken:); the module installs its UNUserNotificationCenter delegate when the app has not set one.

Android

The package manifest merges its permissions and components, including POST_NOTIFICATIONS, INTERNET, ACCESS_NETWORK_STATE and the vendor badge permissions. On Android 13+ call JPush.requestPermission() from a user action to obtain the runtime notification permission. Minimum SDK is 23.

Google / FCM distribution (optional)

Google Play builds can link the source library in android/fcm, which replaces cn.jiguang.sdk.plugin:fcm and delegates transport to the official Firebase Messaging SDK. It is an Android Gradle project, not a second npm package; the host keeps its google-services.json and Google Services plugin. Integration steps, receive gates and acceptance status are in docs/SPEC.md.

Usage

import JPush from '@onekeyfe/react-native-jpush';

JPush.setLoggerEnable(__DEV__);
JPush.init({
  appKey: '<your-jpush-app-key>',
  channel: 'developer-default',
  production: false,
});

JPush.getRegistrationID(({ registerID }) => {
  // Send registerID to your backend for targeted pushes.
});

JPush.addConnectEventListener(() => {
  // Fires on connection state changes.
});

Register listeners after init() and remove them with JPush.removeListener() when their owner unmounts. Permission is a separate step: the user must grant notification authorization before Android or iOS can deliver.

API

| Export | Result | Platforms | Description | | --- | --- | :-: | --- | | JPush.init({ appKey, channel, production }) | void | iOS, Android | Configures and starts the push client. | | JPush.getRegistrationID(cb) | { registerID } | iOS, Android | Current registration ID. | | JPush.addTags / updateTags / deleteTag(s) / queryTag(s) | callbacks / events | iOS, Android | Tag operations, keyed by sequence. | | JPush.setAlias / deleteAlias / queryAlias | callbacks / events | iOS, Android | Alias operations. | | JPush.setProperties / deleteProperties / cleanProperties | callbacks / events | iOS, Android | User-property operations. | | JPush.setBadge({ badge, appBadge }) | void | iOS, Android | App-icon badge count. | | JPush.addLocalNotification / removeLocalNotification / clearAllNotifications / clearNotificationById | void | iOS, Android | Local notification scheduling and cleanup. | | JPush.stopPush / resumePush / isPushStopped(cb) | void / boolean | iOS, Android | Client-side push enable/disable. | | JPush.requestPermission() | void | iOS, Android | Requests notification authorization. | | JPush.add*Listener(cb) / removeListener(cb) | void | iOS, Android | Connect, notification, local, custom-message, tag/alias, command and button events. | | JCore.setAuth(auth) and JCore compliance/diagnostics methods | void | iOS, Android | Collection authorization, country code, wakeup and local logs. |

The underlying ReactNativeJpush HybridObject in src/ReactNativeJpush.nitro.ts exposes the same operations plus lower-level badge, geofence and channel setters. See docs/SPEC.md for the wire protocol, defaults and error codes.

Platform support

| Capability | iOS | Android | Web | | --- | :-: | :-: | :-: | | Registration, login and reconnection | ✅ | ✅ | — | | Tags, alias, properties, mobile number | ✅ | ✅ | — | | Notifications, local notifications and badge | ✅ | ✅ | — | | Notification authorization request | ✅ | ✅ | — | | APNs device-token binding | ✅ | — | — | | Optional Google FCM source transport | — | ✅ | — |

Caveats

[!IMPORTANT] The native SDK requires a rebuilt host binary. Web, desktop and extension targets are unsupported — guard every call with a platform check, because the wrapper returns without effect when no native module is registered.

[!WARNING] Push stop and collection-authorization changes gate delivery immediately. Content blocked while stopped or unauthorized is discarded and is never replayed after resume or regrant, and notifications already displayed are not retracted.

[!NOTE] Local tests, loopback protocol suites and synthetic payloads do not prove APNs, FCM or Jiguang cloud delivery. Configure real AppKey/APNs credentials and validate delivery on a device before shipping.

References

License

MIT. See LICENSE.