Meteor-Community-Packages / Meteor-Community-Packages/raix-push

ios crash on Push.setBadge()

Open
#202 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
505
Forks
191
PR merge metrics
No merged PRs in 30d

Description

Hello!
I used setBadge like:

```
Template.RightMenu.onCreated(function(){
var instance = this;
instance.autorun(function () {
Push.setBadge(12);
})
})
```

I got in Xcode console:

```
2016-04-20 12:29:02.073 project[393:64982] active
2016-04-20 12:29:03.942 project[393:64982] Push Plugin register called
2016-04-20 12:29:03.981 project[393:64982] Push Plugin register success:
2016-04-20 12:29:04.054 project[393:64982] Push Plugin register success:
2016-04-20 12:29:04.064 project[393:64982] -[NSNull intValue]: unrecognized selector sent to instance 0x3913e9e0
2016-04-20 12:29:04.065 project[393:64982] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull intValue]: unrecognized selector sent to instance 0x3913e9e0'
*** First throw call stack:
(0x2250db8b 0x21ccadff 0x225134d5 0x2251112b 0x2243b358 0x197cb 0x99d01 0x1b82d 0x294c4679 0x29473fcf 0x294757bb 0x294756b7 0x29475653 0x2932cc61 0x2945cf97 0x292f7e93 0x292f98b7 0x259b441b 0x259b4893 0x224cfa67 0x224cf5e9 0x224cd9bf 0x2241c289 0x2241c07d 0x23a38af9 0x26b472c5 0x1353b 0x220c8873)
libc++abi.dylib: terminating with uncaught exception of type NSException
```

What did I do wrong?

Contributor guide

Open the contributing guide

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 at the Push.setBadge(12) call shown in the issue and inspect the iOS implementation behind it. Reproduce the crash using the Xcode log, then trace the NSNull intValue exception; done means setBadge no longer terminates the iOS app and the badge behavior is verified.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.