Troubleshooting iPhone: Part 1

Given my interest in troubleshooting Macs (I wrote the book on the subject, so to speak), it should come as no surprise that I have been spending a chunk of my “iPhone time” exploring how to troubleshoot the device.

For starters, all iPhone users should download the iPhone User’s Guide. It’s a much more comprehensive manual than the skimpy little piece of paper that comes with iPhone itself. It includes an entire chapter on “Tips and Troubleshooting.” In addition, check out Apple’s iPhone Support site, which has links to a wide assortment of more detailed troubleshooting advice. Finally, for advice on maximizing the battery life of your iPhone, check out Apple’s iPhone Battery page. Beyond Apple, the best source for iPhone troubleshooting is probably iPhone Atlas (disclaimer: This site is run by the people who also run MacFixIt, the site I started and still have an association with).

With that out of the way, here are are a collection of troubleshooting tips that I consider to be the most critical and interesting to know:

iPhone crashes. Have you ever been working in an app or widget on your iPhone, when it suddenly vanishes and gets replaced by the Home screen? What happened is that the application crashed. This is the equivalent of what happens on a Mac when an application “unexpectedly quits” and dumps you back to the Finder.

Why does it crash? Well, given that Apple has virtually locked down iPhone so that you cannot modify its contents in any way, beyond the limited methods that Apple has provided, the typical cause is a bug in Apple’s software that Apple will eventually have to fix. If you are using Safari, it’s also possible that a Web page that is incompatible with iPhone could trigger a crash.

Speaking of crashing iPhones and Safari, the Web browser is undoubtedly the single most common place where you are likely to see a crash. In most cases, there is nothing much you can do to prevent the crash from recurring. However, if the crashes appear to be happening at random times within Safari, and with increasing frequency, you may be able to get rid of them, at least temporarily, by restarting your iPhone. To do this, hold down the Sleep/Wake key until the Power Off slider appears. Then Power Off and restart. If you can’t get the Power Off slider to appear for any reason, try holding down the Sleep/Wake and Home keys at the same time, until iPhone powers off.

Similar to the result of restarting a Mac, this clears iPhone’s memory, which (to put it in non-technical terms) winds up eliminating problems resulting from too much going on with too little memory to do it all.

Another way you might prevent persistent Safari crashes is to clear its cache. To do so, go to Settings>Safari and press Clear Cache. I wouldn’t worry too much that this will slow down the loading of Web pages that would otherwise load from the stored cache. I have never seen a Web page load from cache, even when using Safari’s Back button to return to the immediately previous page. It’s one of the many things that Apple should fix in an update.

A final note on crashes. If anything on iPhone does crash, you will get a message about it the next time you sync your iPhone with your Mac via iTunes. The message states: “Your iPhone contains diagnostic information which may help Apple improve its products.” Similar again to the Mac’s “Unexpectedly Quit” dialog, there will be a Send to Apple button. The actual crash data gets stored on your Mac in the /Library/Logs/Crashreporter/MobileDevice/{name of iPhone} folder. The “MobileSafari” .crash log files can be viewed via the Console utility. Note: There is also a MobileSafari property list (.plist) file that is temporarily stored in this folder; it appears to be deleted after you dismiss the dialog.

• iPhone freezes. If the iPhone stops responding to any of your touchscreen presses or button pushes, it may be “frozen.” The simple solution here is to press and hold the Home key for about six seconds. With luck, this should return you to the Home screen, with everything working again.

Reset/Restore your iPhone. If none of the above can resolve a problem you are having, and you believe that the cause is related to some problem with the data on your iPhone (as opposed to a bug in Apple’s software), your last resort is to reset the iPhone. To do this, navigate to Settings>General>Reset. You have two main options here: “Reset All Settings” and “Erase All Content and Settings.” The first option is less severe. In general, it erases preferences settings you created on iPhone, but not data you entered that is synced with your Mac (such as Address Book contacts). After doing this, you would likely start recreating settings yourself directly on iPhone. Hopefully, whatever problem you were having would now be gone.

If even that doesn’t work, the “Erase All…” option removes both your settings and data. Typically, after this option, you will want to restore (a hopefully non-problematic copy) of the erased data back to your iPhone. Or you may simply decide to start over, as if you just took your iPhone out of the box. In either case, you will be looking at restoring your iPhone from iTunes. Based on some poking around on my own and some reading of other articles on the Web, I am fairly certain that this is how this all works:

To restore your iPhone, click the Restore button from the iPhone Summary screen. You may want to first click Check for Update to make sure you restore the latest version of iPhone’s software.

It is not clear to me why you might want/need to select to the “Erase All…” function on iPhone prior to doing this, as a Restore will also erase all data. The “Erase All…” option on iPhone allows you to erase data without restoring. Otherwise, I see little difference.

