Sometimes I find myself working backwards up a tree of errors to fix a problem. Today was a case in point.
Since I’ve been doing a bit of WordPress grooming, I have the development build checked out locally. Previously I had run phpunit against the unit tests included in the code, but for some reason when I tried to run things under NetBeans, it would error out (Bug 247704).
Alternatively, you can use the standard GMail settings, on the iPhone, but my favorite approach is to actually use the GMail app from Google in the App Store. The reason I like that app over the standard iOS mail app is that it is much more of a true mobile client that takes advantage of the platform.
You can do this either from your iPhone/iPad directly, or using the iTunes store on your Mac/PC.
Once you have the app installed, you need to set up your GMail accounts. Either tap “open” from the App Store page about GMail, or find the GMail icon and launch it.
On launch the app will prompt you to log into your account. For a Google Apps account, this will be the email your administrator assigned you like email@example.com, and the password that you’ve set up previously by going to http://gmail.com.
Launching the App the first time takes you to the login page, where you can type in your email address and password. Note that this is the same whether you are logging in to a GMail account or a Google Apps account, to Google they are just different users as far as mail goes.
Once you log in, you will be shown the inbox for that account, and be able to read your email pretty easily. To navigate the folders (like sent, draft, etc), you tap on the little icon in the upper left corner that looks like a box with stacked bars.
This will cause the folders and settings pane to slide out from the left and reveal your email structure so that you can choose. Clicking on a particular folder will display that list in the same fashion as you saw with the inbox.
Additionally from this screen, you can add other email accounts by tapping on the profile area at the top of the pane, which slides the list of accounts down and changes the direction of the panel indicator at the top of the pane.
If you’ve already done this, you will see the list of accounts, and each one will be badged with the number of unread messages. Adding a new account is as simple as tapping the large plus icon and logging in. Tapping on a profile picture will switch you to that account once you are logged in.
The little gear icon in the upper right of this corner brings up settings for you email where you can set a few things (such as vacation responder, signature, etc).
Once you log into the new account, you will again see the loading page, this time with the image from the new account’s name and profile image
The next time that you go to the account selection page, you’ll see a list of accounts with the icon for each badged with the number of unread messages showing so that you can easily see what needs your attention at the moment.
Google apps on the iPhone are a mixed bag, with some being native, and others not, so it’s also a good idea to set up the Apple “Mail, Contacts, Calendars” for synchronization of those things (which can use the Exchange push in the same way as an actual Exchange server).
First go to your settings (normally you can find this by clicking the home button on and looking for the gear icon that says “Settings”.
If you’ve previously added accounts, the “Add Account …” will appear below the existing account settings list (in my case I actually have to scroll in order to get to this button.
Tap on the add account button and you’ll be presented with the choice of types of account that you want to use. You can use GMail here, but I prefer to use Exchange simply because it pushes the information to the phone asynchronously
Once you tap on the Exchange button, you’ll get a new page that prompts you for the authentication information. This uses Microsoft’s autodiscover method to figure out how the account should be configured.
Type in the user name and password for your account here, and give it a description. Typically I use the name of the company that has the domain that I’m adding (for example PMI-SFBAC for my pmi-sfbac.org address).
Then click the “Next” button which should bring up the Domain screen. The only thing you need to make sure of is that the server ends up being m.google.com, and that you still have the right username and password. To continue, tap “Next”.
The final step is to choose what you want to be pushed to your phone. Generally the important ones are the contacts and calendars, since those are business related.
It really doesn’t hurt to have Mail turned on as well, since that keeps your inbox in the iOS Mail app up to date, but if you’re worried about your data plan, just set up the contacts and calendars, since that is the part that the GMail app won’t really be as helpful with.
…Or how to brick your phone with an upgrade, and recover…
Earlier this month, Apple released the fifth beta of their 3.0 firmware for the iPhone. As usual, I raced to the site to download it.
I became very excited by the email that I got saying that submissions to the Apple store have to be compatible with iPhone OS 3.0, which to me means it won’t be long before this is a production OS. With that in mind, I strapped on my crazy cap and decided to upgrade my phone to beta 5.
After downloading the firmware and software for the new beta, I began the upgrade. According to the instructions, you needed the new beta of iTunes to do the upgrade, so that was the first thing that I installed.
Once that was ready, I followed the process that has become familiar to me for upgrading the phone:
After the backup click the “Restore” button while holding the option (alt) key.
Browse for the new firmware and watch things roll.
As it turns out, the mistake I made at that point was clicking the “Restore” button, later I learned that beta 5 won’t install unless you click “Check for Update” while holding the option key.
The first thing I noticed was that there was an odd cartoon that flashed up on the screen with a pink background. I figured it was some developer’s Easter egg, so I didn’t worry too much. After the usual series of minutes of resetting the phone and iTunes validating the software, the upgrade told me it was done, and I waited for the final reboot. This is typically the point at which the phone reboots, and iTunes detects it and activates.
Instead I ended up with an endless wait, as the phone never rebooted. So I went through the usual tricks to get it to come back to life. Eventually it worked, and I got a pink screen that showed the graphic you see with a new phone.
I plugged it in again, only to find that it wasn’t recognizing the phone (which after several tries led me to believe that the upgrade was not complete). Not only was the phone stuck, but I couldn’t seem to get it back into DFU to restore the software.
At this point it occurred to me that perhaps there was something nefarious going on: my phone had been jailbroken prior to the upgrade, so perhaps that was the issue. Luckily for me, I had my wife’s phone to play with, and it hadn’t been jailbroken, so I decided to try and upgrade it.
After downgrading the USB drivers on my Mac, I was able to get it into DFU mode, and restore the 2.2.1 version of the firmware. Inspired by this, I tried upgrading my wife’s phone on a PC (figuring the problem was something in the USB drivers). Sure enough, her phone loaded the 3.0 software just fine.
So, once again, I tried upgrading my phone, and couldn’t get it to go. I tried it on the Mac, then on the PC, same results both times. For some reason it wouldn’t work. I could downgrade to 2.2.1, but not upgrade to 3.0.
More digging on the internet, and I found a posting on the iPhone developer forums that talked about installing beta 4 then upgrading to beta 5 if you have an old silver back phone (both of mine are the metal backed pre-3g phones). I figured it was worth a shot, so I downloaded a copy of the beta 4, and ran the upgrade. Eureka! The beta 4 firmware upgrade worked !
At this point it had been a few days since I had my phone working, so I took a breath and decided to run with beta 4 for a while. I kept scouring the web and watching the discussion on the beta 5 upgrade problems to see what people were doing to get it to work.
In the mean time, I ran into an interesting (and scary) side effect of the USB driver downgrade. I forgot to upgrade the drivers after my successful downgrade of the firmware, not thinking that those drivers were actually for a different version of the OS. Whenever I plugged a USB stick into my machine, it would go into panic mode and shut down. I thought my hard drive was dying until I realized it only happened when I plugged in a USB stick, and remembered the driver downgrade. Upgrading to the current drivers fixed that issue.
Finally, I saw a post that talked about clicking the “Check for Upgrade” button while holding the option key instead of the “Restore” button. I decided to try this, and was amazed when it worked. So apparently, all along the secret was to use the upgrade button instead of the restore button. There’s some evidence that the reason this fails is because of part of the upgrade to the firmware, so it makes sense that there may be a difference in the way that iTunes processes an upgrade as compared to a restore.
At any rate, my current thinking of the process is as follows:
Download the firmware and iTunes beta
Install the iTunes beta
Dock the phone
Do a backup of the phone
Option click the “Check for Update” button
Choose the beta firmware IPSW file you downloaded
Be happy if it works.
If it doesn’t work, follow the link above to downgrade the USB drivers.
Go through a normal restore (should put you back to 2.2.x)
Repeat steps 5-7
Hopefully Apple will have this all figured out with the next release (and especially before the production update). As near as I can tell, this only affects the older phones, and doesn’t happen with the 3g iPhone.
I’ve been pretty happy with this iPhone OS, it seems to be quicker and more stable than the 2.2.1 was – still looking forward to the actual release.
On the first day of 360iDev, I was in a session to learn about programming an iPhone, and somebody mentioned that a friend of theirs had updated their iPod firmware, and couldn’t figure out how to reset it back to the prior version. Since I had recently done this, I thought I could write this walk-through.
Apple uses the iTunes application to upgrade your operating system which does a nice job and for the most part protects you from doing anything too terrible by automating the process. On the iPhone, iTunes will give you an alert about the availability of a new operating system, and ask you if you’d like to upgrade, and tell you that if you have problems you will have the option to restore from a backup.
The interesting thing about the backup piece though, is that it doesn’t really restore the firmware, only the settings. For most users this is fine since the reason for needing to go through the “restore” process is actually because of a problem with the firmware, and the “restore” does all the work required to get your phone back to working with the new firmware and your old settings.
If however, you need to go to a prior version of the firmware, the process is not so obvious. Until recently I didn’t even think this was possible for somebody to restore to the prior version unless they were a developer.
After I updated my firmware on my iPhone recently, I noticed that my hard drive was getting to be very full, which prompted me to search for what was using up my disk space. This led me to find that the old version of the firmware gets saved by iTunes when you do the update.
Firmware files have an .ipsw extension and can be found at the following locations:
To restore the firmware to the prior version, do the following:
Launch iTunes (with your iPhone connected)
Click the button that says “Restore” while holding down the “Option” key (use the Shift key on Windows). Note: if you get a prompt asking if you want to back up your phone, you probably weren’t holding down the key when you clicked, and you’re actually going through the restore process.
Alternatively, if you’re an iPhone developer, the XCode Organizer can also drive this process of selecting a version to install on your phone.
In either case, the actual firmware change is done through iTunes. Now you should see the firmware file being extracted:
Your phone will be reset, and you’ll see the firmware being validated in iTunes:
Next you’ll see the update message:
At this point your phone will be reset back to factory settings for that prior version of the firmware. You’ll probably get the prompt that tells you an update is available, which you can cancel.
Finally if you want to restore your settings, pick the backup you want to use (you can also tell it to set up as a new iPhone, which just means you won’t have any of your settings from before). This will restore all of your apps and setting, although you may end up with a message that tells you about applications that won’t work if you have any that are for a newer version of the firmware (in other words if your backup contains an App version that wasn’t available for the firmware you reloaded).
After all of this, iTunes will probably ask you if you want to upgrade your firmware to the current version, which is how you would go back to the current version when you are ready to do so (or you can go through this whole process again to go to a specific version). You may want to turn off the automatic update checking if you are going to switch to other versions very often.
Note that your “problem” applications from the prior message will work once again after you are on a version of the firmware that is current enough to support thos applicatons.