jpush / jpush/jpush-phonegap-plugin
集成crosswork后,addLocalNotificationForIOS会奔溃闪退
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 922
- Forks
- 350
- PR merge metrics
- No merged PRs in 30d
Description
你的运行环境
- 插件版本:
- 平台(Android / iOS):iOS / Xcode 9.2
- Cordova version (
cordova -v):8.0.0 - Cordova platform version (
cordova platform ls): ios 4.5.4 - Ionic Version (if using Ionic)
期望效果
集成 “cordova-plugin-ionic-webview”后能正常 使用本地推送。
实际效果
没有集成 “cordova-plugin-ionic-webview”前正常,集成后设置推送就会奔溃闪退。
重现步骤
- 创建cordova项目
- 添加jpush-phonegap-plugin和cordova-plugin-ionic-webview
- js代码中调用JPush.addLocalNotificationForIOS方法本地推送.
- 运行项目。
- 推送时会遇到闪退
Debug logs
2018-04-24 18:14:45.387 xxxx[730:116005] -[__NSCFNumber length]: unrecognized selector sent to instance 0x3c350bc0
2018-04-24 18:14:45.389 xxxx[730:116005] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFNumber length]: unrecognized selector sent to instance 0x3c350bc0'
*** First throw call stack:
(0x256c9b0b 0x24e86dff 0x256cf455 0x256cd0ab 0x255f7298 0x199ca9 0x19b20b 0x19ab87 0x198f71 0xe9a23 0x1009b9 0x68687 0x684d9 0x69e1f 0x2c6ad5f9 0x2c65d25b 0x2c65ea47 0x2c65e943 0x2c65e8df 0x2c516b99 0x2c64638f 0x2c4e22e3 0x2c4e3d07 0x28b7442b 0x28b748a3 0x2568b9e7 0x2568b5d7 0x2568993f 0x255d81c9 0x255d7fbd 0x26bf4af9 0x29d11435 0x14673 0x25284873)
libc++abi.dylib: terminating with uncaught exception of type NSException
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 at the JPush.addLocalNotificationForIOS entry point and reproduce the crash with cordova-plugin-ionic-webview installed on iOS. Trace the value that reaches the native notification code, using the reported __NSCFNumber length exception as the symptom; no source file or test is named. Done means local notifications work without the app crashing in this integration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, javascript
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100