fix(ios): unwrap optional title/body in dual-notification path

NotificationContent.title and .body are String?; assigning them to
non-optional String caused Swift build errors. Use ?? with the same
defaults as the config fallback so both branches yield non-optional
title/body.
This commit is contained in:
Jose Olarte III
2026-03-19 15:10:38 +08:00
parent 21ab05d63b
commit d3ade1f27a

View File

@@ -476,8 +476,8 @@ public class DailyNotificationPlugin: CAPPlugin {
let title: String
let body: String
if useFetched {
title = fetchedContent.title
body = fetchedContent.body
title = fetchedContent.title ?? "Daily Notification"
body = fetchedContent.body ?? "Your daily update is ready"
} else if fallbackBehavior == "show_default" {
title = userNotification["title"] as? String ?? "Daily Notification"
body = userNotification["body"] as? String ?? "Your daily update is ready"