jpush / jpush/jpush-phonegap-plugin

能否对 ionic capacitor 接入进一步说明,总是提示无效 $app_key

Open
#412 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
922
Forks
350
PR merge metrics
No merged PRs in 30d

Description

WARNING: 如果不按照这个表格,我们将无法帮助你,并将忽略你的问题。

你的运行环境

  • 插件版本:
  • 平台(Android / iOS):
  • Cordova version (cordova -v):
  • Cordova platform version (cordova platform ls):
  • Ionic Version (if using Ionic)

期望效果

正确识别 app_key

实际效果

2019-08-08 20:24:40.355 16467-16493/? E/JIGUANG-JCore: [CheckManifestHelper] errorcode:1008,Invalid appKey : $app_key, Please get your Appkey from JIGUANG web console!

重现步骤

背景

Capacitor 无法跟像 Cordova 一样使用 --variable 来指定 APP_KEY,然而尝试以下几种形式的参数指定都失败:

  1. AndroidManifest.xml 增加类似 <meta-data android:name="APP_KEY">
  2. android/app/build.gradle 下增加 manifestPlaceholders 节点
manifestPlaceholders = [
            JPUSH_PKGNAME : applicationId,
            JPUSH_APPKEY : "你的 Appkey ", //JPush 上注册的包名对应的 Appkey.
            JPUSH_CHANNEL : "developer-default", //暂时填写默认值即可.
        ]

Debug logs

包括 Android 或 iOS 的日志:

  • iOS: XCode logs
    • Android: $ adb logcat / Android Studio logcat

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Capacitor Cordova-plugin configuration guidance and inspect AndroidManifest.xml and android/app/build.gradle, including the manifestPlaceholders shown in the report. Determine how APP_KEY is passed in this setup; the issue is resolved when the configured app_key is recognized and the Invalid appKey log no longer appears.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, javascript
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.