Commit 6d9b74c
committed
Use new setBadgeCount API on iOS 16+
* The method `applicationIconBadgeNumber` is deprecated in iOS 17 - see https://developer.apple.com/documentation/uikit/uiapplication/applicationiconbadgenumber
* Its replacement is `setBadgeCount:withCompletionHandler:` but there is no equivalent getter.
* Use this new API on ios 16+ and swizzle it just like we do for applicationIconBadgeNumber1 parent 5114281 commit 6d9b74c
2 files changed
Lines changed: 26 additions & 3 deletions
File tree
- iOS_SDK/OneSignalSDK/OneSignalNotifications
- Categories
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
100 | 106 | | |
101 | 107 | | |
102 | 108 | | |
| |||
167 | 173 | | |
168 | 174 | | |
169 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
170 | 185 | | |
171 | 186 | | |
172 | 187 | | |
| |||
Lines changed: 11 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
802 | 802 | | |
803 | 803 | | |
804 | 804 | | |
805 | | - | |
806 | | - | |
807 | | - | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
808 | 816 | | |
809 | 817 | | |
810 | 818 | | |
| |||
0 commit comments