Plugin.FirebasePushNotifications
Plugin.FirebasePushNotifications copied to clipboard
[Enhancement] UNNotificationPresentationOptions for iOS
Summary
The CrossGeeks nuget have option to set the UNNotificationPresentationOptions on iOS. This version is not supporting it yet.
FirebasePushNotificationManager.ShouldShowWhen = UNNotificationPresentationOptions.Alert;
API Changes
I would propose to do it like custom options on Android on the apphostbuilder extension method.
.UseFirebasePushNotifications(options =>
{
//options.AutoInitEnabled = false;
options.AutoInitEnabled = true;
#if IOS
options.iOS.PresentationOptions = UNNotificationPresentationOptions.Alert;
#endif
#if ANDROID
options.Android.NotificationActivityType = typeof(MainActivity);
options.Android.NotificationChannels = new Plugin.FirebasePushNotifications.Platforms.Channels.NotificationChannelRequest[]
{
new Plugin.FirebasePushNotifications.Platforms.Channels.NotificationChannelRequest()
{
ChannelId = "default_channel_id",
ChannelName = "Default Channel",
Description = "The default notification channel",
LockscreenVisibility = Android.App.NotificationVisibility.Public,
Importance = Android.App.NotificationImportance.High,
IsDefault = true,
}
};
#endif
``` -->