Enabling Push Notifications for Gmail on iOS
A solution to bypassing IMAP restrictions on iOS Mail client
Monday, July 6, 2015

As an Apple Engineer I have to use my @apple.com email. Because of this I have to use the Mail app, and one thing I hate more than Facebook's "supposed" Messenger updates is two different apps on the phone at once. Before my internship, I just used the Gmail app and I loved the fact that I got immediate notifications for my email. This is especially important if I want to stay in the loop for a particular email thread; or whether I want to appear punctual to someone.

Now that I'm forced to use the Mail app (security reasons), I added my Gmail account to the Mail app, and deleted the Gmail app. This poses one big issue: Google does not support Push Notifications for the native Mail app. Post iOS 6, Google disabled support for Google Sync, which allowed access to mail via the Exchange ActiveSync (EAS) protocol enabling push support. If you are using the Mail app, the only way to get Gmail mail notifications on your iPhone is through the "Fetch" method, which manually pulls from the IMAP server according to a scheduled period, and then delivers your messages via a push notification. This is costly to the user as this process drains the battery and doesn't keep the user in loop (no immediate notification when you get a mail).

With the impending release of iOS 9, Apple makes several improvements to the Mail app, and now I'm fully sold on the fact that Apple's Mail app is far superior to Google's iOS Gmail counterpart. Seriously, sorting everything is so much easier.

So how can you get push notifications for iOS devices? After scouring online for solutions to this, I came up with 3 different solutions (and a potential fourth), detailed below.

iCloud + Gmail Forwarding (My Current Solution)
I'm going to start out with my current solution, as it works best for me. Since iCloud supports Push Notifications, we forward our email to iCloud (instant process), and set up "reply-as" with Gmail, thereby giving it the illusion that you are only using your Gmail account.

  • Cleanest and fastest way to enable push notifications.
  • All email is stored in iCloud.
  • Putting email in trash/making unread does not propogate change to Gmail.
  • Requires time to teach iOS 9 to make Gmail as default reply-as.
Now that we got that out of the way, lets start setting up our accounts to do this!
  • Go to Gmail.com > Settings > Forwarding and POP/IMAP
  • In the forwarding section, add your iCloud account, set forwarding to your iCloud email, and archive Gmail's copy.
  • On your iOS device go to Settings > Mail, Contacts, Calendars > Add Account and add your Gmail account.
  • Go to Mail, Contacts, Calendars > "Fetch New Data". Set Gmail to Manual, and iCloud to Push.
All right! You should be getting email notifications instantly. When you get an email and reply, click the "Cc/Bcc, From:" field and set it to your Gmail. Do this a couple times and iOS 9 will learn this by default.

Google Apps for Business
This is another method, which enables Microsoft ActiveSync (allows Push Notifications without forwarding). The problem to this is that you have to buy a subscription and use a new email address, which I do not recommend.

  • Allows Push Notifications without extra set up.
  • Requires $50 per year subscription.
  • Forces you to use a new email address (you get your own domain though!)
If the cons are fine by you, head on over to Google Apps for Business and set up an account. As long as you follow the instructions there you should be ready to go!

Gmail iOS App
This goes against my basic motive for this post, but if you're not OCD like me, and you're fine with having two apps (shudder), then head on over to the App Store!

  • Super easy, 2 steps and you're done.
  • Full power of Gmail on your phone.
  • Forces you to have two apps on the phone that do the same thing.
  • Mail app is more intuitive if you read a lot of email.

Future Solution: Gmail API
Google released an API for Push Notifications. Since there's no solution to this issue, why not make one? A messy solution would be to have a server using this API to get a notification for a push notification from the Google server, and then set up that same server to push to the iOS mail client, getting mail instantly without needing a subscription, forwarding, or a separate app. This is just a theory, I need to read more into this API (if I ever get time this summer).

Now that you have all of these options for Gmail push notifications, pick your favorite! Although your choice of method may not be the best, one thing is clear: Google please bring back push notifications to iOS!

Email me at stheakanath [at] gmail.com for suggestions and comments!