Well, I've tested this many times over the years, and double-checked it when
we were having this discussion last week, so unless Apple
just changed it in the past few days, or unless some iCloud Mail accounts work differently than others, that doesn't seem to be the case. At least it definitely hasn't been my experience — and as I said, it's one of the big reasons I'm on Fastmail (Update: Sorry, I got my threads mixed up — that conversation was
actually over here).
In fact, years ago I had to
write my own code for OS X Mail Server to make push notifications work properly, since it suffers from the same problem as iCloud.
New messages are pushed, but
changes are not pushed to iOS devices.
Note that macOS Mail works differently, as it supports IMAP IDLE. This allows it to pick up changes immediately, since, (as you note), it is "using data consistently." Technically speaking, IMAP IDLE (which isn't an Apple thing, but rather an open standard defined in
RFC 2177) maintains a persistent connection to the mail server, so when things change, those get pushed over that active pipe.
This isn't practical on mobile devices for a whole lot of reasons, not the least of which is battery life. I used IMAP clients way back in the days before the iPhone (on systems like Symbian and Palm OS) that used IMAP IDLE and it would outright
kill the battery in no time flat.
Hence, Apple came up with a better way in the form of its Apple Push Notification Service, which is designed to use a connectionless protocol to advise iOS of notifications, saving the need for a persistent data connection. These power all notifications on iOS devices, but this is how iOS Mail receives notifications of new mail in iCloud and OS X Server accounts (and probably still Yahoo Mail — I don't know what the status of that is these days, but it was actually the very first push-enabled mail service when Apple first launched the iPhone in 2007 — Apple's didn't come along with push email until a year later when .Mac became MobileMe).
The failing in the case of iCloud, however, is that Apple still only sends push notifications for
new messages.
Now, to be fair, what
actually happens when these push notifications are received is that Mail app simply refreshes the inbox. This is why I say that "Apple only
sends push notifications for new messages" and not "Apple only pushes new mail," since there's a subtle but important difference here.
In other words, you
will see mailbox updates whenever any new messages come in. For example:
- A new message arrives. A push notification gets sent to your iPhone. Your badge count updates to show the new message.
- You read that message on another device, and also delete a couple of messages, and flag a couple of others.
- The badge count on your iPhone remains the same after this.
- Another new message comes in. The Mail app refreshes, and picks up ALL of the changes made in step #2, updating the badge count as appropriate.
In other words, your entire mailbox will update whenever any new messages come in, because the push notifications sent by Apple merely trigger the Mail app to update the entire mailbox — in much the same way that opening the Mail app also does. That's why I was able to easily solve this on my own OS X Mail Server. I didn't need to worry about figuring out what changes were made in my mailbox, I simply had to find a way to trigger a generic push notification for my account whenever ANY changes occurred, regardless of what they were. The Mail app would take care of the rest.
In my experience, however, iCloud does not update the mailbox or the badge count unless either: a) new mail comes in, or (b) you open the mail app (including waking your iPhone from sleep while it's open) or refresh it manually.
Again, maybe this does work differently for you. I certainly can't rule that out. Perhaps Apple is finally fixing this in preparation for iCloud+ Mail (I
really hope so), but I have three iCloud accounts and none of them act the way you describe, and they
never have. Further, based on some of the other comments in this thread, it sounds like my experience is not unique.
I also just tested this before responding, to make absolutely certain it has not changed for me. It's still working the way that it always has. Apple Push Notifications are
only sent by iCloud when new messages are received. Yes, macOS Mail will reconcile changes made from iOS devices, but that's because it uses a totally different protocol, and it's also not iCloud specific; IMAP IDLE works with just about
any IMAP mail service — even Gmail's half-assed implementation of IMAP.
Again, I suspect you may be seeing the behaviour described above — either seeing near-real-time updates on macOS Mail or your iPhone and iPad Mail app fully updating whenever new mail comes in or you refresh it in some other way.
In both my own implementation years ago, and Fastmail (which I switched to as soon as it began supporting native Apple Push Notifications back in 2015), it doesn't take a few moments to respond on the iOS side. The badge almost always updates almost immediately. At most, it may sometimes take a second or two depending on what else the iPhone is doing.