Reputation: 333
Although I disable notification permission in setting, still receive push notification when app in foreground AppDelegate::application(_:didReceiveRemoteNotification:fetchCompletionHandler:)[L:------------------didReceiveRemoteNotification [AnyHashable("aps"): { alert = { body = "Push payload body"; subtitle = "Test push notification"; title = "Push Hero"; }; }]------------------]
Upvotes: 1
Views: 82
Reputation: 21
When the notification permissions are disabled, the system won't show notifications in the notification center or as banners. However, if the app is running in the foreground, the application(_:didReceiveRemoteNotification:fetchCompletionHandler:) method can still be called. This happens because the notification payload is delivered directly to the app when it is active.
Upvotes: 2