The Gmail app for iOS can receive push notifications while the app isnโt working (as most email apps do).
However, it can also clear all Gmail notifications from the device when the user's unread incoming mail counter becomes zero , even if the application does not work .
Here is an example sequence: 1. Receive a new email in your Gmail account. 2. The iOS device displays a notification for a new message. 3. Go to the Gmail website and open the message (marking the message as โreadโ). 4. The notification on the iOS device is rejected.
Note. [[UIApplication sharedApplication] scheduledLocalNotifications] provides only local notifications, ie those that were created in the iOS application itself.
As for Apple documentation for APNS , there is no way to remotely run the application in the background , and there is no way to reject the remote notification.
So how does the iOS app for Gmail work?
source share