Tag Archives: idle

Fix for non-hacktivated iPhone push service

[update, May 2nd 2010] Please see below for my *new* results. I have fixed the issue, at least for me.

      Here’s an issue that has plagued me for a very long time, and I think I’ve solved it. Time will tell, of course, and though I have a few ideas for what caused the problem I can’t say for sure what it was. 

      Here’s the backstory: I have three email accounts: MobileMe, MS Exchange, and an IMAP that does not support push. The MobileMe account is absolutely crucial to my everyday life: contacts, schedule, email, and I like having “Find My iPhone”. The other accounts are simply convenient.       I like it when all of my info is pushed to the phone, it adds a dimension to my whole workflow. I also like push notifications, chiefly for Sportacular and Facebook. Neither push nor email have worked properly for a very, very long time. Too long, in fact, and I absolutely had to fix it. Email wouldn’t even fetch, and push notifications would usually only come if my phone was in use/not locked, and every now and again they would come through normally. From time to time I would get an email or two around the times that I got a notification. It just wasn’t cutting it.
      There was a time when they did work, though, and what’s more is that it worked on (and was broken on) a different phone: I had brought my original 3G in to Apple because of a GPS problem and got a refurbished replacement. I had jailbroken a few times, but push used to work on my iPod touch which was also jailbroken and it followed me (push, not the touch!) throughout firmware upgrades from 1 to 2-point-something. Trust me, the hardware isn’t the problem. I decided the other day that I had had enough and learnt as much as I could about the problem and through trial and error have managed to get it working. I should mention that I have never hacktivated/unlocked my phone(s) to run on a different carrier. I’m with Fido here in Canada and have no reason to switch carrier. And many months ago, I un-jailbroke my phone because I found that it was slower jailbroken.
      So there you have it: I have a phone that has never been seriously hacked, service that I pay for in every sense (MobileMe and my cell service!) but no push of any kind.

Here’s what I’ve tried, and (so far) succeeded. I am currently in testing stages for at least the next few days. I did this on an iPhone 3G with firmware 3.1.2, freshly downloaded by itunes. Also, just some observations: the same problems are reproducible whether new MobileMe accounts (I opened one to test) or Exchange accounts are added, and the old ones deleted, etc. Push apps were installed, uninstalled to no avail, and the phone was restored, re-configured with all my accounts from scratch also without solution… so it isn’t the remote servers that are misconfigured. A friend with a 3GS also confirmed that her Exchange push (which is on the same servers as my own account) works just fine. I attempted to restore from restore mode, re-jailbroke and deleted things found in /var/root/something.

Steps:

1- Put into DFU mode, NOT RESTORE MODE, and restore from scratch
2- When iPhone is restarting, it needs to be connected to itunes for activation. Don’t connect it right away.
3- Create a new iTunes library and sign out of any itunes accounts in the store section.
4- Sign out of any iTunes accounts in the store section.
5- Connect iphone only to activate (don’t chose to set-up as new or restore, don’t even touch that screen, just disconnect when the phone is usable)
Now it’s time to test the push notification service and push email.
6- Do nothing but configure MobileMe on iPhone (try your own stuff if you don’t have MobileMe, I suppose)
7- Lock the phone for half an hour and don’t touch it, then send yourself an email from your computer and see if the phone reacts. If it does, great! Now you know that the next thing you do that breaks push is your problem!
8- Revert to usual iTunes library, connect phone, set as new, sync nothing (uncheck sync applications in the set-up wizard). It would be a good idea to test it again and make a back up that you know works, so that you can revert to it in case something breaks.
9- Add everything to your phone gradually. One app at a time, one setting at a time, and between everything test by locking the device for ~15 minutes and then sending yourself an email. I bought the awesome app PushMail so that when I would email myself, at once I could test notifications AND email reception, and it’s great that now I get to actually see my emails on my lock screen when my phone is in silent mode, as opposed to unlocking it first to check my mail.

