-
Notifications
You must be signed in to change notification settings - Fork 129
Add iOS badge helpers #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add iOS badge helpers #55
Conversation
|
i'm not really sure if it is the best way to add helper methods for this.. Since the naming of the methods says "you can set the BadgeCount for every notification" but it should be " you can set the Badge Count for every notification on iOS"... @Lloople what do you think? |
|
Yea, I considered doing Where as if its just a generic ...but after thinking about it, if this is wanted you are probably right: something like |
|
I agree with both of you 😅 I mean, there's a chance OneSignal add this to another platforms like Android or whatever, and your methods contains the word |
|
Hey @LKDevelopment and @Lloople I've renamed those methods. Let me know if you think that is more suiting or something else. |
Lloople
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the naming is pretty good now, we have the change to add a generic method in the future for all badges if required.
|
Sweet. I'm already using this, but if you want to do a RC and ping me, I'm happy to pull it in to this app I'm working on and give it a test just to be uber sure everything is working as expected 👍 |
|
@timacdonald thank you. Over the night i've got a little idea how we could clean up the code a little bit. I will merge this and then will overhaul all :) Thank you! |
|
sounds good - and thank you both |
Added a few helper methods to help deal with badge counts on iOS. Note that these only apply to iOS - as OneSignal does not allow badge counts on Android.
From the docs:
I doubt you want to add methods for every parameter, but I thought this was a good candidate because it's not just key / value, but a couple of key / values to get it working. Tripped me up for a minute and thought it might help others in the future.