Apple - What actually happens during "Waiting for changes to be applied" and "Waiting for items to copy"?

Although there is no official documentation by Apple, you can still get some information by watching iTunes and iOS doing their stuff. This can be done by monitoring log files of both, on the iPhone this can be done over an USB connection. Here's a couple of what I've already seen the iPhone doing in the "waiting for xy" sync stages:

  • After copying new media to the iPhone, the media needs to be indexed, e.g. there's metadata to be processed, thumbnails need to be created etc. Until that is done, the media can't be displayed correctly in the corresponding iPhone apps, so iTunes waits for the iPhone Media Indexer service to complete its work.

  • When copying new apps to an iPhone, the packaged .ipa-files need to unpack and install, e.g. register in the iPhone's homescreen, app lists, file extension databases etc, this is done during that stages of sync.

  • The spotlight search might need time to index new files, iTunes waits for this as well (not always, but sometimes!)

  • When iTunes transfers files to an iPhone, it always verifies the file's contents in several ways, being it archive integrity or hashes that are compared. These processes do need plenty of time, depending on the size of the transferred data, and iTunes waits for successful verification in order to complete the sync.

  • When there are copy failures detected by any of the verification methods, iTunes will copy the files again. Often these processes are not displayed by iTunes, it is done during the "Waiting for items to copy"-processing.

  • iTunes will also wait for copy processes to terminate successfully, there are streams and sockets to close when data is transferred between computers. Although this should happen instantly, sometimes there are failures and the iPhone needs some time.

  • In general, you can say that iTunes utilizes these stages for verification and error correction as well as doing "completional" work. They get extremely useful especially when using WiFi sync, which is much more error-prone than USB.

Edit: To view the log files of an iPhone/iPad, no jailbreak is required. The best tool probably is libimobiledevice, a bundle of free open-source software licensed under LGPL 2.1. It is capable of handling an iOS device without the need of iTunes, so even on Linux machines. Although being designed for Linux machines, it can be run on Mac as well, e.g. by compiling the source code, or, even easier, by installing through homebrew. Although I'm always using it on Linux machines, this should work the same way on Mac OS X.

You probably need to pair your iPhone first, use the idevicepair-binary for this. It should find your USB-connected iPhone on its own, if it doesn't, you can try passing the UUID of your device. After pairing succeeded (it will display a success-message to your terminal interface), use the idevicesyslog-application to view the log files of your iPhone. It will connect to the syslog-socket of your device automatically, if it doesn't, you may pass the UUID again. Then all log messages will get posted to stdout on your computer, e.g. to your terminal output.

There is proprietary software as well that allows you to read the logs on your iOS device, but libimobiledevice as a command line- and open source-tool should be preferred.