Closed iagormoraes closed 3 years ago
It seems was a bad setup to the AppDelegate file, it works with the documentation example:
completionHandler(UNNotificationPresentationOptionSound | UNNotificationPresentationOptionAlert | UNNotificationPresentationOptionBadge);
I am still unable to receive notifications in the foreground, and the documentation example I have used is
-(void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler { completionHandler(UNNotificationPresentationOptionSound | UNNotificationPresentationOptionAlert | UNNotificationPresentationOptionBadge); }
Could you help me out with this?
The option Alert was deprecated in exchange of
UNNotificationPresentationOptionAlert
andUNNotificationPresentationOptionList
, this means that iOS 14 or higher will not receive foreground push notifications with current version of this package.Even calling
completionHandler(UNNotificationPresentationOptionBanner);
in AppDelegate it doesn't prompt the dialog in foreground.