Anyway, after you erase your iPhone and restore its original Mac OS X software, the Mac will detect that you have a backup of your iPhone from a previous sync (assuming that you have done a previous sync). A dialog will appear at this point and ask whether you want to set up your iPhone as new or restore the contents from your backup. If you choose the latter, your iPhone should get stocked with everything that you had just erased. This would also be especially useful if you get a replacement iPhone in exchange for a defective one and want the replacement to have all the data and settings that were on the defective one.

[A few words about the backup: The name of the backup and when it was last updated can be found (even before connecting iPhone) by going to iTunes Preferences and selecting the iPhone icon. From this window, you can also click to Remove Backup, should you wish to start over with a fresh copy on the next sync (or if perhaps you sell your iPhone and will not longer need that particular backup).

In addition to backing up the data that you synced from your Mac, the backup also stores many of the iPhone settings. Apples states: “Automatically backed-up information includes text messages, notes, call history, contact favorites, sound settings, widget settings, certain network settings, and other preferences.” The backup does not include photo, video, songs, or email messages.

The actual sync data is located in your Home directory in two locations. First, and most critical, the backup information itself is stored in ~/Library/Application Support/MobileSync/Backup. The data here are what get deleted should you click the Remove Backup button in iTunes. Apparently, all data created on iPhone is stored here, including such things as your list of “Recents” in Google Maps and the notes you created in Notes. It is not in a form that you can easily access. However, enterprising users have written shell scripts (run via Terminal) that can extract the data to a more usable form. You can download one such script here.

Further sync information appears to be stored in yet another location: ~/Library/Application Support/SyncServices/Local. Here you will find a folder called clientdata. Inside this folder are a series of subfolders specific to each sync component maintained by your Mac (such as one each for .Mac, iSync and iPhone). The names of the folders are are series of hex characters of no obvious meaning. But inside each folder is a file named “clientname.txt.” Open this in any text editor to see what the folder’s sync device is. For iPhone, you want the folder with a clientname of MobileSync. There is data.syncdb file in this folder, which contains the actual synced data. There is an even larger data.syncdb file at the root level of the Local folder. Here is where things get a bit murky for me at the moment. I am not certain as to the significance of the two different data.syncdb files (are both files used by iPhone?). And how exactly does all of this work with the data in the MobileSync folder. Again, I am not quite sure. Further, none of the files here are anywhere near the size of the 4GB or 8GB of iPhone itself. So, there is no disk image being maintained. As I work out the answers here, I will update this posting or make a new one.]

Manual vs. automatic sync. If you are having any problems with your iPhone, especially if you will be doing any sort of resetting/restoring, it’s probably best not to have it set to automatically sync when iTunes is launched. Otherwise, you may initiate a sync before you can perform some other needed operation (such as a restore). It’s also useful anytime there is data on your Mac that is scheduled to sync that you want to prevent from syncing at the moment.

To avoid automatic syncing, you have several options. The first is to disable the “Automatically sync when this iPhone is connected” option in the iPhone Summary screen (available by selecting iPhone from the Source list after the iPhone is connected to your Mac via its USB cable). The problem with this approach is that the iPhone must be connected before you can disable it. That’s why you are better off going to the iPhone tab of iTunes’ Preferences and select “Disable automatic syncing for all iPhones.” This overrides the first option. That is, even if you have selected to Automatically Sync from the Summary screen, it will not have an effect if the Preferences option is enabled. Finally, if you hold down the Command-Option keys when launching iTunes until iPhone appears in the Source list, automatic syncing will be prevented for that one time only.

To initiate a manual sync at any time, just click the Sync button from the iPhone screen in iTunes.

On a related note, there may be times when you want a sync to go only in one direction. That is, rather than merging the data on iPhone with the data on your Mac, you may want to replace the data on your iPhone with a fresh copy from your Mac. You can easily do this for Contacts, Calendars, Mail Accounts and/or Bookmarks by going to iPhone’s Info tab and scrolling down to the Advanced section. There you will see the various “replace” options.

If there is a conflict between entries on iPhone vs. your Mac (such as if you changed a phone number for the same person on iPhone and Mac, using different numbers in each case, and there is no way for the Mac to tell which one is now correct), Mac OS X’s Conflict Resolver will launch when you attempt to sync. It will walk you through each conflicting entry and allow you to choose which version you want to keep (the one on the Mac or the one on iPhone). However, I had at least one occasion where this did not work out well. Conflict Resolver kept relaunching with each sync, reporting the same conflicts, even after I resolved them. In this case, using the Advanced option described above to replace the data on iPhone should get the Resolver to stop bothering you (hopefully the data on your Mac contains the desirable variation at least in most cases).

To cancel a sync in progress, drag the slider on iPhone. If you get a call during a sync, the sync is canceled automatically, allowing you to unplug iPhone to answer the call. To finish syncing, just reconnect iPhone after your call is done.

This entry was posted in Apple Inc, iPhone, Technology. Bookmark the permalink.