also looking at this
fix(ios): schedule a notification with the data the page gave it
#262
8 files
+242
-22
| @@ -4433,6 +4433,10 @@ struct CraftWebView: UIViewRepresentable { | ||
| 4433 | 4433 | content.body = data["body"] as? String ?? "" |
| 4434 | 4434 | if let subtitle = data["subtitle"] as? String { content.subtitle = subtitle } |
| 4435 | 4435 | if let badge = data["badge"] as? Int { content.badge = NSNumber(value: badge) } |
| 4436 | // The page's `data`, which is what a tap (#255) and an arrival | |
| 4437 | // (#256) hand back. It was dropped, so a tap on a scheduled | |
| 4438 | // notification reached the page as {} (#258). | |
| 4439 | if let info = data["data"] as? [String: Any] { content.userInfo = info } | |
| 4436 | 4440 | content.sound = .default |
| 4437 | 4441 | |
| 4438 | 4442 | let id = data["id"] as? String ?? UUID().uuidString |