From d3ade1f27ac10fcaa65232b7be7b4e052ae0ef84 Mon Sep 17 00:00:00 2001 From: Jose Olarte III Date: Thu, 19 Mar 2026 15:10:38 +0800 Subject: [PATCH] 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. --- ios/Plugin/DailyNotificationPlugin.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/Plugin/DailyNotificationPlugin.swift b/ios/Plugin/DailyNotificationPlugin.swift index b57ca60..5e90dc7 100644 --- a/ios/Plugin/DailyNotificationPlugin.swift +++ b/ios/Plugin/DailyNotificationPlugin.swift @@ -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"