jpush / jpush/jpush-react-native
解决 ios app 未启动状态,点击推送进入app在RN可能监听不到点击消息
Open
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.4k
- Forks
- 348
- PR merge metrics
- No merged PRs in 30d
Description
你的运行环境
- 插件版本: 2.7.5
- react-native 版本:0.57.8
期望效果
ios app 杀死状态,点击推送进入app在RN可以监听到点击消息。
实际效果
有时点击推送RN那边接收不到点击消息。
重现步骤
- 杀死app
- 给app一个推送
- 点击推送
- 进入app,可能收不到该点击的消息
Debug logs
目前解决方法
js这边的init方法会调用原生的loadjs,loadjs会把点击的消息通过通知方式发送给rn,可是rn那边可能 addNotificationListener 还没注册成功,所以就收不到消息。如果在 addNotificationListener 之后再调用 init 方法,这样基本每次都能收到。
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the JavaScript init flow, the native loadjs call, and addNotificationListener during a killed-app launch. Reproduce the push-tap sequence and verify that the click message is delivered after the listener is registered, including when init runs during startup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100