Commit 50ece19
committed
fix(badges): Use
* This fixes a bug when a notification had "SetTo" = 0; our check for the existence of notification.badge could not differentiate null vs 0, and we detected 0 as lack of existence.
* Using a flag let's us differentiate between null vs 0 badge count. The payload from APNS will be already be an NSNumber: https://developer.apple.com/documentation/usernotifications/unnotificationcontent/badge?language=objc and we will set the flag if there is a badgehasBadge flag to indicate badge count is set1 parent 3af1ea8 commit 50ece19
File tree
4 files changed
+9
-3
lines changed- iOS_SDK/OneSignalSDK
- OneSignalCore/Source
- OneSignalExtension
- OneSignalNotifications
4 files changed
+9
-3
lines changedLines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
62 | 65 | | |
63 | 66 | | |
64 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
127 | 128 | | |
128 | 129 | | |
129 | 130 | | |
| |||
257 | 258 | | |
258 | 259 | | |
259 | 260 | | |
260 | | - | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
261 | 264 | | |
262 | 265 | | |
263 | 266 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
985 | 985 | | |
986 | 986 | | |
987 | 987 | | |
988 | | - | |
| 988 | + | |
989 | 989 | | |
990 | 990 | | |
991 | 991 | | |
| |||
0 commit comments