Commit 03dd2c7
committed
fix(type): Make badge NSNumber instead of NSInteger
* This let's us differentiate between null vs 0. The payload from APNS will be already be an NSNumber: https://developer.apple.com/documentation/usernotifications/unnotificationcontent/badge?language=objc
* 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.
* Note: we will still cache and read badge count (ONESIGNAL_BADGE_KEY) as NSInteger since that is what we have been doing, and avoid having to change types / migration.1 parent 3af1ea8 commit 03dd2c7
File tree
3 files changed
+5
-5
lines changed- iOS_SDK/OneSignalSDK
- OneSignalCore/Source
- OneSignalExtension
3 files changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
| 148 | + | |
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| |||
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
261 | | - | |
| 261 | + | |
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
0 commit comments