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

@cordova-ohos/cordova-plugin-jcore

v5.2.1

Published

Cordova Jcore Plugin

Readme

cordova-plugin-jcore

zh-CN en

本项目基于 [email protected] 开发,本文档重点阐述其在 OpenHarmony(OHOS)系统中的具体应用。

简介

cordova-plugin-jcore 是 Harmony Cordova 生态系统中一款核心基础插件,在 Android 平台中作为极光推送的基础插件,OHOS 平台的极光推送则直接依赖极光推送的 har 包作为基础能力提供者。该插件为极光推送相关功能提供底层支撑,简化混合应用中极光推送能力的集成流程,适配多平台推送需求。

  • Android 平台:作为极光推送的基础插件,为极光推送功能提供底层支持

  • OHOS 平台:依赖极光推送 har 包,作为极光推送能力的基础提供者

  • 支持指定版本安装,适配不同项目的版本需求

  • 提供清晰的平台配置指引,确保插件正常运行

重要提示: 该插件在 Android 是作为极光推送的基础的插件,如果您是从 Android 移植到 OHOS,需要配置极光推送 har 包。

支持平台

  • Android:API 19 及以上(Android 4.4+)

  • iOS:10.0 及以上

  • OHOS:5.0+

下载安装

通过 hcordova CLI 即可快速安装插件,支持从 npm 仓库获取,可指定版本及平台安装。

从 npm 安装(推荐)

# 使用 hcordova CLI 安装

# 安装 hcordova 命令化工具
npm install -g hcordova

# 全平台安装插件
hcordova plugin add cordova-plugin-jcore

# 如需指定版本,可添加 @version 后缀(示例:1.0.0 版本)
hcordova plugin add [email protected] --platform ohos

指定平台安装 ohos

仅为 OHOS 平台安装插件:

# 仅安装到 OHOS 平台
hcordova plugin add cordova-plugin-jcore --platform ohos

# 安装指定版本(示例:1.0.0 版本)
hcordova plugin add [email protected] --platform ohos

从 GitCode 仓库安装

仅为 OHOS 平台安装插件:

# 仅安装到 OHOS 平台
hcordova plugin add https://gitcode.com/CPF-Cordova/cordova-plugin-jcore.git --platform ohos

# 指定标签/分支安装
hcordova plugin add https://gitcode.com/CPF-Cordova/cordova-plugin-jcore.git@develop --platform ohos

离线安装(本地包)

适用于无网络环境,先下载插件包到本地,再执行离线安装:

# 下载插件包到本地(示例路径:~/Downloads/cordova-plugin-jcore)
# 执行离线安装
hcordova plugin add ~/Downloads/cordova-plugin-jcore --platform ohos

安装后验证

安装完成后,可通过以下命令验证插件是否成功添加到项目中:

# 查看已安装的插件列表,若包含本插件 ID 则表示插件已成功安装
hcordova plugin list

卸载

# Cordova CLI 全平台卸载
hcordova plugin remove cordova-plugin-jcore 

# 指定平台卸载
hcordova plugin remove cordova-plugin-jcore --platform ohos

约束与限制

  • 依赖插件:无强制依赖,OHOS 平台需配置极光推送 har 包才能正常提供极光推送基础能力;Android 平台作为极光推送基础插件,需配合极光推送相关插件使用。

兼容性

支持:

| 项目 | 版本/信息 | |-----|--------| | SDK | API12+ | | IDE | DevEco Studio: 5.0+ | | ROM | 5.1+ | | Emulator | OpenHarmony 6.0+ |

在以下版本中已测试通过:

| 项目 | 版本/信息 | |-----|--------| | @cordova-ohos/ohos | 14.0.1-ohos-14.0.1 | | SDK | 5.0.0(12) | | IDE | DevEco Studio: 6.0.13.200 | | ROM | 5.1.0.120 SP3 | | Emulator | OpenHarmony 6.0.1(21) |

使用示例

  1. 安装插件:通过 hcordova CLI 命令安装 cordova-plugin-jcore 插件,可根据需求指定版本和平台;

  2. 配置 OHOS 平台:按照下方 OHOS 配置指引,修改项目配置文件,添加极光推送 har 包依赖及工程级配置;

  3. 集成极光推送:OHOS 平台依赖极光推送 har 包,Android 平台配合极光推送相关插件,即可实现极光推送基础能力调用。

使用说明

OHOS 配置

修改项目 oh-package.json5 文件

在项目中的 oh-package.json5 文件,dependencies 中加入极光 jg/push 的依赖项:

{
  "name": "entry",
  "version": "1.0.0",
  "description": "Please describe the basic information.",
  "main": "",
  "author": "",
  "license": "",
  "dependencies": {
    "@jg/push": "^1.3.1"
  }
}

配置工程级 build-profile.json5 文件

在工程级(最外层)build-profile.json5 中,配置 "useNormalizedOHMUrl": true:

"products": [
    {
    "name": "default",
    "signingConfig": "default",
    "compatibleSdkVersion": "5.0.0(12)",
    "buildOption": {
        "strictMode": {
        "caseSensitiveCheck": true,
        "useNormalizedOHMUrl": true
        }
    }
    }
]

目录结构

cordova-plugin-jcore/
├── src/                          # 源代码目录
│   └── main/                     # 主要源代码
│       └── cpp/                  # C++ 原生代码
│           └── JPush/            # JPush 模块
│               ├── JCorePlugin.cpp  # JCore 核心功能的 C++ 实现
│               └── JCorePlugin.h    # JCore 核心功能的头文件
├── www/                          # Web 资源目录
│   └── jcore.js                  # JavaScript JCore 接口(Cordova 桥接层)
├── .gitignore                    # Git 忽略文件配置
├── LICENSE                       # 项目开源许可证
├── OAT.xml                       # OpenHarmony 审核配置文件
├── package.json                  # Node.js 包配置
├── plugin.xml                    # Cordova 插件描述文件(核心配置)
└── README.md                     # 项目说明文档

贡献代码

使用过程中发现任何问题都可以提 Issue ,当然也非常欢迎发 PR 共建。

许可证

本插件基于 Apache License 2.0 开源,详见 LICENSE 文件。

官方资源