The things that, for me, broke push are what I’m still trying to figure out. I had tried restoring my phone, and push worked for a while (half an hour?), then stopped. Possible causes are that I had installed all three of my email accounts… or perhaps that I had simply restored and not restored through DFU mode. Both sound equally improbable. Then, the other day, push had also worked until I configured all three. The odd thing about that is my friend’s push worked just fine with the same Exchange account. Right now I’m at the stage of reinstalling all of my apps. It sucks that I lost all my preferences, but the payoff, having fully working push notifications and push mail, is far greater. I have taken a look at Pushfix 2.0, which is meant for hacktivated/unlocked phones, but I have read multiple reports and even contacted someone who never unlocked their iPhone and was able to fix push with it. When it comes right down to it, it’s not just a push notification service problem, for me anyway, since push notification and push email through IMAP Idle are not the same thing. However, I have found that when one doesn’t work, neither does the other. This would indicate that, at least, there is a common preference file or something. It seems that I truly am in the minority, though.

I will post results here as they happen, if I discover precisely what the problem is. I think, however, that it leans towards the mail accounts and not the push notification service. This is because I read far more reports online about MobileMe push not working than push notification. Furthermore, when mail push does not work I would still get some push notifications, albeit delayed and sometimes only when the phone was actively in use. If anyone out there stumbles on this post and has any info to offer, please, enlighten me!

[update, May 2nd 2010]
I have fixed the problem for me, but I can’t say for sure what caused it. I know only what it is related to, but not more than that.

After I set everything up as described above, push notifications and push mail were working great for 3 days and I was the happiest person on earth. The only email account set up was my Apple MobileMe account that syncs everything: calendar, contacts, bookmarks, and email, plus it lets me do a few other things. (paid service FYI)

I backed up my phone and decided: here we go. I set up my school Exchange account (McGill). Bingo! All forms of push stopped working yet again. I would only get notifications when the phone was actively in use, so my much-studied hypothesis is the following: there is a push certificate for the Exchange account that when added fails to allow push to work properly. I also know that the actual McGill Exchange implementation in general is just fine, since my friend’s iPhone 3GS has her McGill Exchange account set up and her push notifications as well as push email are working just fine. My laptop and desktop, however, do not get push McGill Exchange emails, only MobileMe emails! Thus, push doesn’t work properly for (my) Exchange account! I have since compared the details of both my and mf friend’s account and everything was the same, except the server our accounts are hosted on. I cannot be certain that this is the problem.

I also cannot be certain why push works when the phone is awake and in use, but not with it’s screen locked. A theory is that the push certificate constantly calls home (the McGill servers) to try and get the go-ahead to push email but is failing. To conserve battery, (and I know this one from my ipod touch days…) the phone abandons this check when the phone is locked (passcode or not) and this somehow brings down all push services too. But when the phone’s in use, calling home is one of the many things the phone is doing, in addition no working normally for my other accounts. Yes, I have a data plan. No, I’m not sure whether or not this theory is even remotely possible, and the iPhone OS is constantly changing anyway, so take that with a very large grain of salt.

And, for my final act, I restored my backup without the Exchange account set up and all is well again. I have been using my phone without this particular Exchange account for many months. In the interim, I added a Gmail Exchange account and it pushes just fine, just like the MobileMe account. I added my McGill email as an IMAP account, as most Exchange servers also implement IMAP. The iPhone currently only seems to support some IMAP push implementations, like Yahoo’s, so for Push email I use a great, highly recommended app called PushMail, which gives me a nice dialog box with the content of the message, subject, and sender. I also deleted my McGill Exchange account on my computers, and added the email as Exchange IMAP instead, and now it pushes to my computers just fine.

As I said, I can’t be sure what the problem is but there’s either a bug in Apple’s Exchange Server 2008 implementation, or a bug in McGill’s standard config for new Exchange devices. Most likely, though, the reason for all of this is not Apple, not Microsoft, and not me; I’m quite sure this is a problem isolated to my (and possibly several other) school’s Exchange account, seeing as other Exchange accounts work beautifully, both other accounts outside and inside of McGill.

Some day, I may try to re-add the account but in the meantime, I have the email I want and the push I craved.