Skip to content

Commit

Permalink
fix(ios): cleaning firebase-messaging-core iOS build warnings (#251)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielbiga committed Apr 10, 2024
1 parent 86a2723 commit 872c1c2
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,13 @@ public class NSCUNUserNotificationCenterDelegate: NSObject, UNUserNotificationCe

if (NSCFirebaseMessagingCore.showNotificationsWhenInForeground || notification.request.content.userInfo["gcm.notification.showWhenInForeground"] as? String == "true" || notification.request.content.userInfo["showWhenInForeground"] as? Bool ?? false ||
aps != nil && aps?["showWhenInForeground"] as? Bool ?? false) {
options = UNNotificationPresentationOptions(rawValue: UNNotificationPresentationOptions.alert.rawValue | UNNotificationPresentationOptions.sound.rawValue | UNNotificationPresentationOptions.badge.rawValue )
var alertOptions: UInt = 0
if #available(iOS 14.0, *) {
alertOptions = UNNotificationPresentationOptions.list.rawValue | UNNotificationPresentationOptions.banner.rawValue
} else {
alertOptions = UNNotificationPresentationOptions.alert.rawValue
}
options = UNNotificationPresentationOptions(rawValue: alertOptions | UNNotificationPresentationOptions.sound.rawValue | UNNotificationPresentationOptions.badge.rawValue)
}

if (notification.request.content.userInfo["gcm.message_id"] != nil) {
Expand Down

0 comments on commit 872c1c2

Please sign in to comment.